Re: [Nagios-users] Nagios and SELinx

2013-03-13 Thread Jonathan Gazeley
On 13/03/13 10:18, Andreas Ericsson wrote:
 On 03/13/2013 12:01 AM, Stephen H. Dawson wrote:
 Can Nagios run under SELinux?

 Yes it can, but the requirements to do so are close to permissive,
 since there's a plethora of programs (plugins) that run under the
 Nagios umbrella.

 In order for it to be possible, Nagios needs permissions to:
 * create any number of outgoing network sockets
 * create incoming network sockets (as some plugins work by setting
up a listener and then sending a request)
 * create raw sockets (for ping)
 * execute suid root programs (for ping)
 * create, modify and write files, pipes and sockets on the local fs
 * connect to local sockets (for local database checks)
 * fork() and run without a tty
 * probably a bunch of other things

 It's quite a daunting task to get everything right with regards to
 selinux, which is why I guess noone's done it yet.


We run Nagios under SELinux. It took a bit of tweaking, but now it works 
reliably.

Put your Nagios server and monitored clients into Permissive mode, run 
all the plugins that you need, and capture the log output from 
/var/log/audit/audit.log. Simply pass the relevant lines from audit.log 
through the audit2allow tool, which will generate the relevant SELinux 
policy. It might take several iterations of this to capture all possible 
violations of SELinux policy but once you've caught them all you can 
easily generate policy files for Nagios, NRPE, NSCA and other plugins 
which can then be deployed and installed on all your machines.

The end result is a fairly permissive SELinux policy *for Nagios* but 
still far better than not having SELinux at all.

Cheers,
Jonathan

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
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] Defining passive checks

2012-08-16 Thread Jonathan Gazeley
Hi Mohamed,

Thanks for your response - this worked.

Have a nice day,
Jonathan


On 16/08/12 08:08, mohamed ben romdhane wrote:
 Hello Jonathan,

 I think that you must put
 define service {
  service_descriptionOracle
  host_name  oddjob.resnet.bris.ac.uk
  useresnet-service
 max_check_attempts1
 check_freshness 1
  freshness_threshold 86400
 check_command   check_dummy!1 no news since 24h
 }
 = The check_dummy command will run if no passive check has been
 received within 24 hours (86400seconds) and display warnig alert (1)
 and info status no news since 24h

 Regards,
 Mohamed
 
 *De :* Jonathan Gazeley jonathan.gaze...@bristol.ac.uk
 *À :* nagios-users@lists.sourceforge.net
 *Envoyé le :* Mercredi 15 août 2012 15h07
 *Objet :* [Nagios-users] Defining passive checks

 I'm a long-time user of Nagios with active checks. Today I started using
 passive checks with NSCA and I'm having a problem.

 The documentation states A service must be defined in Nagios before you
 can submit passive check results for it.

 I defined a config block like this, to define a service for the Oracle
 service that I want to monitor passively - omitting the check_command
 directive.

 define service {
  service_descriptionOracle
  host_name  oddjob.resnet.bris.ac.uk
  useresnet-service
 }



 But running nagios -v gives this output:

 Error: Service description, host name, or check command is NULL
 Error: Could not register service (config file
 '/etc/nagios/nagios_service.cfg', starting on line 8618)
  Error processing object config files!


 So what's the approved way of defining a service without specifying a
 command for active checks?

 Thanks,
 Jonathan

 --
 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
 mailto: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



--
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] Defining passive checks

2012-08-15 Thread Jonathan Gazeley
I'm a long-time user of Nagios with active checks. Today I started using 
passive checks with NSCA and I'm having a problem.

The documentation states A service must be defined in Nagios before you 
can submit passive check results for it.

I defined a config block like this, to define a service for the Oracle 
service that I want to monitor passively - omitting the check_command 
directive.

define service {
 service_descriptionOracle
 host_name  oddjob.resnet.bris.ac.uk
 useresnet-service
}



But running nagios -v gives this output:

Error: Service description, host name, or check command is NULL
Error: Could not register service (config file 
'/etc/nagios/nagios_service.cfg', starting on line 8618)
Error processing object config files!


So what's the approved way of defining a service without specifying a 
command for active checks?

Thanks,
Jonathan

--
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] Nagios servicegroup dependencies

2012-07-26 Thread Jonathan Gazeley
Thanks - BPI looks useful.

Cheers,
Jonathan


On 25/07/12 15:44, Alex Griffin wrote:
 I don't think that this can be done with just Nagios dependencies. You
 could set up BPI to accomplish this though. Check it out here:


 http://exchange.nagios.org/directory/Addons/Components/Nagios-Business-Process-Intelligence-%28BPI%29/details

 Alex Griffin
 ---
 Tech Team
 agrif...@nagios.com

 Jonathan Gazeley wrote:
 Hi list,

 I have a question about servicegroups and dependencies. I have a number
 of hosts and services and I am already host parents, host groups, host
 dependencies, service groups and service dependencies.

 Imagine I have 2 database servers, and I have a web server that depends
 on the database service. I want the HTTP service to depend on the MySQL
 service *group* rather than on individual MySQL services. So long as
 there is at least one database server up, the database service keeps on
 working. How can I express this?

 The same goes for groups of DHCP, DNS, NTP, RADIUS servers... :)

 Thanks,
 Jonathan

 --
 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



--
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] Nagios servicegroup dependencies

2012-07-25 Thread Jonathan Gazeley
Hi list,

I have a question about servicegroups and dependencies. I have a number 
of hosts and services and I am already host parents, host groups, host 
dependencies, service groups and service dependencies.

Imagine I have 2 database servers, and I have a web server that depends 
on the database service. I want the HTTP service to depend on the MySQL 
service *group* rather than on individual MySQL services. So long as 
there is at least one database server up, the database service keeps on 
working. How can I express this?

The same goes for groups of DHCP, DNS, NTP, RADIUS servers... :)

Thanks,
Jonathan

--
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] Dynamic warning/critical thresholds

2012-07-10 Thread Jonathan Gazeley
On 22/06/12 15:11, Jonathan Gazeley wrote:
 I've got a bunch of Nagios plugins that monitor things like
 DNS/HTTP/RADIUS hits per second.

 I've set what I believe to be sensible max/min warning thresholds but
 what I really want is dynamic thresholds. If some quantity suddenly
 doubles or halves, I'd like an alert.

 For example, if I usually serve 10 DNS lookups per second, and suddenly
 it is doing 20 per second, that isn't a fault but I would like to know
 about it, because it might mean there is a problem with the network in
 general.

 Is there a way of doing this?


Any ideas?

Thanks,
Jonathan

--
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] Dynamic warning/critical thresholds

2012-07-10 Thread Jonathan Gazeley
On 10/07/12 14:47, C. Bensend wrote:

 On 22/06/12 15:11, Jonathan Gazeley wrote:
 I've got a bunch of Nagios plugins that monitor things like
 DNS/HTTP/RADIUS hits per second.

 I've set what I believe to be sensible max/min warning thresholds but
 what I really want is dynamic thresholds. If some quantity suddenly
 doubles or halves, I'd like an alert.

 For example, if I usually serve 10 DNS lookups per second, and suddenly
 it is doing 20 per second, that isn't a fault but I would like to know
 about it, because it might mean there is a problem with the network in
 general.

 Is there a way of doing this?


 Any ideas?

 You've already received two replies, both stating that you'll
 likely have to write some code to do it.  I'm not aware of
 any common plugins out there that calculate rates of change and
 alert appropriately.  Maybe they exist, but I don't recall
 seeing any of them.

 Have you tried any of the plugin sites?



Oh, I didn't receive any replies. Presumably the mails got lost in the 
ether.

I'm happy to write code - I just wondered if there was a built-in way of 
doing this.

Thanks for your response,
Jonathan


--
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] Dynamic warning/critical thresholds

2012-06-22 Thread Jonathan Gazeley
I've got a bunch of Nagios plugins that monitor things like 
DNS/HTTP/RADIUS hits per second.

I've set what I believe to be sensible max/min warning thresholds but 
what I really want is dynamic thresholds. If some quantity suddenly 
doubles or halves, I'd like an alert.

For example, if I usually serve 10 DNS lookups per second, and suddenly 
it is doing 20 per second, that isn't a fault but I would like to know 
about it, because it might mean there is a problem with the network in 
general.

Is there a way of doing this?

Thanks,
Jonathan

--
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] Performance data not being returned

2012-05-15 Thread Jonathan Gazeley
The newlines were introduced by my mail client. There are no unusual 
characters in the output of the plugin. As far as I can tell, the 
perfdata complies completely with the specs.

status | key1=value1%;warn;crit, key2=value2%;warn;crit

The perfdata string is generated in a loop by appending an item for each 
DHCP pool I am monitoring. When we come to print the variable, it seems 
to get ignored (hence the pipe is printed but nothing else).

If I statically set the variable to have the same value as the perfdata 
ought to, then the plugin works properly, and the full perfdata string 
is returned.

So what is it about printing this variable through NRPE that breaks it? 
I am totally confused by this. Happy to send my plugin source code to 
the list if it helps (it's only 60 lines of perl).

Thanks,
Jonathan


On 14/05/12 16:33, Alex Griffin wrote:
 Are the newlines in your output an artifact of sending this over email
 or are there really newlines in your plugin output? If they're really
 there, you should eliminate them.

 Alex Griffin
 ---
 Tech Team
 agrif...@nagios.com

 Jonathan Gazeley wrote:
 On 10/05/12 16:39, C. Bensend wrote:

 I've narrowed it down to a stage where running the plugin directly
 returns the right results, but running the plugin through check_nrpe on
 localhost returns this:

 [jg4461@dhcp1 log]$ /usr/lib64/nagios/plugins/check_nrpe -H localhost -c
 check_dhcpd_pools
 OK - all pools less than 80% full |

 What could cause NRPE to truncate the results in such a way?

 Too much data?

 Are you using SSL?

 I don't know that I've seen this behavior before - it's always
 been *invalid* perfdata that have caused this issue for me.


 I am using SSL in production, although not for testing. Both cases
 return the same truncated results.

 The total status + performance data returned from this plugin is only
 500-and-something bytes, less than the limits for NRPE that I'd heard about.

 I'm wondering if it might be something to do with the embedded perl
 interpreter. Does NRPE use this to execute perl-flavoured plugins?

 Thanks for your help,
 Jonathan

 --
 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


--
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] Performance data not being returned

2012-05-10 Thread Jonathan Gazeley
Some time ago I set up a bunch of Nagios checks including graphing of 
performance data for various services. It all worked fine. I've just had 
cause to look at the graphs and I noticed that performance data stopped 
being logged a few weeks ago.

Nagios no longer seems to read in the performance data for this one 
service check - other services are OK. Nagios correctly reports the 
status and the status information string, but seems to not accept the 
performance data.

The plugin is being executed through NRPE. Executing the plugin by hand 
seems to return valid perfdata:

[jg4461@dhcp1 ~]$ /usr/lib64/nagios/plugins/check_dhcpd_pools
OK - all pools less than 80% full | 'resnet-wireless-652'=43.769%;80;90, 
'resnet-wireless-653'=47.923%;80;90, 
'resnet-wireless-654'=46.201%;80;90, 
'resnet-wireless-655'=44.681%;80;90, 
'resnet-wireless-656'=47.720%;80;90, 
'resnet-wireless-657'=47.112%;80;90, 
'resnet-wireless-658'=42.452%;80;90, 'resnet-wireless-659'=0.304%;80;90, 
'resnet-wireless-ratelimited-660'=1.114%;80;90, 
'resnet-wireless-onlinepayment-661'=0.405%;80;90, 
'resnet-wireless-onlinepayment-662'=0.405%;80;90, 
'resnet-wireless-onlinepayment-663'=0.304%;80;90, 
'resnet-wireless-consoles-665'=1.114%;80;90, 
'resnet-wireless-message-666'=0.000%;80;90, 
'resnet-wireless-instructions-667'=8.056%;80;90

The plugin worked perfectly in the past and I'm not aware that anything 
has changed since. I've checked that permissions are OK and that SELinux 
isn't preventing it from working.

Can anyone suggest a sensible course of action to troubleshoot this 
plugin - where I might look to try and work out where the perfdata is 
being lost?

Thanks,
Jonathan

--
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] Performance data not being returned

2012-05-10 Thread Jonathan Gazeley
On 10/05/12 11:31, C. Bensend wrote:

 The plugin is being executed through NRPE. Executing the plugin by hand
 seems to return valid perfdata:

 [jg4461@dhcp1 ~]$ /usr/lib64/nagios/plugins/check_dhcpd_pools
 OK - all pools less than 80% full | 'resnet-wireless-652'=43.769%;80;90,
 'resnet-wireless-653'=47.923%;80;90,
 'resnet-wireless-654'=46.201%;80;90,
 'resnet-wireless-655'=44.681%;80;90,
 'resnet-wireless-656'=47.720%;80;90,
 'resnet-wireless-657'=47.112%;80;90,
 'resnet-wireless-658'=42.452%;80;90, 'resnet-wireless-659'=0.304%;80;90,
 'resnet-wireless-ratelimited-660'=1.114%;80;90,
 'resnet-wireless-onlinepayment-661'=0.405%;80;90,
 'resnet-wireless-onlinepayment-662'=0.405%;80;90,
 'resnet-wireless-onlinepayment-663'=0.304%;80;90,
 'resnet-wireless-consoles-665'=1.114%;80;90,
 'resnet-wireless-message-666'=0.000%;80;90,
 'resnet-wireless-instructions-667'=8.056%;80;90

 http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201

 I think you might try spaces, not commas.  I have developed a
 number of plugins, and I've never used anything but spaces to
 delimit the performance data.  If Nagios doesn't believe that's
 valid data, it's going to ignore it.



I removed the commas, and I'm now using only spaces. It still isn't 
showing up in Nagios, though.

I'm slightly perplexed, since the perfdata used to show up in Nagios in 
the form that I already posted it to the list. I don't know what changed.

Does anyone know any good ways of debugging this?

Thanks,
Jonathan

--
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] Performance data not being returned

2012-05-10 Thread Jonathan Gazeley
On 10/05/12 15:06, Mike Guthrie wrote:
 On 5/10/2012 5:51 AM, Jonathan Gazeley wrote:
 On 10/05/12 11:31, C. Bensend wrote:
 The plugin is being executed through NRPE. Executing the plugin by hand
 seems to return valid perfdata:

 [jg4461@dhcp1 ~]$ /usr/lib64/nagios/plugins/check_dhcpd_pools
 OK - all pools less than 80% full | 'resnet-wireless-652'=43.769%;80;90,
 'resnet-wireless-653'=47.923%;80;90,
 'resnet-wireless-654'=46.201%;80;90,
 'resnet-wireless-655'=44.681%;80;90,
 'resnet-wireless-656'=47.720%;80;90,
 'resnet-wireless-657'=47.112%;80;90,
 'resnet-wireless-658'=42.452%;80;90, 'resnet-wireless-659'=0.304%;80;90,
 'resnet-wireless-ratelimited-660'=1.114%;80;90,
 'resnet-wireless-onlinepayment-661'=0.405%;80;90,
 'resnet-wireless-onlinepayment-662'=0.405%;80;90,
 'resnet-wireless-onlinepayment-663'=0.304%;80;90,
 'resnet-wireless-consoles-665'=1.114%;80;90,
 'resnet-wireless-message-666'=0.000%;80;90,
 'resnet-wireless-instructions-667'=8.056%;80;90
 http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201

 I think you might try spaces, not commas.  I have developed a
 number of plugins, and I've never used anything but spaces to
 delimit the performance data.  If Nagios doesn't believe that's
 valid data, it's going to ignore it.


 I removed the commas, and I'm now using only spaces. It still isn't
 showing up in Nagios, though.

 I'm slightly perplexed, since the perfdata used to show up in Nagios in
 the form that I already posted it to the list. I don't know what changed.

 Does anyone know any good ways of debugging this?
 Try using floats for your thresholds instead of integers.  Those are two
 different data types being compared.

 For debugging I usually set up a local passive check with hard-coded
 status text and performance data, and then I just play with the format
 until it starts being processed for a graph.

