Re: [Nagios-users] check_procs returning wrong data
I finally got it working but it was not that easy. As I am using CentOS 5, by default the requiretty value in the /etc/sudoers file is activated, so I had to edit it like this: #Defaultsrequiretty nagios ALL=(ALL) NOPASSWD:/usr/local/nagios/libexec/check_procs And the command in the .cfg file would be like this: command[check_total_procs]=sudo /usr/local/nagios/libexec/check_procs -w 150 -c 200 Hope it helps!! 2012/6/18 Andreas Ericsson a...@op5.se On 06/18/2012 11:51 AM, Axel Amigo Arnold wrote: Hi Andreas, thank you for the response. I already have the suid bit activated in the check_procs binary as you can see here (I just copied the values of check_icmp) -r-sr-sr-x The user for this binary is root, and the group is nagios (just as check_icmp), but I still can't access the total process list. In the command definition, should I make something like this? command[check_total_procs]=/usr/local/nagios/libexec/sudo check_procs -w 150 -c 200 That might help. Try and find out. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. -- Un saludo, Axel Amigo Arnold -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Help with DISK UNKNOWN - free space: error
Solved! Just changed command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/root to: command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p / nagios user has problems to access to /var/named/chroot/var/run/dbus but now works well. Ernesto Sanchez El 19/06/12 14:06, Ernesto Sanchez escribió: Hello, I've a server with nrpe and the following commands in /usr/local/nagios/etc/nrpe.cfg : command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10 command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20 command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/root command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200 command[check_mem]=/usr/local/nagios/libexec/check_mem.sh 85 95 if I exec in a console /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/root i obtain the following: DISK OK - free space: /var/named/chroot/var/run/dbus 24513 MB (52% inode=88%);| /var/named/chroot/var/run/dbus=21787MB;39005;43881;0;48757 In the nagios server i've the following config file: define host{ use generic-host; Name of host template to us host_name server_name alias alas_server_name address ip_address icon_image base/linux40.jpg statusmap_image base/linux40.gd2 } # Check hda1 define service{ use generic-service host_name server_name service_description Disk check_command check_nrpe!check_hda1 } But nagios report an DISK UNKNOWN - free space: on web interface and the same if I do /usr/lib/nagios/plugins/check_nrpe -H ip_address -c check_hda1 Somebody can help me? A lot of thanks in advance. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] check_procs returning wrong data
I finally got it working but it was not that easy. As I am using CentOS 5, by default the requiretty value in the /etc/sudoers file is activated, so I had to edit it like this: #Defaultsrequiretty nagios ALL=(ALL) NOPASSWD:/usr/local/nagios/libexec/check_procs And the command in the .cfg file would be like this: command[check_total_procs]=sudo /usr/local/nagios/libexec/check_procs -w 150 -c 200 It's a bit safer to use this right before the user and command definition: Defaults:nagios !requiretty That way, you're leaving the restriction in place for *other* users, you're just overriding it for the nagios user. Benny -- Death rays, advanced technology or not, no creature wants to be stabbed in their hoo-hoo.-- Seen on zombiehunters.org -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] Help with DISK UNKNOWN - free space: error
Hello, I've a server with nrpe and the following commands in /usr/local/nagios/etc/nrpe.cfg : command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10 command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20 command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/root command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200 command[check_mem]=/usr/local/nagios/libexec/check_mem.sh 85 95 if I exec in a console /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/root i obtain the following: DISK OK - free space: /var/named/chroot/var/run/dbus 24513 MB (52% inode=88%);| /var/named/chroot/var/run/dbus=21787MB;39005;43881;0;48757 In the nagios server i've the following config file: define host{ use generic-host; Name of host template to us host_name server_name alias alas_server_name address ip_address icon_image base/linux40.jpg statusmap_image base/linux40.gd2 } # Check hda1 define service{ use generic-service host_name server_name service_description Disk check_command check_nrpe!check_hda1 } But nagios report an DISK UNKNOWN - free space: on web interface and the same if I do /usr/lib/nagios/plugins/check_nrpe -H ip_address -c check_hda1 Somebody can help me? A lot of thanks in advance. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Help with DISK UNKNOWN - free space: error
On Tue, Jun 19, 2012 at 1:06 PM, Ernesto Sanchez e.sanc...@libelium.comwrote: Hello, I've a server with nrpe and the following commands in /usr/local/nagios/etc/nrpe.cfg : command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10 command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20 command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/root command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200 command[check_mem]=/usr/local/nagios/libexec/check_mem.sh 85 95 if I exec in a console /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/root i obtain the following: DISK OK - free space: /var/named/chroot/var/run/dbus 24513 MB (52% inode=88%);| /var/named/chroot/var/run/dbus=21787MB;39005;43881;0;48757 In the nagios server i've the following config file: define host{ use generic-host; Name of host template to us host_name server_name alias alas_server_name address ip_address icon_image base/linux40.jpg statusmap_image base/linux40.gd2 } # Check hda1 define service{ use generic-service host_name server_name service_description Disk check_command check_nrpe!check_hda1 } But nagios report an DISK UNKNOWN - free space: on web interface and the same if I do /usr/lib/nagios/plugins/check_nrpe -H ip_address -c check_hda1 Somebody can help me? Check the permissions on the remote server, eg can the NRPE User run the command locally. Ritchie, -- -- http://23.me.uk/2 -- --Time flies like an arrow; fruit flies like a banana. -- A lot of thanks in advance. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Help with DISK UNKNOWN - free space: error
Check in /var/log/messages (or wherever you are logging to) on the server that should be running check_hda1 to ensure that the nagios node is able to communicate via nrpe. Also check you can run /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/root on the nrpe node. Is it owned by the nagios user, does it belong to the nagios group (or whatever you’ve defined for this in nrpe.cfg) Regards, Deborah From: RichTea [mailto:m...@catsnest.co.uk] Sent: 19 June 2012 14:40 To: Nagios Users List Subject: Re: [Nagios-users] Help with DISK UNKNOWN - free space: error On Tue, Jun 19, 2012 at 1:06 PM, Ernesto Sanchez e.sanc...@libelium.commailto:e.sanc...@libelium.com wrote: Hello, I've a server with nrpe and the following commands in /usr/local/nagios/etc/nrpe.cfg : command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10 command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20 command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/root command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200 command[check_mem]=/usr/local/nagios/libexec/check_mem.sh 85 95 if I exec in a console /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/root i obtain the following: DISK OK - free space: /var/named/chroot/var/run/dbus 24513 MB (52% inode=88%);| /var/named/chroot/var/run/dbus=21787MB;39005;43881;0;48757 In the nagios server i've the following config file: define host{ use generic-host; Name of host template to us host_name server_name alias alas_server_name address ip_address icon_image base/linux40.jpg statusmap_image base/linux40.gd2 } # Check hda1 define service{ use generic-service host_name server_name service_description Disk check_command check_nrpe!check_hda1 } But nagios report an DISK UNKNOWN - free space: on web interface and the same if I do /usr/lib/nagios/plugins/check_nrpe -H ip_address -c check_hda1 Somebody can help me? Check the permissions on the remote server, eg can the NRPE User run the command locally. Ritchie, -- -- http://23.me.uk/2 -- --Time flies like an arrow; fruit flies like a banana. -- A lot of thanks in advance. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.netmailto:Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, please delete this e-mail immediately. Any unauthorised distribution or copying is strictly prohibited. Whilst Kognitio endeavours to prevent the transmission of viruses via e-mail, we cannot guarantee that any e-mail or attachment is free from computer viruses and you are strongly advised to undertake your own anti-virus precautions. Kognitio grants no warranties regarding performance, use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null