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
SNMP error.
Re: SNMP error.
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.
Re: SNMP error.
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.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.
I have put the number 10101 in operstatus because I'm trying, with 1 also gave me the same problem.
thanks.
- Attachments
-
- nagios2.PNG (7.23 KiB) Viewed 3692 times
-
- nagios1.PNG (6.47 KiB) Viewed 3692 times
Re: SNMP error.
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
./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.
Re: SNMP error.
When I execute the two commands that you have told me, it gives me a message: permission denied.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
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.
Re: SNMP error.
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
/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.
Re: SNMP error.
When I execute the commands I get the following errors. (look photo)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
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
Re: SNMP error.
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.
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 305 times
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: SNMP error.
I have the same problem.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.
With the two commands I get an error.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: SNMP error.
What operating system are you on? I think you are missing several of the standard MIBs that should have been installed by default when you installed net-snmp