On Wed, Apr 20, 2011 at 04:51:03PM -0400, Mike Svoboda wrote:
>Anyone?  =(
>
>The only other solution I can think of, and this is dumb, would be to insert
>this into root's crontab.
>
>0,15,30,45 * * * /var/cfengine/bin/cf-agent -b lay_etc_tripwire_detection

Could you use cron to run cf-agent using a promises file that is
"streamlined" to just do the tripwire routines?

I do something similar when I call cf-report from cron, as I want both
the text and html outputs.  It isn't possible to specify them both at
the same time, so I run cf-report twice, both times with a "stripped
down" reporter_*.cf file, one for each output type.


>I really don't want to do that, because cf-execd is firing splaytime, and
>clients could have multiple instances of cf-agent running simultaneously.

Also, if the "lay_etc_tripwire_detection" isn't normally included in the
bundlesequence, it should be possible to run two invocations to cf-agent
without them stepping on each other...much. :)

>
>On 4/20/11 11:50 AM, "no-re...@cfengine.com" <no-re...@cfengine.com> wrote:
>
>> Forum: Cfengine Help
>> Subject: Re: laying a tripwire and firing the checksum_alerts class
>> Author: msvob...@linkedin.com
>> Link to topic: https://cfengine.com/forum/read.php?3,21544,21546#msg-21546
>>
>> Great suggestion, but it didn't work.  =(
>>
>>
>> $ grep background lay_etc_tripwire_detection.cf
>>
>> $ echo blah >> /etc/mike
>>
>>  $ /var/cfengine/bin/cf-agent -I -K -b lay_etc_tripwire_detection
>>>> Using command line specified bundlesequence
>> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>> ALERT: Hash (md5) for /etc/mike changed!
>> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>>  -> Updating hash for /etc/mike to MD5=7c28d5494f5d030ab701303bdc203393
>> I: Report relates to a promise with handle "tripwire_on_etc"
>> I: Made in version '1.3.4' of
>> '/var/cfengine/inputs/lay_etc_tripwire_detection.cf' near line 14
>> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>> ALERT: Last modified time for /etc/mike changed Wed Apr 20 08:20:50 2011 ->
>> Wed Apr 20 08:49:04 2011
>>
>>
>> No report printed...
>>
>> $ /var/cfengine/bin/cf-agent -I -K -b lay_etc_tripwire_detection
>>>> Using command line specified bundlesequence
>> R: cf3: The tripwire on esv4-be24.stg:/etc has been tripped.
>>
>>
>> The persistent class takes effect.
>>
>>
>> _______________________________________________
>> Help-cfengine mailing list
>> Help-cfengine@cfengine.org
>> https://cfengine.org/mailman/listinfo/help-cfengine
>
>_______________________________________________
>Help-cfengine mailing list
>Help-cfengine@cfengine.org
>https://cfengine.org/mailman/listinfo/help-cfengine

-- 
Jesse Becker
NHGRI Linux support (Digicon Contractor)
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to