Hi,
I´ve tried to use the check_snmp plugins with IPv6, but it didn't work. A quick check into the code of a few o them revealed the issue quite quickly. They all use snmpwalk to make the actual communication. The problem is that to use IPv6, snmpwalk requires that the string "udp6:" must be added to the beginning of the hostname or IPv6 address. For example (in check_snmp_cpu):
...
for NUMERO in `$CMD_SNMPWALK -t 2 -r 2 -v 1 -c $COMMUNITY $HOSTNAME $OID_PROCESSID | $CMD_AWK '{ print $1 }' | $CMD_AWK -F "." '{print $NF}'`
do
....
For the IPv6 case would have to be something like
..
$HOSTNAME="udp6:${HOSTNAME}"
for NUMERO in `$CMD_SNMPWALK -t 2 -r 2 -v 1 -c $COMMUNITY $HOSTNAME $OID_PROCESSID | $CMD_AWK '{ print $1 }' | $CMD_AWK -F "." '{print $NF}'`
do
....
A quick checking logic on the format of the address could add this to the address if IPv6 is detected. Could someone add this to the upstream code in the nagios plugins?
Thank you,
Roberto Greiner
Check_snmp with ipv6
Re: Check_snmp with ipv6
Would you like to file this as a bug on the Nagios Plugins Github page?
https://github.com/nagios-plugins/nagios-plugins/
Posting issues on the forum is fine, but for plugin bugs specifically it's usually best to put things on Github. That way it gets noticed immediately and the workflow can start sooner.
https://github.com/nagios-plugins/nagios-plugins/
Posting issues on the forum is fine, but for plugin bugs specifically it's usually best to put things on Github. That way it gets noticed immediately and the workflow can start sooner.
Former Nagios employee
Re: Check_snmp with ipv6
Ok.
I've opened an issue in https://github.com/nagios-plugins/nagio ... /issues/84
Thank you,
Roberto Greiner
I've opened an issue in https://github.com/nagios-plugins/nagio ... /issues/84
Thank you,
Roberto Greiner
Re: Check_snmp with ipv6
I left a not over on github and am looking into this. Can you try running an snmpget (as check_snmp using snmp-get instead of snmpwalk) with the syntax mentioned on the net-snmp page?
http://www.net-snmp.org/wiki/index.php/ ... cations_28
http://www.net-snmp.org/wiki/index.php/ ... cations_28
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Check_snmp with ipv6
I tried both running snmpget from the command line and modifying check_snmp_cpu (which is script language and not compiled) to use snmpget, and in both cases, adding 'udp6:' worked. Unlike described in the indicated documentation, neither adding quotes nor adding square brackets was not necessary, both for snmpget and check_snmp_cpu.
Re: Check_snmp with ipv6
We can continue this discussion on GitHub if need be since an issue has been posted (I added my two cents). I'll be closing this thread now.
Former Nagios employee
Re: Check_snmp with ipv6
I should be pushing some code to a github branch later today to add this feature. More details coming soon.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Check_snmp with ipv6
I pushed a commit today to address this:
https://github.com/nagios-plugins/nagio ... /issues/84
https://github.com/nagios-plugins/nagio ... /issues/84
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.