Nagios 4.0.2 + mod_gearman + pnp4nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Django
Posts: 5
Joined: Wed Dec 18, 2013 7:14 am

Nagios 4.0.2 + mod_gearman + pnp4nagios

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Django
Posts: 5
Joined: Wed Dec 18, 2013 7:14 am

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Post by abrist »

Do you have logging enabled in process_perfdata.cfg? Have you added the necessary bulk processing commands to nagios.cfg?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Django
Posts: 5
Joined: Wed Dec 18, 2013 7:14 am

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Post 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?
Django
Posts: 5
Joined: Wed Dec 18, 2013 7:14 am

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Post 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) ...
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Django
Posts: 5
Joined: Wed Dec 18, 2013 7:14 am

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Post by Django »

You may want to open up a bug report at: http://tracker.nagios.org
Thank you i created a ticket.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios 4.0.2 + mod_gearman + pnp4nagios

Post by tmcdonald »

Link to ticket for sake of reference.
Former Nagios employee
Locked