Page 1 of 1

Nagios 4.0.2 + mod_gearman + pnp4nagios

Posted: Wed Dec 18, 2013 9:15 am
by Django
Hi guys

i'm new here, i use Nagios 4.0.2 and mod_gearman all works great.

Is anybody succeeded to run pnp4nagios with a gearman worker ?

Thank you

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Posted: Wed Dec 18, 2013 11:35 am
by abrist
I have not tried with 4.0.2, but you can find information on the pnp4nagios website:
http://docs.pnp4nagios.org/pnp-0.6/modes#gearman_mode

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Posted: Thu Dec 19, 2013 3:18 am
by Django
Thank you I have already installed pnp4nagios 0.6 with Nagios 4.0.2 and mod_gearman but i have an error on web interface "perfdata is empty"

My pnp-worker works great there is no queue process. Under /usr/local/pnp4nagios/var/perfdata there is no file created

User nagios can write under /usr/local/pnp4nagios/var/perfdata and no error in logs.

i don't understand

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Posted: Thu Dec 19, 2013 10:38 am
by abrist
Do you have logging enabled in process_perfdata.cfg? Have you added the necessary bulk processing commands to nagios.cfg?

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Posted: Fri Dec 20, 2013 9:54 am
by Django
Do you have logging enabled in process_perfdata.cfg?
Yes
Have you added the necessary bulk processing commands to nagios.cfg?
No i just followed this tutorial http://docs.pnp4nagios.org/pnp-0.6/config#gearman_mode, i thought with gearman this was not necessary

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Posted: Fri Dec 20, 2013 3:43 pm
by slansing
Hmm, I'm not sure how extensively mod_gearman has been tested with core 4 since the core workers were released with it. Can you send a copy of your nagios.cfg?

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Posted: Thu Jan 02, 2014 5:43 am
by Django
Hello happy new year!

the only thing i changed in nagios.cfg is :

Code: Select all

event_broker_options=-1
broker_module=/opt/lib/mod_gearman/mod_gearman.o config=/opt/etc/mod_gearman/mod_gearman_neb.conf
process_performance_data=1
and i just followed pnp4nagios + Gearman mode tutorial http://docs.pnp4nagios.org/pnp-0.6/modes#gearman_mode.

The perfdata is processing, here my gearman_top view

Code: Select all

Queue Name                       | Worker Available | Jobs Waiting | Jobs Running
--------------------------------------------------------------------------
 check_results                    |               1  |           0  |           0
 hostgroup_1                      |              15  |           0  |           1
 hostgroup_2                      |              15  |           0  |           0
 hostgroup_3                      |              15  |           0  |           3
 perfdata                         |               1  |           0  |           0
 worker_01                        |               1  |           0  |           0
 worker_02                        |               1  |           0  |           0
--------------------------------------------------------------------------
but the directory /usr/local/pnp4nagios/var/perfdata is still empty.
Nagios/pnp4nagios logs looks good

i can't figure out : /

EDIT:

I set up debug mode for pnp4nagios logs and here is the result :

Code: Select all

2014-01-02 13:05:06 [1645] [1] Gearman Worker Job start
2014-01-02 13:05:06 [1645] [2] Datatype set to 'SERVICEPERFDATA'
2014-01-02 13:05:06 [1645] [1] Found Performance Data for xxxxx.xxxx.net / Check_web_server (time=0,001443s;5,000000;10,000000;0,000000;10,000000\n)
2014-01-02 13:05:06 [1645] [2] No pattern match in function _parse(\n )
2014-01-02 13:05:06 [1645] [1] Invalid Perfdata detected
2014-01-02 13:05:06 [1645] [1] Gearman job end (runtime 0.000383s) ...

2014-01-02 13:04:57 [1645] [1] Gearman Worker Job start
2014-01-02 13:04:57 [1645] [2] Datatype set to 'HOSTPERFDATA'
2014-01-02 13:04:57 [1645] [1] Found Performance Data for xxxxx.xxxx.net / _HOST_ (rta=0.922000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0\n)
2014-01-02 13:04:57 [1645] [2] No pattern match in function _parse(\n )
2014-01-02 13:04:57 [1645] [1] Invalid Perfdata detected
2014-01-02 13:04:57 [1645] [1] Gearman job end (runtime 0.000478s) ...

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Posted: Thu Jan 02, 2014 1:20 pm
by abrist
Django wrote:Found Performance Data for xxxxx.xxxx.net / Check_web_server (time=0,001443s;5,000000;10,000000;0,000000;10,000000\n)
[snip]
No pattern match in function _parse(\n )
My suspicion is that the "\n" in the perfdata is breaking processing. You may want to open up a bug report at: http://tracker.nagios.org

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Posted: Fri Jan 03, 2014 4:07 am
by Django
You may want to open up a bug report at: http://tracker.nagios.org
Thank you i created a ticket.

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Posted: Fri Jan 03, 2014 10:43 am
by tmcdonald
Link to ticket for sake of reference.