I am using a custom type called assert that flags the report if any of the facts did not pass. I would agree that these items should be captured
in a monitoring platform, but I don't have access to the monitoring platform to make these changes and if it were that easy I am sure
it would have been implemented in the monitoring system already. However collecting 30 POIs per node on a proprietary, super expensive monitoring
system would probably somehow cost an additional 30K (I have no factual data to back this claim up).
Some of the benefits of using a fact are:
- A single interface to run all the scripts (there is 30+ facts that I have) ( so I can tell anybody to just run facter to get the results)
- Can use the fact value to make decisions in puppet code, although really we just use the assert type
- Can get the results of all these 30+ tests via mcollective facts instead of running each test individual across many nodes.
- From an auditing standpoint its pretty handy to know when the facts changed values in the reports which are stored for 30+ days.
and what helped make the change.
assert{'suid_test':
condition => $suid_test == 'pass',
message => 'Suit test did not pass'
}
Sean,
To wrap all these discussions up. You can do the following:
1. cache the result of find like I did in the script and not care how or when the script is run, nor maintain a cron job for it.
2. run a cron job and configure the script to run when you need it to, then write a fact around the value of the result
3. use a monitoring system to poll for these values, and configure which values are to be stored