czerwonk / junos_exporter

Exporter for devices running JunOS to use with https://prometheus.io/
MIT License
198 stars 81 forks source link

EX4550-F32 (15.1R7) fails to query interfaces #167

Open mweinelt opened 2 years ago

mweinelt commented 2 years ago

When queried via the exporter we reliably see the querying of interfaces failing. Please see the log output of exporter and switch below.

I tested the command on the device and that works just fine. I also tested the command from the relevant user on the exporters machine and that works as well, so likely a shortcoming of Go's SSH implementation.

JunOS

Version: 15.1R7-S8.1

| 2022-01-06 13:35:35 | %INTERACT-6-UI_CMDLINE_READ_LINE: User 'monitoring', command 'show interfaces extensive | display xml '
[...]
| 2022-01-06 13:35:46 | %INTERACT-6-UI_CHILD_STATUS: Cleanup child '/sbin/ifinfo', PID 66042, status 0xf
| 2022-01-06 13:35:46 | %DAEMON-3-UI_CHILD_SIGNALED: Child received signal: PID 66042, signal Terminated: 15, command='/sbin/ifinfo'
| 2022-01-06 13:35:46 | %INTERACT-6-UI_LOGOUT_EVENT: User 'monitoring' logout

Exporter

Version: 0.9.13

junos_exporter[1478]: time="2022-01-06T13:35:45+01:00" level=error msg="Interfaces: could not run command: wait: remote command exited without exit status or exit signal"
junos_exporter[1478]: time="2022-01-06T13:35:47+01:00" level=info msg="Lost connection to ex4550.example.com (ssh: max packet length exceeded). Trying to reconnect..."