Thanks for the help guys, I've now finished it and got a working
solution. For anyone replicating this you need to configure a passive
service check on each host called puppet-report which then will get
updated.
http://pastie.org/private/812ijdrd7gwmwgxfmc9rdq
require 'puppet'
require 'socket'
size = self.logs.size
if size == 0 then
system /usr/lib/nagios/eventhandlers/submit_puppet_result
+ ip + puppet-report 0 \There has been no change\
else
system /usr/lib/nagios/eventhandlers/submit_puppet_result
+ ip + puppet-report 2 \There
On Wed, Feb 16, 2011 at 11:38 AM, Derek J. Balling dr...@megacity.org wrote:
size = self.logs.size
if size == 0 then
system /usr/lib/nagios/eventhandlers/submit_puppet_result
+ ip + puppet-report 0 \There has been no change\
else
system
Hi,
We'd like to run puppet regularly in noop then trigger an event after
the run depending on the results, namely to hook puppet in to our
Nagios implementation so that if anything changes for any reason we
receive an alert.
We already have puppet configured to send out puppet reports via email
On Tue, Feb 15, 2011 at 6:55 AM, Rus Hughes russell.hug...@gmail.com wrote:
Hi,
We'd like to run puppet regularly in noop then trigger an event after
the run depending on the results, namely to hook puppet in to our
Nagios implementation so that if anything changes for any reason we
receive
On Tue, Feb 15, 2011 at 4:51 PM, Nigel Kersten ni...@puppetlabs.com wrote:
On Tue, Feb 15, 2011 at 6:55 AM, Rus Hughes russell.hug...@gmail.com wrote:
Hi,
We'd like to run puppet regularly in noop then trigger an event after
the run depending on the results, namely to hook puppet in to our
On Tue, Feb 15, 2011 at 11:03 AM, Rus Hughes russell.hug...@gmail.com wrote:
[snip]
require 'puppet'
Puppet::Reports.register_report(:nagios) do
Puppet.settings.use(:reporting)
desc Sends reports directly to Nagios
def process
begin
exec