soapyfish Posted April 21, 2010 Posted April 21, 2010 (edited) Hi, I am setting up Nagios for the first time, I want it to monitor all my servers and infrastructure and internet connection. So far I have it Monitoring them all in basic ways (ping and public services) I am trying to get the check_snmp to work for all the managed HP switches, I have looked at the switches config and SNMP is enabled and the "Read Community" ID is "public" when I have the following lines uncommented in the config and run the preflight check I get the error listed at the bottom of the post. it seems to be telling me that the I have not defined check_snmp but it cannot see where it wants it to be ? # # Monitor uptime via SNMP # define service{ use generic-service ; Inherit values from a template host_name R9-1800-24G service_description Uptime check_command check_snmp! -C public -o sysUpTime.0 } Reading configuration data... Running pre-flight check on configuration data... Checking services... Error: Service check command 'check_snmp' specified in service 'Uptime' for host 'R9-1800-24G' not defined anywhere! Edited April 21, 2010 by soapyfish
soapyfish Posted April 21, 2010 Author Posted April 21, 2010 How can I "know" I located check_snmp in the following places /usr/lib/nagios/plugins/check_snmp.cfg /etc/nagios-plugins/config/snmp.cfg there is however NO reference to snmp inside the command.cfg but there are these lines ################################################################################ # HOST CHECK COMMANDS ################################################################################ # On Debian, check-host-alive is being defined from within the # nagios-plugins-basic package
pete Posted April 21, 2010 Posted April 21, 2010 (edited) In /usr/local/nagios/etc/objects/commands.cfg (alter path depending on where you have nagios installed) you should have an entry line similar to: # 'check_snmp' command definition define command{ command_name check_snmp command_line $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$ } If you've written your checks in custom-commands.cfg, ensure the file is referenced in nagios.cfg edit: You should have a check_snmp binary somewhere (no extension). If not, check you've got nagios-plugins installed - search apt for "nagios". Edited April 21, 2010 by pete 1
powdarrmonkey Posted April 21, 2010 Posted April 21, 2010 In /usr/local/nagios/etc/objects/commands.cfg (alter path depending on where you have nagios installed) In the Ubuntu package, it's /etc/nagios-plugins/config/snmp*.cfg. If you don't see that directory, you haven't installed the nagios-plugins package.
soapyfish Posted April 21, 2010 Author Posted April 21, 2010 Thanks pete, that worked a treat I think I was getting caught out by ubuntu's pre-packed package thanks Again, its on to monitoring the Windows Services next.
soapyfish Posted April 22, 2010 Author Posted April 22, 2010 I have another question, Now that I have the snmp monitoring of my layer 2 and 3 switches I am getting data on CPU usage,power,fan, etc. My question is when the reported data states things like, CPU OK - 7 FAN OK - 4 FREE_MEM OK - 4 What does the number actually mean, whats the scale ? is 1 good and 10 bad or vice versa or what ? I see that by editing the service definitions I can change the size of the numbers but I do not fully understand what it means really. Does anyone have any info on this stuff or is it as simple as "OK-4" mean its all ok ! Thanks
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now