I've narrowed it down to a stage where running the plugin directly 
returns the right results, but running the plugin through check_nrpe on 
localhost returns this:

[jg4461@dhcp1 log]$ /usr/lib64/nagios/plugins/check_nrpe -H localhost -c 
check_dhcpd_pools
OK - all pools less than 80% full |

What could cause NRPE to truncate the results in such a way?

Jonathan

--
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] Performance data not being returned

2012-05-10 Thread Jonathan Gazeley
On 10/05/12 16:39, C. Bensend wrote:

 I've narrowed it down to a stage where running the plugin directly
 returns the right results, but running the plugin through check_nrpe on
 localhost returns this:

 [jg4461@dhcp1 log]$ /usr/lib64/nagios/plugins/check_nrpe -H localhost -c
 check_dhcpd_pools
 OK - all pools less than 80% full |

 What could cause NRPE to truncate the results in such a way?

 Too much data?

 Are you using SSL?

 I don't know that I've seen this behavior before - it's always
 been *invalid* perfdata that have caused this issue for me.


I am using SSL in production, although not for testing. Both cases 
return the same truncated results.

The total status + performance data returned from this plugin is only 
500-and-something bytes, less than the limits for NRPE that I'd heard about.

I'm wondering if it might be something to do with the embedded perl 
interpreter. Does NRPE use this to execute perl-flavoured plugins?

Thanks for your help,
Jonathan

--
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] Perfdata not showing up

2011-09-16 Thread Jonathan Gazeley
On 15/09/11 09:32, Andreas Ericsson wrote:
 On 09/14/2011 05:13 PM, Jonathan Gazeley wrote:
 Hi all,

 I'm using nagios with pnp4nagios to graph my performance data. When a
 plugin returns performance data, it automatically get graphed. However,
 one of my plugins isn't getting graphed.

 I'm aware that this is quite a large amount of perfdata being returned
 (pool use for lots of pools on a DHCP server) but is there anything
 wrong with this output?

 [jg4461@dhcp1 ~]$ /usr/lib64/nagios/plugins/check_dhcpd_pools
 OK - all pools less than 80% full | resnet-wireless-652=0.983%;80%;90%,
 resnet-wireless-653=1.377%;80%;90%, resnet-wireless-654=1.180%;80%;90%,

 Skip the commas and it should be ok. One possible issue could be if
 you're using NRPE to run the checks for this, as NRPE will limit the
 output to 1024 chars, so Nagios (and also PNP) will receive damaged
 perfdata.

I am using NRPE to return the data, but the perfdata is 1024 chars. 
This may not always be the case though, so I will look at using 
check_by_ssh.

It seems that my perfdata format works with commas or semicolons, but 
the root cause of my problems was a corrupt RRD database, as in this post:

http://www.nagios-portal.org/wbb/index.php?page=ThreadpostID=65384l=2

The suggested fix worked, and now I have millions of graphs of my DHCP 
pools :)

Thanks for your help,
Jonathan

--
BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
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] Perfdata not showing up

2011-09-14 Thread Jonathan Gazeley
Hi all,

I'm using nagios with pnp4nagios to graph my performance data. When a 
plugin returns performance data, it automatically get graphed. However, 
one of my plugins isn't getting graphed.

I'm aware that this is quite a large amount of perfdata being returned 
(pool use for lots of pools on a DHCP server) but is there anything 
wrong with this output?

[jg4461@dhcp1 ~]$ /usr/lib64/nagios/plugins/check_dhcpd_pools
OK - all pools less than 80% full | resnet-wireless-652=0.983%;80%;90%, 
resnet-wireless-653=1.377%;80%;90%, resnet-wireless-654=1.180%;80%;90%, 
resnet-wireless-655=1.180%;80%;90%, resnet-wireless-656=0.983%;80%;90%, 
resnet-wireless-657=0.000%;80%;90%, resnet-wireless-658=0.000%;80%;90%, 
resnet-wireless-659=0.000%;80%;90%, 
resnet-wireless-ratelimited-660=0.000%;80%;90%, 
resnet-wireless-onlinepayment-661=0.098%;80%;90%, 
resnet-wireless-onlinepayment-662=0.000%;80%;90%, 
resnet-wireless-onlinepayment-663=0.000%;80%;90%, 
resnet-wireless-consoles-665=0.000%;80%;90%, 
resnet-wireless-message-666=0.000%;80%;90%, 
resnet-wireless-instructions-667=0.367%;80%;90%

As I understand it, it should be in a format like:

title1=value1;warning1;critical1, title2=value2;warning2;critical2

I've tried using semicolons and commas to separate the different pieces 
of data being returned, neither worked. This plugins works normally 
aside from not graphing - Nagios shows the status and the return code.

Any ideas?

Cheers,
Jonathan

--
BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerryreg; mobile platform with sessions, labs  more.
See new tools and technologies. Register for BlackBerryreg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
___
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] Unable to move file to check results queue

2011-09-07 Thread Jonathan Gazeley
Hi list,

I've used Nagios for a few years now, largely without any problems, but 
since I just rebuilt my Nagios server I'm having a problem.

My nagios log file is full of entries like this, that recur every few 
seconds:

Error: Unable to rename file 
'/var/log/nagios/spool/checkresults/checkf8zhrH' to 
'/var/log/nagios/spool/checkresults/c8M6TqA': No such file or directory
Warning: Unable to move file 
'/var/log/nagios/spool/checkresults/checkf8zhrH' to check results queue.
Error: Unable to rename file 
'/var/log/nagios/spool/checkresults/check3OnQ7y' to 
'/var/log/nagios/spool/checkresults/cKzmO7d': No such file or directory
Warning: Unable to move file 
'/var/log/nagios/spool/checkresults/check3OnQ7y' to check results queue.
Error: Unable to rename file 
'/var/log/nagios/spool/checkresults/checkbsjxap' to 
'/var/log/nagios/spool/checkresults/c6TEIkd': No such file or directory
Warning: Unable to move file 
'/var/log/nagios/spool/checkresults/checkbsjxap' to check results queue.
Error: Unable to rename file 
'/var/log/nagios/spool/checkresults/checkyHICiz' to 
'/var/log/nagios/spool/checkresults/c28Thaw': No such file or directory
Warning: Unable to move file 
'/var/log/nagios/spool/checkresults/checkyHICiz' to check results queue.
Error: Unable to rename file 
'/var/log/nagios/spool/checkresults/checknXxstZ' to 
'/var/log/nagios/spool/checkresults/cNhpsRH': No such file or directory
Warning: Unable to move file 
'/var/log/nagios/spool/checkresults/checknXxstZ' to check results queue.


I see from searching for the problem online that it can be caused by 
multiple running instances of nagios. When I do a ps -ef | grep nagios 
there are usually 4 processes - one that seems persistent (2337 in this 
case) and the other 3 that disappear and reappear with new pids. Killing 
the 3 extra processes makes them just reappear. Is this normal?

[root@monitor ~]# ps -ef | grep \/usr\/sbin\/nagios
nagios2337 1  0 13:05 ?00:00:02 /usr/sbin/nagios -d 
/etc/nagios/nagios.cfg
nagios   15453 1  0 13:12 ?00:00:00 /usr/sbin/nagios -d 
/etc/nagios/nagios.cfg
nagios   15621 1  0 13:12 ?00:00:00 /usr/sbin/nagios -d 
/etc/nagios/nagios.cfg
nagios   15707 1  0 13:12 ?00:00:00 /usr/sbin/nagios -d 
/etc/nagios/nagios.cfg
root 15744  6284  0 13:12 pts/000:00:00 grep /usr/sbin/nagios


This is a 64-bit CentOS 6.0 virtual machine. It was running SELinux but 
I disabled it for debugging in case it was causing problems.

Permissions on ls -la /var/log/nagios/spool/checkresults/ and parents 
are traversable and writable by the nagios user.

I also saw online that sometimes permissions on /dev/null can cause this 
problem, but in my case /dev/null is world-writable so I can't see a 
problem.

I adjusted max_check_result_file_age to 0 in case my checkresult files 
were being deleted prematurely, but the problem persists.

So, I have no idea what to look at next while troubleshooting this. Can 
anyone suggest a pointer?

Many thanks,
Jonathan

--
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
___
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