#586 check_snmp can't do IPv6


root@monitor1:/usr/src/nagiosplug/plugins# ./check_snmp --version
check_snmp v1.4.16.72.gf4bbd (nagios-plugins 1.4.16)
root@monitor1:/usr/src/nagiosplug/plugins# ./check_snmp -H 'ipv6.hostname.example' -C 'public' -o '.'
External command error: getaddrinfo: ipv6.hostname.example Name or service not known

Neither can 1.4.14.


  • Marc LEURENT

    Marc LEURENT - 2013-02-11

    Good afternoon, I am having the same problem,
    I cannot use check_snmp and set an IPv6 format address in -H parameter like for other checks (check_ssh / check_http / check_imap / ...)
    I need to specify the ip with an "udp6" prefix, so I cannot integrate snmp check as easily as the other checks
    s someone with enough C knowledge to adapt the check_snmp to be able to identify IPv6 address like the other checks

    1) Here you can see that IPv6 format is allowed in check_ssh
    (SCREEN):root@centreon-01-dev:[~/nagios-plugins]# ./check_ssh -H "::1"
    SSH OK - OpenSSH_6.0p1 Debian-3 (protocol 2.0) | time=0.391935s;;;0.000000;10.000000

    2) Here you can see that the same IPv6 format is now allowed in check_snmp
    (SCREEN):root@centreon-01-dev:[~/nagios-plugins]# ./check_snmp -H "::1" -C public -o .
    External command error: snmpget: Unknown host (::1:161) (No such file or directory)
    zsh: exit 3

    3) Here you can see that we have to specify "udp6" prefix + "[]" to have the check working in IPv6, but this will be harder to integrate to check services based on the IP of the host
    (SCREEN):root@centreon-01-dev:[~/nagios-plugins]# ./check_snmp -H "udp6:[::1]" -C public -o .
    SNMP OK - Timeticks: (232327) 0:38:43.27 |


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks