Closed tsmjay closed 10 months ago
Output from a non-working metric:
[test@arch-1 ~]$ gnmic -d --config /usr/local/etc/gnmic-3.yaml subscribe
2024/01/09 13:15:00.193504 /home/runner/work/gnmic/gnmic/pkg/app/app.go:223: [gnmic] version=0.34.3, commit=d461fa9, date=2023-11-14T02:13:11Z, gitURL=https://github.com/openconfig/gnmic, docs=https://gnmic.openconfig.net
2024/01/09 13:15:00.193685 /home/runner/work/gnmic/gnmic/pkg/app/app.go:228: [gnmic] using config file "/usr/local/etc/gnmic-3.yaml"
2024/01/09 13:15:00.196241 /home/runner/work/gnmic/gnmic/pkg/app/app.go:266: [gnmic] set flags/config:
address: []
api: ""
auth-scheme: ""
calculate-latency: false
capabilities-version: false
cluster-name: default-cluster
config: /usr/local/etc/gnmic-3.yaml
debug: true
diff-compare: []
diff-model: []
diff-path: []
diff-prefix: ""
diff-qos: "0"
diff-ref: ""
diff-set-to-notifs-full: false
diff-set-to-notifs-response: ""
diff-set-to-notifs-setrequest: ""
diff-setrequest-full: false
diff-setrequest-new: ""
diff-setrequest-ref: ""
diff-sub: false
diff-target: ""
diff-type: ALL
dir: []
encoding: json_ietf
exclude: []
file: []
format: ""
generate-camel-case: false
generate-config-only: false
generate-path: ""
generate-snake-case: false
get-model: []
get-path: []
get-prefix: ""
get-processor: []
get-target: ""
get-type: ALL
get-values-only: false
getset-condition: any([true])
getset-delete: ""
getset-get: ""
getset-model: []
getset-prefix: ""
getset-replace: ""
getset-target: ""
getset-type: ALL
getset-update: ""
getset-value: ""
gzip: false
insecure: false
instance-name: ""
listen-max-concurrent-streams: "256"
listen-prometheus-address: ""
log: true
log-file: ""
log-tls-secret: false
max-msg-size: 536870912
no-prefix: false
outputs:
prometheus:
debug: true
listen: :9804
path: /metrics
type: prometheus
password: ""
path-config-only: false
path-descr: false
path-path-type: xpath
path-search: false
path-state-only: false
path-types: false
path-with-non-leaves: false
path-with-prefix: false
port: "57400"
print-request: false
prompt-description-bg-color: dark_gray
prompt-description-with-prefix: false
prompt-description-with-types: false
prompt-max-suggestions: "10"
prompt-prefix-color: dark_blue
prompt-suggest-all-flags: false
prompt-suggest-with-origin: false
prompt-suggestions-bg-color: dark_blue
proto-dir: []
proto-file: []
proxy-from-env: false
retry: 10s
set-delete: []
set-delimiter: ':::'
set-dry-run: false
set-prefix: ""
set-replace: []
set-replace-cli: []
set-replace-cli-file: ""
set-replace-file: []
set-replace-path: []
set-replace-value: []
set-request-file: []
set-request-replace: []
set-request-update: []
set-request-vars: ""
set-target: ""
set-union-replace: []
set-union-replace-file: []
set-union-replace-path: []
set-union-replace-value: []
set-update: []
set-update-cli: []
set-update-cli-file: ""
set-update-file: []
set-update-path: []
set-update-value: []
skip-verify: false
subscribe-backoff: 0s
subscribe-heartbeat-interval: 0s
subscribe-history-end: ""
subscribe-history-snapshot: ""
subscribe-history-start: ""
subscribe-lock-retry: 5s
subscribe-mode: stream
subscribe-model: []
subscribe-name: []
subscribe-output: []
subscribe-path: []
subscribe-prefix: ""
subscribe-qos: "0"
subscribe-quiet: false
subscribe-sample-interval: 0s
subscribe-set-target: false
subscribe-stream-mode: target-defined
subscribe-suppress-redundant: false
subscribe-target: ""
subscribe-updates-only: false
subscribe-watch-config: false
subscriptions:
stream-on-change:
mode: stream
paths:
- /openconfig-system:system/state/hostname
sample-interval: 30s
stream-mode: sample
targets:
172.16.1.3:8080:
password: test123
skip-verify: true
username: admin
targets-file: ""
timeout: 10s
tls-ca: ""
tls-cert: ""
tls-key: ""
tls-max-version: ""
tls-min-version: ""
tls-server-name: ""
tls-version: ""
token: ""
upgrade-use-pkg: false
use-tunnel-server: false
username: ""
2024/01/09 13:15:00.207814 /home/runner/work/gnmic/gnmic/pkg/app/app.go:276: [gnmic] config='/usr/local/etc/gnmic-3.yaml'(string)
2024/01/09 13:15:00.207977 /home/runner/work/gnmic/gnmic/pkg/app/app.go:276: [gnmic] debug='true'(bool)
2024/01/09 13:15:00.208163 /home/runner/work/gnmic/gnmic/pkg/app/app.go:276: [gnmic] encoding='json_ietf'(string)
2024/01/09 13:15:00.208926 /home/runner/work/gnmic/gnmic/pkg/app/app.go:276: [gnmic] outputs/prometheus/debug='true'(bool)
2024/01/09 13:15:00.209632 /home/runner/work/gnmic/gnmic/pkg/app/app.go:276: [gnmic] outputs/prometheus/listen=':9804'(string)
2024/01/09 13:15:00.210096 /home/runner/work/gnmic/gnmic/pkg/app/app.go:276: [gnmic] outputs/prometheus/path='/metrics'(string)
2024/01/09 13:15:00.210515 /home/runner/work/gnmic/gnmic/pkg/app/app.go:276: [gnmic] outputs/prometheus/type='prometheus'(string)
2024/01/09 13:15:00.211014 /home/runner/work/gnmic/gnmic/pkg/app/app.go:276: [gnmic] subscriptions/stream-on-change/mode='stream'(string)
2024/01/09 13:15:00.211436 /home/runner/work/gnmic/gnmic/pkg/app/app.go:276: [gnmic] subscriptions/stream-on-change/paths='[/openconfig-system:system/state/hostname]'([]interface {})
2024/01/09 13:15:00.211861 /home/runner/work/gnmic/gnmic/pkg/app/app.go:276: [gnmic] subscriptions/stream-on-change/sample-interval='30s'(string)
2024/01/09 13:15:00.212511 /home/runner/work/gnmic/gnmic/pkg/app/app.go:276: [gnmic] subscriptions/stream-on-change/stream-mode='sample'(string)
2024/01/09 13:15:00.213230 /home/runner/work/gnmic/gnmic/pkg/app/app.go:276: [gnmic] targets/172.16.1.3:8080/password='test123'(string)
2024/01/09 13:15:00.213858 /home/runner/work/gnmic/gnmic/pkg/app/app.go:276: [gnmic] targets/172.16.1.3:8080/skip-verify='true'(bool)
2024/01/09 13:15:00.214301 /home/runner/work/gnmic/gnmic/pkg/app/app.go:276: [gnmic] targets/172.16.1.3:8080/username='admin'(string)
2024/01/09 13:15:00.214437 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=backoff, changed=false, isSetInFile=false
2024/01/09 13:15:00.214567 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=heartbeat-interval, changed=false, isSetInFile=false
2024/01/09 13:15:00.214659 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=help, changed=false, isSetInFile=false
2024/01/09 13:15:00.214757 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=history-end, changed=false, isSetInFile=false
2024/01/09 13:15:00.214859 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=history-snapshot, changed=false, isSetInFile=false
2024/01/09 13:15:00.214957 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=history-start, changed=false, isSetInFile=false
2024/01/09 13:15:00.215066 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=lock-retry, changed=false, isSetInFile=false
2024/01/09 13:15:00.215177 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=mode, changed=false, isSetInFile=false
2024/01/09 13:15:00.215287 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=model, changed=false, isSetInFile=false
2024/01/09 13:15:00.215399 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=name, changed=false, isSetInFile=false
2024/01/09 13:15:00.215510 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=output, changed=false, isSetInFile=false
2024/01/09 13:15:00.215617 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=path, changed=false, isSetInFile=false
2024/01/09 13:15:00.215710 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=prefix, changed=false, isSetInFile=false
2024/01/09 13:15:00.215795 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=qos, changed=false, isSetInFile=false
2024/01/09 13:15:00.215880 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=quiet, changed=false, isSetInFile=false
2024/01/09 13:15:00.215965 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=sample-interval, changed=false, isSetInFile=false
2024/01/09 13:15:00.216050 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=set-target, changed=false, isSetInFile=false
2024/01/09 13:15:00.216138 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=stream-mode, changed=false, isSetInFile=false
2024/01/09 13:15:00.216237 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=suppress-redundant, changed=false, isSetInFile=false
2024/01/09 13:15:00.216327 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=target, changed=false, isSetInFile=false
2024/01/09 13:15:00.216410 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=updates-only, changed=false, isSetInFile=false
2024/01/09 13:15:00.216502 /home/runner/work/gnmic/gnmic/pkg/config/config.go:384: [config] cmd=subscribe, flagName=watch-config, changed=false, isSetInFile=false
2024/01/09 13:15:00.216634 /home/runner/work/gnmic/gnmic/pkg/config/subscriptions.go:48: [config] subscriptions map: map[string]interface {}{"stream-on-change":map[string]interface {}{"mode":"stream", "paths":[]interface {}{"/openconfig-system:system/state/hostname"}, "sample-interval":"30s", "stream-mode":"sample"}}
1 {"name":"stream-on-change","paths":["/openconfig-system:system/state/hostname"],"mode":"stream","stream-mode":"sample","sample-interval":30000000000}
2 {"name":"stream-on-change","paths":["/openconfig-system:system/state/hostname"],"mode":"stream","stream-mode":"sample","sample-interval":30000000000}
3 {"name":"stream-on-change","paths":["/openconfig-system:system/state/hostname"],"mode":"stream","stream-mode":"sample","sample-interval":30000000000}
2024/01/09 13:15:00.217696 /home/runner/work/gnmic/gnmic/pkg/config/subscriptions.go:67: [config] subscriptions: map[stream-on-change:{"name":"stream-on-change","paths":["/openconfig-system:system/state/hostname"],"mode":"stream","stream-mode":"sample","sample-interval":30000000000}]
2024/01/09 13:15:00.217852 /home/runner/work/gnmic/gnmic/pkg/config/outputs.go:61: [config] outputs: map[prometheus:map[debug:true format: listen::9804 path:/metrics type:prometheus]]
2024/01/09 13:15:00.217972 /home/runner/work/gnmic/gnmic/pkg/config/inputs.go:57: [config] inputs: map[]
2024/01/09 13:15:00.218086 /home/runner/work/gnmic/gnmic/pkg/config/actions.go:49: [config] actions: map[]
2024/01/09 13:15:00.218200 /home/runner/work/gnmic/gnmic/pkg/config/processors.go:45: [config] processors: map[]
2024/01/09 13:15:00.218413 /home/runner/work/gnmic/gnmic/pkg/config/targets.go:102: [config] read target config: {"name":"172.16.1.3:8080","address":"172.16.1.3:8080","username":"admin","password":"****","timeout":10000000000,"insecure":false,"tls-cert":"","tls-key":"","skip-verify":true,"buffer-size":100,"retry-timer":10000000000,"log-tls-secret":false,"gzip":false,"token":""}
2024/01/09 13:15:00.218929 /home/runner/work/gnmic/gnmic/pkg/config/targets.go:124: [config] targets: map[172.16.1.3:8080:{"name":"172.16.1.3:8080","address":"172.16.1.3:8080","username":"admin","password":"****","timeout":10000000000,"insecure":false,"tls-cert":"","tls-key":"","skip-verify":true,"buffer-size":100,"retry-timer":10000000000,"log-tls-secret":false,"gzip":false,"token":""}]
2024/01/09 13:15:00.219076 /home/runner/work/gnmic/gnmic/pkg/app/outputs.go:27: [gnmic] starting output type prometheus
2024/01/09 13:15:00.219297 /home/runner/work/gnmic/gnmic/pkg/app/gnmi_client_subscribe.go:75: [gnmic] queuing target "172.16.1.3:8080"
2024/01/09 13:15:00.219418 /home/runner/work/gnmic/gnmic/pkg/app/gnmi_client_subscribe.go:77: [gnmic] subscribing to target: "172.16.1.3:8080"
2024/01/09 13:15:00.219538 /home/runner/work/gnmic/gnmic/pkg/app/collector.go:42: [gnmic] starting target &{Config:{"name":"172.16.1.3:8080","address":"172.16.1.3:8080","username":"admin","password":"****","timeout":10000000000,"insecure":false,"tls-cert":"","tls-key":"","skip-verify":true,"buffer-size":100,"retry-timer":10000000000,"log-tls-secret":false,"gzip":false,"token":""} Subscriptions:map[stream-on-change:{"name":"stream-on-change","paths":["/openconfig-system:system/state/hostname"],"mode":"stream","stream-mode":"sample","sample-interval":30000000000}] m:0xc000ac4b90 conn:<nil> Client:<nil> SubscribeClients:map[] subscribeCancelFn:map[] pollChan:0xc00007f440 subscribeResponses:0xc00087f500 errors:0xc00087f560 stopped:false StopChan:0xc00007f620 Cfn:<nil> RootDesc:<nil>}
2024/01/09 13:15:00.219775 /home/runner/work/gnmic/gnmic/pkg/app/collector.go:60: [gnmic] starting target "172.16.1.3:8080" listener
2024/01/09 13:15:00.220072 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.59.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel created
2024/01/09 13:15:00.220224 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.59.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] original dial target is: "172.16.1.3:8080"
2024/01/09 13:15:00.220366 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.59.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] dial target "172.16.1.3:8080" parse failed: parse "172.16.1.3:8080": first path segment in URL cannot contain colon
2024/01/09 13:15:00.220486 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.59.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] fallback to scheme "passthrough"
2024/01/09 13:15:00.220632 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.59.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] parsed dial target is: {URL:{Scheme:passthrough Opaque: User: Host: Path:/172.16.1.3:8080 RawPath: OmitHost:false ForceQuery:false RawQuery: Fragment: RawFragment:}}
2024/01/09 13:15:00.220766 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.59.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel authority set to "172.16.1.3:8080"
2024/01/09 13:15:00.220263 /home/runner/work/gnmic/gnmic/pkg/outputs/prometheus_output/prometheus_output/prometheus_output.go:273: [prometheus_output:prometheus] initialized prometheus output: {"name":"prometheus","listen":":9804","path":"/metrics","expiration":60000000000,"debug":true,"timeout":10000000000,"num-workers":1}
2024/01/09 13:15:00.221101 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.59.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Resolver state updated: {
"Addresses": [
{
"Addr": "172.16.1.3:8080",
"ServerName": "",
"Attributes": null,
"BalancerAttributes": null,
"Metadata": null
}
],
"Endpoints": [
{
"Addresses": [
{
"Addr": "172.16.1.3:8080",
"ServerName": "",
"Attributes": null,
"BalancerAttributes": null,
"Metadata": null
}
],
"Attributes": null
}
],
"ServiceConfig": null,
"Attributes": null
} (resolver returned new addresses)
2024/01/09 13:15:00.223618 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.59.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel switches to new LB policy "pick_first"
2024/01/09 13:15:00.223778 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.59.0/grpclog/logger.go:53: [gnmic] [core] [pick-first-lb 0xc000ae4330] Received new config {
"shuffleAddressList": false
}, resolver state {
"Addresses": [
{
"Addr": "172.16.1.3:8080",
"ServerName": "",
"Attributes": null,
"BalancerAttributes": null,
"Metadata": null
}
],
"Endpoints": [
{
"Addresses": [
{
"Addr": "172.16.1.3:8080",
"ServerName": "",
"Attributes": null,
"BalancerAttributes": null,
"Metadata": null
}
],
"Attributes": null
}
],
"ServiceConfig": null,
"Attributes": null
}
2024/01/09 13:15:00.226396 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.59.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel created
2024/01/09 13:15:00.226534 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.59.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to CONNECTING
2024/01/09 13:15:00.226682 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.59.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to CONNECTING
2024/01/09 13:15:00.226711 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.59.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel picks a new address "172.16.1.3:8080" to connect
2024/01/09 13:15:00.226868 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.59.0/grpclog/logger.go:53: [gnmic] [core] [pick-first-lb 0xc000ae4330] Received SubConn state update: 0xc000ae44e0, {ConnectivityState:CONNECTING ConnectionError:<nil>}
2024/01/09 13:15:00.248733 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.59.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to READY
2024/01/09 13:15:00.248786 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.59.0/grpclog/logger.go:53: [gnmic] [core] [pick-first-lb 0xc000ae4330] Received SubConn state update: 0xc000ae44e0, {ConnectivityState:READY ConnectionError:<nil>}
2024/01/09 13:15:00.248795 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.59.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to READY
2024/01/09 13:15:00.248806 /home/runner/work/gnmic/gnmic/pkg/app/gnmi_client_subscribe.go:220: [gnmic] target "172.16.1.3:8080" gNMI client created
2024/01/09 13:15:00.248824 /home/runner/work/gnmic/gnmic/pkg/app/gnmi_client_subscribe.go:223: [gnmic] sending gNMI SubscribeRequest: subscribe='subscribe:{subscription:{path:{elem:{name:"openconfig-system:system"} elem:{name:"state"} elem:{name:"hostname"}} mode:SAMPLE sample_interval:30000000000} encoding:JSON_IETF}', mode='STREAM', encoding='JSON_IETF', to 172.16.1.3:8080
2024/01/09 13:15:00.292069 /home/runner/work/gnmic/gnmic/pkg/app/collector.go:71: [gnmic] target "172.16.1.3:8080": gNMI Subscribe Response: &{SubscriptionName:stream-on-change SubscriptionConfig:{"name":"stream-on-change","paths":["/openconfig-system:system/state/hostname"],"mode":"stream","stream-mode":"sample","sample-interval":30000000000} Response:update:{timestamp:1704777300686173271 prefix:{elem:{name:"openconfig-system:system"} elem:{name:"state"}} update:{path:{elem:{name:"hostname"}} val:{string_val:"switch-3"}}}}
2024/01/09 13:15:00.292647 /home/runner/work/gnmic/gnmic/pkg/outputs/prometheus_output/prometheus_output/prometheus_output.go:423: [prometheus_output:prometheus] got event to store: {"name":"stream-on-change","timestamp":1704777300686173271,"tags":{"source":"172.16.1.3:8080","subscription-name":"stream-on-change"},"values":{"/openconfig-system:system/state/hostname":"switch-3"}}
2024/01/09 13:15:00.292964 /home/runner/work/gnmic/gnmic/pkg/app/collector.go:71: [gnmic] target "172.16.1.3:8080": gNMI Subscribe Response: &{SubscriptionName:stream-on-change SubscriptionConfig:{"name":"stream-on-change","paths":["/openconfig-system:system/state/hostname"],"mode":"stream","stream-mode":"sample","sample-interval":30000000000} Response:sync_response:true}
2024/01/09 13:15:30.309868 /home/runner/work/gnmic/gnmic/pkg/app/collector.go:71: [gnmic] target "172.16.1.3:8080": gNMI Subscribe Response: &{SubscriptionName:stream-on-change SubscriptionConfig:{"name":"stream-on-change","paths":["/openconfig-system:system/state/hostname"],"mode":"stream","stream-mode":"sample","sample-interval":30000000000} Response:update:{timestamp:1704777330697602015 prefix:{elem:{name:"openconfig-system:system"} elem:{name:"state"}} update:{path:{elem:{name:"hostname"}} val:{string_val:"switch-3"}}}}
2024/01/09 13:15:30.311480 /home/runner/work/gnmic/gnmic/pkg/outputs/prometheus_output/prometheus_output/prometheus_output.go:423: [prometheus_output:prometheus] got event to store: {"name":"stream-on-change","timestamp":1704777330697602015,"tags":{"source":"172.16.1.3:8080","subscription-name":"stream-on-change"},"values":{"/openconfig-system:system/state/hostname":"switch-3"}}
2024/01/09 13:16:00.310555 /home/runner/work/gnmic/gnmic/pkg/app/collector.go:71: [gnmic] target "172.16.1.3:8080": gNMI Subscribe Response: &{SubscriptionName:stream-on-change SubscriptionConfig:{"name":"stream-on-change","paths":["/openconfig-system:system/state/hostname"],"mode":"stream","stream-mode":"sample","sample-interval":30000000000} Response:update:{timestamp:1704777360697941933 prefix:{elem:{name:"openconfig-system:system"} elem:{name:"state"}} update:{path:{elem:{name:"hostname"}} val:{string_val:"switch-3"}}}}
2024/01/09 13:16:00.312690 /home/runner/work/gnmic/gnmic/pkg/outputs/prometheus_output/prometheus_output/prometheus_output.go:423: [prometheus_output:prometheus] got event to store: {"name":"stream-on-change","timestamp":1704777360697941933,"tags":{"source":"172.16.1.3:8080","subscription-name":"stream-on-change"},"values":{"/openconfig-system:system/state/hostname":"switch-3"}}
^C
received signal 'interrupt'. terminating...
[test@arch-1 ~]$
I've also tried with stream-mode: on-change
, with no sample-interval
.
Am I missing something?
Thanks.
Hi,
You are subscribing to the device hostname
subscriptions:
stream-on-change:
mode: stream
paths:
- /openconfig-system:system/state/hostname
sample-interval: 30s
stream-mode: sample
That path returns a string
value. Prometheus metrics are numeric values (counter, gauge, histogram, and summary)
Try subscribing to something like interface stats, you will get some data.
Hi,
If I subscribe to updates from a particular metric, it appears that the gNMIc 'output' port is opened, but there is no data to scrape.
Output from a working metric: