On Fri, Jan 14, 2011 at 04:40:47PM -0500, [email protected] wrote:
>Forum: Cfengine Help
>Subject: Re: Lastseen in body agent control per documentation isn't valid
>Author: [email protected]
>Link to topic: https://cfengine.com/forum/read.php?3,20111,20112#msg-20112
>
>Nobody has lastseen working in 3.1.1?
At least in 3.0.5p1 (I'm in the process of upgrading, but I'm not doing
that on a Friday...), it looks like the same behavior. However,
cfengine is tracking some lastseen information already. Take a look in
/var/cfengine/reports/lastseen-<hostname>*.
Of course, this could also be a side effect of running cf-report
periodically as well; I'm not sure.
I can confirm that the example in the documentation "works," but I don't
understand exactly what it does. I don't see how this snippet directly
relates to when a host was last active:
reports:
"Comment"
lastseen => "10";
However, I can confirm that this snippet does work as expected, so maybe
that's of some help:
bundle agent lastseen {
vars:
cfengine_3::
'deadtime' int => '1';
'allhosts_name' slist => { hostsseen("inf","lastseen","name") }, policy
=> 'free';
'deadhosts_name' slist => { hostsseen("${deadtime}","notseen","name") },
policy => 'free';
reports:
cfengine_3::
"I know about host [${allhosts_name}].";
"I have not seen [${deadhosts_name}] in ${deadtime} hours.";
}
>
>_______________________________________________
>Help-cfengine mailing list
>[email protected]
>https://cfengine.org/mailman/listinfo/help-cfengine
--
Jesse Becker
NHGRI Linux support (Digicon Contractor)
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine