Error while using Plugin check_cisco_config.pl

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Error while using Plugin check_cisco_config.pl

Postby bhaskarbabar » Mon Oct 08, 2018 4:48 pm

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.
bhaskarbabar
 
Posts: 18
Joined: Tue Jun 05, 2018 6:48 am

Re: Error while using Plugin check_cisco_config.pl

Postby scottwilkerson » Tue Oct 09, 2018 8:34 am

And you have a TFTP server running on the Nagios box?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12020
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Error while using Plugin check_cisco_config.pl

Postby bhaskarbabar » Tue Oct 09, 2018 12:50 pm

Yes i have installed tftp server and its runing.
bhaskarbabar
 
Posts: 18
Joined: Tue Jun 05, 2018 6:48 am

Re: Error while using Plugin check_cisco_config.pl

Postby scottwilkerson » Tue Oct 09, 2018 1:05 pm

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12020
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Error while using Plugin check_cisco_config.pl

Postby bhaskarbabar » Tue Oct 09, 2018 1:38 pm

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
bhaskarbabar
 
Posts: 18
Joined: Tue Jun 05, 2018 6:48 am

Re: Error while using Plugin check_cisco_config.pl

Postby scottwilkerson » Tue Oct 09, 2018 1:42 pm

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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12020
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Error while using Plugin check_cisco_config.pl

Postby bhaskarbabar » Tue Oct 09, 2018 4:43 pm

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
bhaskarbabar
 
Posts: 18
Joined: Tue Jun 05, 2018 6:48 am

Re: Error while using Plugin check_cisco_config.pl

Postby scottwilkerson » Wed Oct 10, 2018 7:07 am

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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12020
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot] and 9 guests