[chef] Nagios cookbook NRPE LWRP


Chronological Thread 
  • From: Morgan Blackthorne < >
  • To: " " < >
  • Subject: [chef] Nagios cookbook NRPE LWRP
  • Date: Tue, 21 May 2013 08:49:35 -0700

I've opened a ticket on this here: http://tickets.opscode.com/browse/COOK-3021

Basically, I found that when I did a manual chef-client run across my network, I found that it was always saying X resources updated even when there should have been no changes. gchristensen from #chef pointed me at the whyrun method of testing to see what was actually being flagged as updated, and I found that in particular it was flagging on the NRPE LWRP files that are generated. There is no check being done by the LWRP, it simply creates the file on each client run.

I'd like to help fix this problem, since I have some available time to poke at this, and I could use a pointer towards how other cookbooks approach this kind of scenario. I don't want to simply test if the file exists, because the parameters could have been updated. I'm assuming that I should instead generate the file inside the cache directory and then compare checksums if the file exists and copy it to the destination if they do not match (or if the file doesn't previously exist)? Or is there a more elegant way to handle this?

Looking through the logs and comments it looks like this used to be done via a template, which I would assume would have actually solved this problem natively. I'm not sure why that was moved away from, but I imagine there was a good reason (possibly Erubis performance on generating potentially lots of one-line files?).

--
~*~ StormeRider ~*~

"Every world needs its heroes [...] They inspire us to be better than we are. And they protect from the darkness that's just around the corner."

(from Smallville Season 6x1: "Zod")

On why I hate the phrase "that's so lame"... http://bit.ly/Ps3uSS



Archive powered by MHonArc 2.6.16.

§