Code Monkey home page Code Monkey logo

Comments (4)

agardnerIT avatar agardnerIT commented on September 1, 2024

I got a little bit further with the JSON loader:

./gnmi-gateway -EnableGNMIServer     -ServerTLSCert=server.crt     -ServerTLSKey=server.key     -TargetLoaders=json     -TargetJSONFile=targets.json -Exporters=debug
./gnmi-gateway -EnableGNMIServer     -ServerTLSCert=server.crt     -ServerTLSKey=server.key     -TargetLoaders=json     -TargetJSONFile=targets.json -Exporters=debug
{"level":"info","time":"2021-05-14T14:03:35+10:00","message":"Starting GNMI Gateway."}
{"level":"info","time":"2021-05-14T14:03:35+10:00","message":"Clustering is NOT enabled. No locking or cluster coordination will happen."}
{"level":"info","time":"2021-05-14T14:03:35+10:00","message":"Starting connection manager."}
{"level":"info","time":"2021-05-14T14:03:35+10:00","message":"Starting gNMI server on 0.0.0.0:9339."}
{"level":"info","time":"2021-05-14T14:03:35+10:00","message":"Starting Debug exporter."}
{"level":"info","time":"2021-05-14T14:03:35+10:00","message":"Connection manager received a target control message: 1 inserts 0 removes"}
{"level":"info","time":"2021-05-14T14:03:35+10:00","message":"Initializing target localhost ([127.0.0.1:50051]) map[NoTLSVerify:yes]."}
{"level":"info","time":"2021-05-14T14:03:35+10:00","message":"Target localhost: Connecting"}
{"level":"info","time":"2021-05-14T14:03:35+10:00","message":"Target localhost: Subscribing"}
{"level":"info","time":"2021-05-14T14:03:45+10:00","message":"Target localhost: Disconnected"}
{"level":"info","time":"2021-05-14T14:03:45+10:00","message":"{ timestamp:1620965025564881800 prefix:/localhost update:[ { path:/meta/sync val:&{false} } ] }"}
{"level":"info","time":"2021-05-14T14:03:45+10:00","message":"{ timestamp:1620965025564881800 prefix:/localhost update:[ { path:/meta/connected val:&{false} } ] }"}
E0514 14:03:45.564881   16648 reconnect.go:114] client.Subscribe (target "localhost") failed: client "gnmi" : client "gnmi" : Dialer(127.0.0.1:50051, 10s): context deadline exceeded; reconnecting in 552.330144ms
{"level":"info","time":"2021-05-14T14:03:45+10:00","message":"{ timestamp:1620965025564881800 prefix:/localhost update:[ { path:/meta/targetLeavesUpdated val:&{0} } ] }"}
{"level":"info","time":"2021-05-14T14:03:45+10:00","message":"{ timestamp:1620965025564881800 prefix:/localhost update:[ { path:/meta/targetLeavesSuppressed val:&{0} } ] }"}
{"level":"info","time":"2021-05-14T14:03:45+10:00","message":"{ timestamp:1620965025564881800 prefix:/localhost update:[ { path:/meta/latencyMax val:&{0} } ] }"}
{"level":"info","time":"2021-05-14T14:03:45+10:00","message":"{ timestamp:1620965025564881800 prefix:/localhost update:[ { path:/meta/targetSize val:&{0} } ] }"}
{"level":"info","time":"2021-05-14T14:03:45+10:00","message":"{ timestamp:1620965025564881800 prefix:/localhost update:[ { path:/meta/latestTimestamp val:&{-6795364578871345152} } ] }"}
{"level":"info","time":"2021-05-14T14:03:45+10:00","message":"{ timestamp:1620965025564881800 prefix:/localhost update:[ { path:/meta/latencyMin val:&{0} } ] }"}
{"level":"info","time":"2021-05-14T14:03:45+10:00","message":"{ timestamp:1620965025564881800 prefix:/localhost update:[ { path:/meta/targetLeavesAdded val:&{0} } ] }"}
{"level":"info","time":"2021-05-14T14:03:45+10:00","message":"{ timestamp:1620965025564881800 prefix:/localhost update:[ { path:/meta/targetLeavesDeleted val:&{0} } ] }"}
{"level":"info","time":"2021-05-14T14:03:45+10:00","message":"{ timestamp:1620965025564881800 prefix:/localhost update:[ { path:/meta/targetLeaves val:&{0} } ] }"}
{"level":"info","time":"2021-05-14T14:03:45+10:00","message":"{ timestamp:1620965025564881800 prefix:/localhost update:[ { path:/meta/targetLeavesStale val:&{0} } ] }"}
{"level":"info","time":"2021-05-14T14:03:45+10:00","message":"{ timestamp:1620965025564881800 prefix:/localhost update:[ { path:/meta/latencyAvg val:&{0} } ] }"}
{"level":"info","time":"2021-05-14T14:03:56+10:00","message":"Target localhost: Disconnected"}
E0514 14:03:56.155311   16648 reconnect.go:114] client.Subscribe (target "localhost") failed: client "gnmi" : client "gnmi" : Dialer(127.0.0.1:50051, 10s): context deadline exceeded; reconnecting in 1.080381816s
{"level":"info","time":"2021-05-14T14:04:05+10:00","message":"Connection manager received a target control message: 1 inserts 0 removes"}
{"level":"info","time":"2021-05-14T14:04:07+10:00","message":"Target localhost: Disconnected"}
E0514 14:04:07.250449   16648 reconnect.go:114] client.Subscribe (target "localhost") failed: client "gnmi" : client "gnmi" : Dialer(127.0.0.1:50051, 10s): context deadline exceeded; reconnecting in 1.31013006s
{"level":"info","time":"2021-05-14T14:04:18+10:00","message":"Target localhost: Disconnected"}
E0514 14:04:18.584978   16648 reconnect.go:114] client.Subscribe (target "localhost") failed: client "gnmi" : client "gnmi" : Dialer(127.0.0.1:50051, 10s): context deadline exceeded; reconnecting in 1.582392691s
{"level":"info","time":"2021-05-14T14:04:30+10:00","message":"Target localhost: Disconnected"}
E0514 14:04:30.202416   16648 reconnect.go:114] client.Subscribe (target "localhost") failed: client "gnmi" : client "gnmi" : Dialer(127.0.0.1:50051, 10s): context deadline exceeded; reconnecting in 2.340488664s
{"level":"info","time":"2021-05-14T14:04:35+10:00","message":"Connection manager received a target control message: 1 inserts 0 removes"}

targets.json

{
  "request": {
    "default": {
      "subscribe": {
        "prefix": {
        },
        "subscription": [{
            "path": {
              "elem": [{
                  "name": "GetValue"
                }]
            }
          }]
      }
    }
  },
  "target": {
    "localhost": {
      "addresses": [ "127.0.0.1:50051" ],
      "request": "default",
      "meta": {
        "NoTLSVerify": "yes"
      }
    }
  }
}

from gnmi-gateway.

agardnerIT avatar agardnerIT commented on September 1, 2024

Thinking about this further, all I need is a simple demo system so that I can create my exporter.

What's the easiest way to set this up?

Fake device > gnmi gateway

then I create:

Fake device > gnmi gateway > exporter > my service

from gnmi-gateway.

0xmc avatar 0xmc commented on September 1, 2024

Hi Adam,

Your proposal of

device > gnmi-gateway > exporter > my service

is sound. We generally use real devices (either router hardware or containerized routers) for development. If you need help getting it running, I suggest creating the inaugural discussion :)

from gnmi-gateway.

colinmcintosh avatar colinmcintosh commented on September 1, 2024

Looks like there is a good discussion taking place on #30 for dummy gNMI targets -- I'm going to close this issue.

from gnmi-gateway.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.