James,

This is all wonderfully helpful and I just spent a little time writing
up a Zenoss processor to send an event on failure using
XMLRPC::Client, modeled directly after your puppet-zendesk module,
replacing the HTTParty guts with XMLRPC guts. I've encountered a
problem though (and we can refer to puppet-zendesk code):

When I stuff a fail() into a manifest and run, it fails, sends a
report to the PM, and the PM logs this:

Report zenoss failed: undefined method `status' for
#<Puppet::Transaction::Report:0x2b626b5ad7c0>

The line in question is from zendesk.rb:25

    if self.status == 'failed'
      ...
    end

So, it's breaking there, but when I replace self.status with "var" and
var = 'failed', bypassing the if, the rest of the code works and the
event appears in zenoss.

I'm running 2.6.4 on the master & client. pluginsync is true on both,
and reports = zenoss only on the master for this test.

Why is self.status not working for me?

On May 31, 8:09 am, James Turnbull <ja...@puppetlabs.com> wrote:
> Hi all
>
> On my TODO list for about a year now has been a tutorial on how easy it
> is to write Puppet report processors and how much more you can do with
> them than just email/log/store Puppet report data.  Rather than write a
> whole tutorial I decided to create a whole series of examples of report
> processors that should:
>
> a) Provide some immediate solutions that you can deploy right now, and
>
> b) Provide good examples of things you can do with report processing
> that you can take, fork and modify.
>
> All of them are released under the Apache 2.0 license.
>
> In that spirit I've created ten new report processors:
>
> 1. Reports failed runs to an IRC channel 
> -https://github.com/jamtur01/puppet-irc
>
> 2. Reports failed runs and logs to PagerDuty 
> -https://github.com/jamtur01/puppet-pagerduty
>
> 3. Reports failed runs to Jabber/XMPP -https://github.com/jamtur01/puppet-xmpp
>
> 4. Reports failed runs to Twitter -https://github.com/jamtur01/puppet-twitter
>
> 5. Reports failed runs and logs to Campfire 
> -https://github.com/jamtur01/puppet-campfire
>
> 6. Reports failed runs to Twilio -https://github.com/jamtur01/puppet-twilio
>
> 7. Reports failed runs to Boxcar -https://github.com/jamtur01/puppet-boxcar
>
> 8. Reports failed runs to HipChat -https://github.com/jamtur01/puppet-hipchat
>
> 9. Sends metrics to a Ganglia server via gmetric 
> -https://github.com/jamtur01/puppet-ganglia
>
> 10. Reports failed runs to Growl -https://github.com/jamtur01/puppet-growl
>
> Comments, feedback, testing and ideas for other integrations all welcomed.
>
> Regards
>
> James
>
> --
> James Turnbull
> Puppet Labs
> 1-503-734-8571

-- 
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