Hello,
I have problems to use telegraf to collect statistics from juniper switches. Using jtimon, all works fine. What I’m doing wrong?
2021-10-13T14:08:49Z I! Starting Telegraf 1.20.2
2021-10-13T14:08:49Z D! [agent] Initializing plugins
2021-10-13T14:08:49Z D! [agent] Starting service inputs
2021-10-13T14:08:49Z D! [inputs.jti_openconfig_telemetry] Opened a new gRPC session to myswitch on port 50051
2021-10-13T14:08:49Z D! [agent] Stopping service inputs
2021-10-13T14:08:49Z E! [inputs.jti_openconfig_telemetry] Error in plugin: could not subscribe to myswitch: rpc error: code = Canceled desc = grpc: the client connection is closing
2021-10-13T14:08:49Z E! [inputs.jti_openconfig_telemetry] Error in plugin: could not subscribe to myswitch: rpc error: code = Canceled desc = grpc: the client connection is closing
2021-10-13T14:08:49Z E! [inputs.jti_openconfig_telemetry] Error in plugin: could not subscribe to myswitch: rpc error: code = Canceled desc = grpc: the client connection is closing
2021-10-13T14:08:49Z E! [inputs.jti_openconfig_telemetry] Error in plugin: could not subscribe to myswitch: rpc error: code = Canceled desc = grpc: the client connection is closing
2021-10-13T14:08:49Z E! [inputs.jti_openconfig_telemetry] Error in plugin: could not subscribe to myswitch: rpc error: code = Canceled desc = grpc: the client connection is closing
2021-10-13T14:08:49Z D! [agent] Input channel closed
2021-10-13T14:08:49Z D! [agent] Processor channel closed
2021-10-13T14:08:49Z D! [agent] Processor channel closed
2021-10-13T14:08:49Z D! [agent] Stopped Successfully
2021-10-13T14:08:49Z E! [telegraf] Error running agent: input plugins recorded 5 errors
config in the myswitch:
set system services extension-service request-response grpc clear-text port 50051
set system services extension-service request-response grpc skip-authentication
set system services extension-service notification allow-clients address 0.0.0.0/0
config for telegraf:
[[inputs.jti_openconfig_telemetry]]
servers = [“myswitch:50051”]
sample_frequency = “60000ms”
username = “”
password = “”
client_id = “mytest”
sensors = [“interfaces /junos/system/linecard/interface/”,
“ifaceDesc /interfaces/interface/state/description/”,
“lsps /junos/services/label-switched-path/usage/”,
“cpu /junos/system/linecard/cpu/memory/”,
“npu /junos/system/linecard/npu/memory/”,
]
str_as_tags = true
Errors received within the same second, so no timeout is happening. As said before, jtimon works fine (GitHub - nileshsimaria/jtimon: Junos Telemetry Interface client)
What’s wrong?
regards,
Hugo