+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 17
*nix Thread, Monitoring HP Switches in Nagios in Technical; I'm not very experienced in Nagios, or Linux for that matter so hopefully somebody can help me. I've setup a ...
  1. #1

    Join Date
    Jan 2007
    Location
    Birmingham
    Posts
    807
    Thank Post
    29
    Thanked 36 Times in 24 Posts
    Rep Power
    26

    Monitoring HP Switches in Nagios

    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:

    Code:
    # 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:
    Code:
    #'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_H...=HP%20Switches

    Has anybody successfully got Nagios monitoring their HP switches?

    thanks in advance.

  2. #2
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    5,002
    Thank Post
    120
    Thanked 282 Times in 260 Posts
    Rep Power
    108

    Re: Monitoring HP Switches in Nagios

    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.
    Attached Images Attached Images

  3. #3

    Join Date
    Jan 2007
    Location
    Birmingham
    Posts
    807
    Thank Post
    29
    Thanked 36 Times in 24 Posts
    Rep Power
    26

    Re: Monitoring HP Switches in Nagios

    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)

  4. #4
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    5,002
    Thank Post
    120
    Thanked 282 Times in 260 Posts
    Rep Power
    108

    Re: Monitoring HP Switches in Nagios

    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.

  5. #5

    Join Date
    Jan 2007
    Location
    Birmingham
    Posts
    807
    Thank Post
    29
    Thanked 36 Times in 24 Posts
    Rep Power
    26

    Re: Monitoring HP Switches in Nagios

    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?

  6. #6

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Monitoring HP Switches in Nagios

    I think the check_snmp plugin also depends on net-snmp too.

  7. #7

    Join Date
    Jan 2007
    Location
    Birmingham
    Posts
    807
    Thank Post
    29
    Thanked 36 Times in 24 Posts
    Rep Power
    26

    Re: Monitoring HP Switches in Nagios

    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.

  8. #8

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Monitoring HP Switches in Nagios

    on ubuntu, the following works.

    Code:
    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.

  9. #9
    mortstar's Avatar
    Join Date
    Jan 2007
    Location
    Oxford
    Posts
    341
    Thank Post
    12
    Thanked 29 Times in 18 Posts
    Rep Power
    21

    Re: Monitoring HP Switches in Nagios

    Quote Originally Posted by Geoff
    on ubuntu, the following works.

    Code:
    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.

  10. #10

    Join Date
    Jan 2007
    Location
    Birmingham
    Posts
    807
    Thank Post
    29
    Thanked 36 Times in 24 Posts
    Rep Power
    26

    Re: Monitoring HP Switches in Nagios

    Quote Originally Posted by Geoff
    on ubuntu, the following works.

    Code:
    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........ :cry:

    ANyway, back on the thread...

    For some reason using
    Code:
    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?

  11. #11

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Monitoring HP Switches in Nagios

    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?nam...ewtopic&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.

  12. #12

    Join Date
    Jan 2007
    Location
    Birmingham
    Posts
    807
    Thank Post
    29
    Thanked 36 Times in 24 Posts
    Rep Power
    26

    Re: Monitoring HP Switches in Nagios

    Quote Originally Posted by Geoff
    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?nam...ewtopic&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.

  13. #13

    Join Date
    Jan 2007
    Location
    Birmingham
    Posts
    807
    Thank Post
    29
    Thanked 36 Times in 24 Posts
    Rep Power
    26

    Re: Monitoring HP Switches in Nagios

    All sorted. Prob was with the SNMP community string. I now can see lots of green which is always good.

    Thanks for the help.

  14. #14

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,593
    Thank Post
    109
    Thanked 764 Times in 595 Posts
    Rep Power
    181

    Re: Monitoring HP Switches in Nagios

    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 www.nagiosexchange.org (I added exactly what you need).

  15. #15

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Monitoring HP Switches in Nagios

    No problem.

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Nagios Problem
    By sqdge in forum *nix
    Replies: 12
    Last Post: 13th January 2012, 10:11 AM
  2. Replies: 51
    Last Post: 10th November 2009, 05:23 AM
  3. Ubuntu Nagios
    By plexer in forum How do you do....it?
    Replies: 2
    Last Post: 10th May 2007, 09:21 PM
  4. Anyone using Dell Core switches/edge switches.
    By tosca925 in forum Wireless Networks
    Replies: 13
    Last Post: 6th February 2007, 09:10 AM
  5. Loving Nagios!
    By Ric_ in forum *nix
    Replies: 33
    Last Post: 22nd October 2006, 10:38 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •