Lee_K_81 Posted December 17, 2007 Report Posted December 17, 2007 I'm not very experienced in Nagios, or Linux for that matter so hopefully somebody can help me. I've setup a Linux Ubuntu VM. Installed and configured Nagios and it's currently nicely monitoring my windows servers, but i want to it monitor the infrastructure too. I'm starting with a HP Procurve 2650. I've managed to get the a ping monitor working but i'm lead to believe that you can also monitor bandwidth usage, CPU, memory temp, uptime, etc. Here's what i have in my switch.cfg file: # Create a service to PING to switch - this one works define service{ use generic-service ; Inherit values from a template host_name SvrRoom_Cab2_SW1 ; The name of the host the service is associated with service_description PING ; The service description check_command check_ping!200.0,20%!600.0,60% ; The command used to monitor the service normal_check_interval 5 ; Check the service every 5 minutes under normal conditions retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined } # Monitor uptime via SNMP define service{ use generic-service ; Inherit values from a template host_name SvrRoom_Cab2_SW1 service_description Uptime check_command check_snmp!-C public -o sysUpTime.0 } # Monitor Port 1 status via SNMP define service{ use generic-service ; Inherit values from a template host_name SvrRoom_Cab2_SW1 service_description Port 1 Link Status check_command check_snmp!-C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB } # Monitor bandwidth via MRTG logs define service{ use generic-service ; Inherit values from a template host_name SvrRoom_Cab2_SW1 service_description Port 1 Bandwidth Usage check_command check_local_mrtgtraf!/var/lib/mrtg/192.168.1.253_1.log!AVG!1000000,1000000!5000000,5000000!10 } define service{ use generic-service host_name SvrRoom_Cab2_SW1 service_description Memory is_volatile 0 check_period 24x7 max_check_attempts 3 normal_check_interval 5 retry_check_interval 1 notification_interval 60 notification_period 24x7 notification_options c, r check_command check_hpmemoryfree!2000:19000000!1000:19000000 } define service{ use generic-service host_name SvrRoom_Cab2_SW1 service_description CPU is_volatile 0 check_period 24x7 max_check_attempts 3 normal_check_interval 5 retry_check_interval 1 notification_interval 60 notification_period 24x7 notification_options c, r check_command check_hp_cpu!95:90!100:95 } define service{ use generic-service host_name SvrRoom_Cab2_SW1 service_description PowerSupply is_volatile 0 check_period 24x7 max_check_attempts 3 normal_check_interval 5 retry_check_interval 1 notification_interval 60 notification_period 24x7 notification_options c, r check_command check_hppower!4!3:5 } define service{ use generic-service host_name SvrRoom_Cab2_SW1 service_description Temperature is_volatile 0 check_period 24x7 max_check_attempts 3 normal_check_interval 5 retry_check_interval 1 notification_interval 60 notification_period 24x7 notification_options c, r check_command check_hptemp!4!3:5 } define service{ use generic-service host_name SvrRoom_Cab2_SW1 service_description Fan is_volatile 0 check_period 24x7 max_check_attempts 3 normal_check_interval 5 retry_check_interval 1 notification_interval 60 notification_period 24x7 notification_options c, r check_command check_hpfan!4!3:5 } In my commands.cfg file i have: #'check_hpmemoryfree' commnand definition define command{ command_name check_hpmemoryfree command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.11.2.14.11.5.1.1.2.1.1.1.6.1 -w $ARG2$ -c $ARG3$ -u bytes -l free } #'check_hptemp' commnand definition define command{ command_name check_hp_cpu command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0 -t 5 -w $ARG2$ -c $ARG3$ -u % -l '5min CPU' } #'check_hptemp' commnand definition define command{ command_name check_hpfan command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.11.2.14.11.1.2.6.1.4.1 -w $ARG2$ -c $ARG3$ -l 'Fan Status' } #'check_hptemp' commnand definition define command{ command_name check_hppower command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.11.2.14.11.1.2.6.1.4.2 -w $ARG2$ -c $ARG3$ -l 'Power Supply Status' } #'check_hptemp' commnand definition define command{ command_name check_hptemp command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.11.2.14.11.1.2.6.1.4.4 -w $ARG2$ -c $ARG3$ -l 'Temperature Status' } The info on monitoring HP switches i got was from here: http://www.nagiosexchange.org/Wiki_Home.wiki.0.html?&tx_drwiki_pi1%5Bkeyword%5D=HP%20Switches Has anybody successfully got Nagios monitoring their HP switches? thanks in advance.
ChrisH Posted December 17, 2007 Report Posted December 17, 2007 Me and Ric monitor our HP switches using nagios and SNMP. It works fine for us. Are you sure snmp is working properly? Have a look on the edugeek wiki for examples.
Lee_K_81 Posted December 17, 2007 Author Report Posted December 17, 2007 everything looks as though it should work. but i get "(Return code of 127 is out of bounds - plugin may be missing)" in the status. It doesnt say what plugin though. I'm assuming the check_snmp one. If there is a problem with the plugin how do i fix it? See told you I was inexperienced with linux! Thanks. (and sorry)
ChrisH Posted December 17, 2007 Report Posted December 17, 2007 How did you install nagios? Package I assume? Have you actually installed the plugins properly? The plugins are a seperate install usually. CHeck your package manager as well to see if snmp is installed.
Lee_K_81 Posted December 17, 2007 Author Report Posted December 17, 2007 I followed the Nagios Ubuntu Quickstart guide. After doing a bit of digging about i've discovered that check_snmp doesnt appear in the libexec folder. I've tried compliing the check_snmp.c file and get a load of errors. if somebody gave me a compiled check_snmp would that work?
Geoff Posted December 17, 2007 Report Posted December 17, 2007 I think the check_snmp plugin also depends on net-snmp too.
Lee_K_81 Posted December 17, 2007 Author Report Posted December 17, 2007 Ok, so whats the quickest solution to get check_snmp and net_snmp installed? No offence to all the big linux advocates out there, but I really understand why Linux isnt as main-stream as it deserves to be. Don't get me wrong, i like linux and love some of the free apps out there for it, but getting things to work sometimes can be a real PITA.... and that wasnt an invitation for a linux v.s windows v.s mac debate before anyone starts as i've noticed a few people starting arguing (myself included) at the slightest thing on here the past few weeks.
Geoff Posted December 17, 2007 Report Posted December 17, 2007 on ubuntu, the following works. apt-get install nagios-plugins No offence to all the big linux advocates out there, but I really understand why Linux isnt as main-stream as it deserves to be. Don't get me wrong, i like linux and love some of the free apps out there for it, but getting things to work sometimes can be a real PITA It's not Linux' fault you don't know what your doing.
mortstar Posted December 17, 2007 Report Posted December 17, 2007 on ubuntu, the following works. apt-get install nagios-plugins No offence to all the big linux advocates out there, but I really understand why Linux isnt as main-stream as it deserves to be. Don't get me wrong, i like linux and love some of the free apps out there for it, but getting things to work sometimes can be a real PITA It's not Linux' fault you don't know what your doing. OOOOOOOooooooo.....no he didn't! You just got served/F-ed in the A.
Lee_K_81 Posted December 17, 2007 Author Report Posted December 17, 2007 on ubuntu, the following works. apt-get install nagios-plugins No offence to all the big linux advocates out there, but I really understand why Linux isnt as main-stream as it deserves to be. Don't get me wrong, i like linux and love some of the free apps out there for it, but getting things to work sometimes can be a real PITA It's not Linux' fault you don't know what your doing. Lol, like the way you added it afterwards i've admitted i dont know what i'm doing with linux. My point is that sometimes it can be a tad difficult to use, or at least to set-up / configue an app. Once it's up and running it's great but it's that initial set-up. Anyway, i'm actually semi-converting to linux. I'm building myself a linux media center with Linux MCE / MythTV. So i am trying........ ANyway, back on the thread... For some reason using apt-get install nagios-plugins doesn't manage to get a connection. I'm assuming it's to do with the proxy settings. So i've gone into package manager searched for nagios-plugins and marked all for installation. but then i get an error: /var/cache/apt/archives/nagios-plugins-stadard_1.4.5-2ubuntu0.1.i386.deb: trying to overwrite '/usr/lib/nagios/plugins/check_ifoperstatus', which is also in package nagios-plugins-extra it seems to be a dependancy prob, i thin the extra plugins got installed before the standard. any ideas?
Geoff Posted December 17, 2007 Report Posted December 17, 2007 My point is that sometimes it can be a tad difficult to use, or at least to set-up / configue an app. If something is easy to use, it's inherently less powerful. Take your pick. doesn't manage to get a connection. I'm assuming it's to do with the proxy settings. We've discussed proxy issues under Linux and specifically with apt on several occasions. Here's a thread on the subject. http://www.edugeek.net/index.php?name=Forums&file=viewtopic&t=7690 it seems to be a dependancy prob If you fix your proxy problem and use apt-get or preferably aptitute. These will sort your dependacy problem out. If all else fails, remove nagios-plugins-extra and start again.
Lee_K_81 Posted December 17, 2007 Author Report Posted December 17, 2007 My point is that sometimes it can be a tad difficult to use, or at least to set-up / configue an app. If something is easy to use, it's inherently less powerful. Take your pick. doesn't manage to get a connection. I'm assuming it's to do with the proxy settings. We've discussed proxy issues under Linux and specifically with apt on several occasions. Here's a thread on the subject. http://www.edugeek.net/index.php?name=Forums&file=viewtopic&t=7690 it seems to be a dependancy prob If you fix your proxy problem and use apt-get or preferably aptitute. These will sort your dependacy problem out. If all else fails, remove nagios-plugins-extra and start again. By time i read this comment i'd removed the nagios-plugins-extra and that worked out ok, i must be getting a little better maybe. I just copied the check_snmp into the libexec folder and it works. I am getting an Unknown status and no data recieved from device but atleast i'm reaching the device. Thanks for all your help.
Lee_K_81 Posted December 17, 2007 Author Report Posted December 17, 2007 All sorted. Prob was with the SNMP community string. I now can see lots of green which is always good. Thanks for the help.
Ric_ Posted December 17, 2007 Report Posted December 17, 2007 There's an excellent guide on the wiki at http://edugeekwiki.rm-charlton.net/index.php/Nagios to help set up Nagios. There's also stuff about monitoring HP switches at http://www.nagiosexchange.org (I added exactly what you need).
sno Posted September 10, 2009 Report Posted September 10, 2009 Is there an explanation anywhere for the values reported by the swichtes, for example: Temperature: 4 Power Supply status: 4 Fan Status: 4 CPU: 5
archangel Posted July 15, 2011 Report Posted July 15, 2011 All sorted. Prob was with the SNMP community string. I now can see lots of green which is always good. Thanks for the help. I had the same issue, snmp was missing. Resolved installing basic snmp and recompiling nagios plugins. nagios-plugins-1.4.15# apt-get install snmp nagios-plugins-1.4.15# ./configure --with-nagios-user=nagios --with-nagios-group=nagios nagios-plugins-1.4.15# make clean nagios-plugins-1.4.15# make nagios-plugins-1.4.15# make install And green lights appear !
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