Page 1 of 1

Error while using Plugin check_cisco_config.pl

Posted: Mon Oct 08, 2018 4:48 pm
by bhaskarbabar
I am running below command
/usr/local/nagios/libexec/check_cisco_config.pl -H *.*.*.* -C ****-I localhost -T running -L /usr/local/nagios/ -l /usr/local/nagios/tftp

which given below message

No log handling enabled - turning on stderr logging
.1.3.6.1.4.1.9.9.96.1.1.1.1.5.49: Bad value notation (localhost)
TFTP transfer timed out after 60 seconds

I an sending config to local host but it gets timed out.

Re: Error while using Plugin check_cisco_config.pl

Posted: Tue Oct 09, 2018 8:34 am
by scottwilkerson
And you have a TFTP server running on the Nagios box?

Re: Error while using Plugin check_cisco_config.pl

Posted: Tue Oct 09, 2018 12:50 pm
by bhaskarbabar
Yes i have installed tftp server and its runing.

Re: Error while using Plugin check_cisco_config.pl

Posted: Tue Oct 09, 2018 1:05 pm
by scottwilkerson
I don't have a setup to test this but it does specifically say to use an IP address, can you try the command using 127.0.0.1 ?

Also from the docs
Note regarding TFTP server
The files created by your TFTP server must be writable by the Nagios process.
Most TFTP servers in Linux do not respect the permissions of the parent
directory when creating files. Make sure the permissions your TFTP server is
using allow the Nagios process to write to the files.

Sample TFTP setup in Ubuntu Gutsy (maybe works in more recent versions?)
$sudo apt-get install xinetd tftpd tftp
$sudo vi /etc/xinet.d/tftp
Add the following lines to the file and save it
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nagios
group = nagios
server = /usr/sbin/in.tftpd
server_args = /usr/local/nagios/tftp
disable = no
}

$sudo /etc/init.d/xinetd restart

Sample creating and securing directories
$sudo mkdir /usr/local/nagios/cisco_configs
$sudo mkdir /usr/local/nagios/tftp
$sudo chmod -R 775 /usr/local/nagios/cisco_configs
$sudo chmod 770 /usr/local/nagios/tftp
$sudo chown -R nagios /usr/local/nagios/cisco_configs
$sudo chgrp -R nagios /usr/local/nagios/cisco_configs
$sudo chown nagios /usr/local/nagios/tftp
$sudo chgrp nagios /usr/local/nagios/tftp
https://github.com/mrpaulmanley/check_cisco_config

Re: Error while using Plugin check_cisco_config.pl

Posted: Tue Oct 09, 2018 1:38 pm
by bhaskarbabar
As per your suggestion i have replaced localhost with IP address 127.0.0.1 and executed the command and now i am getting below error

/usr/local/nagios/libexec/check_cisco_config.pl -H *.*.*.* -C **** -I 127.0.0.1 -T running -L /usr/local/nagios/ -l/usr/local/nagios/tftp
Error in packet.
Reason: noAccess
Failed object: SNMPv2-SMI::enterprises.9.9.96.1.1.1.1.2.884

TFTP transfer timed out after 60 seconds

Re: Error while using Plugin check_cisco_config.pl

Posted: Tue Oct 09, 2018 1:42 pm
by scottwilkerson
Ok, so now you have it correct, but it looks like the community string you are using is not setup to allow write access, you need to use a read/write community string because the plugin needs to write the IP address to the router's snmp database.

Re: Error while using Plugin check_cisco_config.pl

Posted: Tue Oct 09, 2018 4:43 pm
by bhaskarbabar
ok

as per your suggestion have changed community from RO to RW.

now i am getting below error

Error in packet.
Reason: wrongValue (The set value is illegal or unsupported in some way)
Failed object: SNMPv2-SMI::enterprises.9.9.96.1.1.1.1.5.193

TFTP transfer timed out after 60 seconds

Re: Error while using Plugin check_cisco_config.pl

Posted: Wed Oct 10, 2018 7:07 am
by scottwilkerson
bhaskarbabar wrote:ok

as per your suggestion have changed community from RO to RW.

now i am getting below error

Error in packet.
Reason: wrongValue (The set value is illegal or unsupported in some way)
Failed object: SNMPv2-SMI::enterprises.9.9.96.1.1.1.1.5.193

TFTP transfer timed out after 60 seconds
I'm not totally familiar with this plugin but it is possible that your device doesn't support how it works. You may want to try reaching out to the author and see if they have heard this from other users.