SNMP error.

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.

SNMP error.

Postby UndMe » Sat Dec 01, 2018 8:23 am

Hello, I am having problems when configuring the SNMP services in nagios for a cisco 2960G switch.
I can not get the two functions that use SNMP that are: port status and uptime.

I leave a photo so you can see what error is giving me, and if you can help me.

Thank you.

Edit:

I have SNMP protocol enabled on the switch and I can access without problem with the following command:

snmpwalk -v1 -c public 192.168.1.17 |more
Attachments
nagios.PNG
nagios2.PNG
UndMe
 
Posts: 10
Joined: Thu Nov 22, 2018 6:40 pm

Re: SNMP error.

Postby cdienger » Mon Dec 03, 2018 3:53 pm

Can you provide the configuration for these two checks? Also try running the commands directly on the command line and provide the commands and outputs.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 2191
Joined: Tue Feb 07, 2017 11:26 am

Re: SNMP error.

Postby UndMe » Mon Dec 03, 2018 5:14 pm

cdienger wrote:Can you provide the configuration for these two checks? Also try running the commands directly on the command line and provide the commands and outputs.


The photos of the configuration I leave in the message, the commands that I have to try directly on the command line do not know what they are.

I have put the number 10101 in operstatus because I'm trying, with 1 also gave me the same problem.

thanks.
Attachments
nagios2.PNG
nagios2.PNG (7.23 KiB) Viewed 104 times
nagios1.PNG
nagios1.PNG (6.47 KiB) Viewed 104 times
UndMe
 
Posts: 10
Joined: Thu Nov 22, 2018 6:40 pm

Re: SNMP error.

Postby cdienger » Tue Dec 04, 2018 5:06 pm

The commands would look like:

./check_snmp -H SW-CISCO-2906_address -C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB
./check_snmp -H SW-CISCO-2906_address -C public -o sysUPtime.0


Run these as nagios by running this first:

su - nagios

Make sure that RFC1213-MIB.txt is in /usr/share/snmp/mibs/ and the permissions give everyone read access:

chmod 644 /usr/share/snmp/mibs/RFC1213-MIB.txt
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 2191
Joined: Tue Feb 07, 2017 11:26 am

Re: SNMP error.

Postby UndMe » Fri Dec 07, 2018 7:14 am

cdienger wrote:The commands would look like:

./check_snmp -H SW-CISCO-2906_address -C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB
./check_snmp -H SW-CISCO-2906_address -C public -o sysUPtime.0


Run these as nagios by running this first:

su - nagios

Make sure that RFC1213-MIB.txt is in /usr/share/snmp/mibs/ and the permissions give everyone read access:

chmod 644 /usr/share/snmp/mibs/RFC1213-MIB.txt


When I execute the two commands that you have told me, it gives me a message: permission denied.
I have to change SW-CISCO-2960_address by the ip address of my switch?

The file 1213-MIB.txt I do not have it in the directory that you told me.
Attachments
nagios2.PNG
nagios2.PNG (10.69 KiB) Viewed 67 times
nagios1.PNG
UndMe
 
Posts: 10
Joined: Thu Nov 22, 2018 6:40 pm

Re: SNMP error.

Postby cdienger » Fri Dec 07, 2018 3:23 pm

Try:

/usr/local/nagios/libexec/check_snmp -H SW-CISCO-2906_address -C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB
/usr/local/nagios/libexec/check_snmp -H SW-CISCO-2906_address -C public -o sysUPtime.0
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 2191
Joined: Tue Feb 07, 2017 11:26 am

Re: SNMP error.

Postby UndMe » Sun Dec 09, 2018 7:10 pm

cdienger wrote:Try:

/usr/local/nagios/libexec/check_snmp -H SW-CISCO-2906_address -C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB
/usr/local/nagios/libexec/check_snmp -H SW-CISCO-2906_address -C public -o sysUPtime.0


When I execute the commands I get the following errors. (look photo)
I change the name of SW-CISCO-2906_address by the ip address of the switch, I think it should work as well.

In the next command:
/usr/local/nagios/libexec/check_snmp -H SW-CISCO-2906_address -C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB

change: ifOperStatus.1 by ifOperStatus.10101 because when I execute the command to see the port number on the switch it tells me that number for port 1:

show snmp mib ifmib ifindex
Attachments
nagios2.PNG
nagios error.PNG
UndMe
 
Posts: 10
Joined: Thu Nov 22, 2018 6:40 pm

Re: SNMP error.

Postby cdienger » Mon Dec 10, 2018 3:09 pm

Attached is a copy of RFC1213-MIB.txt. Copy it to /usr/share/snmp/mibs/RFC1213-MIB.txt, and set the permissions so everyone can read it:

chmod 664 /usr/share/snmp/mibs/RFC1213-MIB.txt

then test again and let us know your results.
Attachments
RFC1213-MIB.txt
(77.8 KiB) Downloaded 2 times
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 2191
Joined: Tue Feb 07, 2017 11:26 am

Re: SNMP error.

Postby UndMe » Tue Dec 11, 2018 4:48 pm

cdienger wrote:Attached is a copy of RFC1213-MIB.txt. Copy it to /usr/share/snmp/mibs/RFC1213-MIB.txt, and set the permissions so everyone can read it:

chmod 664 /usr/share/snmp/mibs/RFC1213-MIB.txt

then test again and let us know your results.


I have the same problem.
With the two commands I get an error.
Attachments
nagios2.PNG
nagios2.PNG (4.86 KiB) Viewed 9 times
nagios.PNG
UndMe
 
Posts: 10
Joined: Thu Nov 22, 2018 6:40 pm


Return to Nagios Core

Who is online

Users browsing this forum: prkngs and 25 guests