On Feb 16, 3: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 "/usr/lib/nagios/eventhandlers/submit_puppet_result
> > " + ip + " puppet-report 2 \"There have been " + size.to_s + "
> > changes\""
> >        end
> >    end
> > end
>
> This seems, at face value, to only be reporting upward "change/no-change" 
> type of thing.
>
> I'm not at all "ruby-ready" as it were, in terms of programming skill, but it 
> occurs to me that I can think of other conditions I'd be interested in 
> reporting upward (syntax or other errors in the catalog received, or anything 
> really, which causes a cached catalog to be used).
>
> Is there some easy way to add that functionality into this script?

Off hand you may be interested in the metrics portion of the report.
Something like metrics["changes"][:failed] would give you access to
any resources that failed to apply.
I don't recall how/if actual catalog failures are show in reports. A
syntax error, for example, happens on the master and is presented to
the client as a server error.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to