I'm a novice with linux having only played around with it on my home computer, however for my apprenticeship they have asked me to setup Nagios on a Linux server - I've gotten the LAMP server up and running (Ubuntu 12.10) and have got cacti up and running however Nagios is causing my head to hurt.
Nagios is up and running and can be accessed remotely using the localhosts IP address. First off we had authentifcation issues after logging into the account - i'm not sure if the issue i'm having now is a remnant of the prior issue i just mentioned. (Apologises for rambling)
I have added a switch which pings fine with Nagios (I think it does at least), however I tried to monitor ports via SNMP and have come up with this error
"External command error: MIB search path: $HOME/.snmp/mibs:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp"
I've installed the plugins and checked that they are where they should be and they seem to be though perhaps i've installed them incorrectly - I've reinstalled them since i installed it the first time following instructions.
This is probably a simple fix staring me in the face!
Let me know if there is anything that i need to provide (and how to provide it if possible)
Any help would be much apprecitated.
(Apologises if you have seen this question before)
As I recall with the nagios package on ubuntu the binary for querying SNMP isn't where it is expected to be. You need to find it and then either add it to the path OR alter the commands config file to point explicitly to it OR copy the binary into the Nagios bin directory.
By chance do you remember places to check?
Thanks for your comment, it's a lead to follow (:
You are looking for a binary file check_snmp. So
sudo find / -name check_snmp
Should tell you where the file is (if you have it).
I think it should really be in /usr/lib/nagios/plugins/
(should I add these need to be run from a shell??)
Lol I maybe a novice but not that much of one xD I didn't know that command however.
The file check_snmp is located in /usr/lib/nagios/plugins.. It was there by default I didn't have to move it. Though it is also located in /usr/local/nagios/libexec/ as well - is this a problem?
It shouldn't be. Check your commands.cfg in /usr/local/nagios/etc . Does it have a line :
(You should also see a check_ping command in there?).
# 'check_snmp' command definition
command_line $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$
Attachment 17661Attachment 17662
Sorry for the late reply was at a meeting - both lines are present however the snmp one is different to the one you posted
Ok. So what did you do to monitor ports on a switch? Presumably you have something in service.cfg?
check_command check_snmp!-C [*******] -o .184.108.40.206.220.127.116.11.0
You can also go into (say) /usr/local/nagios/libexec and run check_snmp manually :
Sanity check = /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
is quite helpful.
ps - you can copy and paste configs - it isn't windows.
I think you will need more arguments on the check_snmp command in commands.cfg. It should do no harm to add more $ARG params, they will just be ignored if no value is given.
Here's the switch config - I used the template present so i'm guessing now that i've not changed something that i should have
what are the ARG params? - going to add them in now
Ive just used this command and it has returned 0 warnings 0 errors
Originally Posted by CyberNerd
Restarted nagios and checked to see if changes made would fix the issue, no such luck ): I'll be back in 30m-60ms
Thanks for the help so far
Is this doc any use? It's the one I used to setup Nagios. Version numbers are slightly different but the setup is still the same.
Nagios Installation On Ubuntu 10.04 (Lucid Lynx) - Page 3 | HowtoForge - Linux Howtos and Tutorials