Error while using Plugin check_cisco_config.pl

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
bhaskarbabar
Posts: 19
Joined: Tue Jun 05, 2018 6:48 am

Error while using Plugin check_cisco_config.pl

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Error while using Plugin check_cisco_config.pl

Post by scottwilkerson »

And you have a TFTP server running on the Nagios box?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
bhaskarbabar
Posts: 19
Joined: Tue Jun 05, 2018 6:48 am

Re: Error while using Plugin check_cisco_config.pl

Post by bhaskarbabar »

Yes i have installed tftp server and its runing.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Error while using Plugin check_cisco_config.pl

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
bhaskarbabar
Posts: 19
Joined: Tue Jun 05, 2018 6:48 am

Re: Error while using Plugin check_cisco_config.pl

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Error while using Plugin check_cisco_config.pl

Post 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.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
bhaskarbabar
Posts: 19
Joined: Tue Jun 05, 2018 6:48 am

Re: Error while using Plugin check_cisco_config.pl

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Error while using Plugin check_cisco_config.pl

Post 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.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked