Thruk with distributed nagios instances, local pnp4nagios

731 views
Skip to first unread message

Jose Pedro Mayo Mendo

unread,
Apr 22, 2014, 5:12:55 AM4/22/14
to th...@googlegroups.com
Hi,

I was wondering if a setup like the following one could be possible:

- Several nagios instances with livestatus on remote sites
- Thruk on a main server, connected to all those nagios sites
- pnp4nagios on the main server

As far as I can see on the documentation, the only option is to have pnp4nagios on every one of the nagios instances and let thruk access it. Is that right? 

I would like to process all the perfdata on the thruk side. Can this be done by any means (using the CLI or any configuration tweak I may have missed...)?

Thanks in advance

Sven Nierlein

unread,
Apr 22, 2014, 5:23:22 AM4/22/14
to th...@googlegroups.com
Hi,

This is possible, you just need to transfer the performance data from you nagios cores to the central machine and feed it to pnp4nagios.
The easiest way is probably by loading the mod-gearman neb module on your nagios cores, disable everything except performance data and
configure a central gearmand. Then run pnp in gearman mode on the central machine. (Assuming you do not have overlapping host/services
on your machines)

Sven

Olivier

unread,
Apr 22, 2014, 5:48:27 AM4/22/14
to th...@googlegroups.com
Hi,
very interesting to use gearman neb, i will try to test it.
But I chose a different way using NFS and PNP. I am not sure if this is
the best solution
I explain my configuration here :
http://lkco.gezen.fr/2014/02/18/installation-pnp4nagios-on-thruk-with-2-remotes-nagios-and-1-local-nagios/

Best regards
--
lkco

Sean Alderman

unread,
Jul 15, 2014, 3:58:06 PM7/15/14
to th...@googlegroups.com, olivier.li...@gmail.com
Oliver and Sven,

Sorry to bring up an old topic, but I am investigating using gearman in this way.  Do you have any thoughts on what to do if you have overlapping hosts/services?  One simple case would be where the nagios servers self monitor, but you also have another nagios server just to monitor the nagios servers.  Thruk has backends setup for each of them...the nagios instance that monitors the nagios servers might simply be the thruk server itself. 

I'm new to Thruk, and am trying to integrate it into an existing multi-nagios implementation, where each nagios server is already doing pnp graphing locally in npcd mode.  I'm working to lab up both the gearman and NFS+npcd mode methods mentioned in this thread.  I'm guessing that having to prefix my raw pnp data files is going to result in loosing my historic data if I go the NFS+npcd mode route, but the gearman route seems complicated too.  :)

Now that its been a few months, do either of you have any more insight or best practice advice?

Davide Galletti

unread,
Aug 28, 2014, 6:33:12 AM8/28/14
to th...@googlegroups.com
Hi Sven,

I have thruk on 1 server and 3 different nagios instances on 3 different servers, everything is working fine (and I'm able to view graphs ecc..), but i'm missing something because in my apache error_log I get:

File does not exist: /pnp4nagios,

suggestions where to check or something to fix to avoid these errors/requests?

thanks

Davide Galletti

unread,
Jul 18, 2019, 10:40:35 AM7/18/19
to Thruk
If anybody is still intrested, i bumped into this old question and simply change your action_url on nagios nodes:

http:\/\/192.168.56.101/pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=_HOST_' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=_HOST_
http:\/\/<ip>/pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=$SERVICEDESC$

Sven Nierlein

unread,
Jul 18, 2019, 10:43:19 AM7/18/19
to th...@googlegroups.com, Davide Galletti
Hi,

thanks for sharing this solution. Another way with recent Thruk releases is to use the http connection which has a proxy mode for pnp4nagios or grafana graphs.

Cheers,
 Sven
> --
> You received this message because you are subscribed to the Google Groups "Thruk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to thruk+un...@googlegroups.com <mailto:thruk+un...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/thruk/dbc4271b-ed24-4472-ab21-62c6931eee40%40googlegroups.com <https://groups.google.com/d/msgid/thruk/dbc4271b-ed24-4472-ab21-62c6931eee40%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages