Apache Module integrated monitoring...

12 views
Skip to first unread message

Sean Alderman

unread,
Jul 31, 2015, 11:41:03 AM7/31/15
to Example42 Puppet Modules
HI,

My colleague asked me today how he might setup a server that uses your puppet-apache module (the old way with integrated monitoring) to specify a specific Nagios Service Template for the process monitor.  I know we can set globally the nagios::service_template parameter from the ENC, but then that would apply to all monitor-integrated modules the host uses.  Also, I could add param(s) to a custom fork of the Apache module to specify templates for the service.  I was hoping someone might have an idea on another method.

Thanks!

Alessandro Franceschi

unread,
Jul 31, 2015, 11:54:18 AM7/31/15
to Example42 Puppet Modules, salde...@udayton.edu
That's a bit tricky, probably impossible with the current code in an automated way, since the monitor defines inside the apache module (and all the others) don't allow to specify a specific nagios template.
I'd do something like this:
APPROACH 1 - Without changes to the apache module
Where you declare the apache class:
-  disable automatic monitoring (be that for some nodes or all, you can define that via hiera or top scope variables)
- Add a custom monitor::process (or monitor::port) define where you explicitly pass the template param (which is not used in the apache module) and the apache relevant params.

APPROACH 2 - Changing the apache module (as you guessed)
- Add to the apache class a parameter to specify the template to use for  monitoring
- Add the 'template' parameter to the monitor:: defines in the apache class and pass to it the value of the parameter you added to the apache class

Hope this helps,
al
Reply all
Reply to author
Forward
0 new messages