help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The cf_lastseen.db file


From: Mark . Burgess
Subject: Re: The cf_lastseen.db file
Date: Thu, 10 Jun 2004 07:58:09 +0200 (MEST)


On  9 Jun, Chip Seraphine wrote:
> Cool!  FriendStatus() looks like exactly what I want, but I can't find an 
> example of it in use.


I have not yet had time to make a faq page
> 
> The Reference says that it "displays a message if hosts that normally have a 
> cfengine protocol connection with the current host have not connected for 
> more than than specified number of hours", which is perfect. 
> 
> I do have a couple of questions on it, though:   First, how does it 
> determines 
> that a host "normally" has a connection?  Should I be somehow providing it 
> with a list?  Does it start watching for a given host after the first time it 
> sees it connect?  
> 

It learns the expected connection interval - machine learning

> Secondly, how can I get the name of the host that generates the alert?  I am 
> assuming that my alert will simply contain the alert string, as per usual, 
> which will alert me to the fact that *something* is late, but not exactly 
> who.   
> 

The alert has the form

cf:nexus: Host vorlon.iu.hio.no (answered us) last at Fri May 21 14:49:05 2004
        i.e. not seen for 473.11 hours
        (Expected <delta_t> = 325543123.50 secs (= 90428.65 hours))
cf:nexus: Host vorlon.iu.hio.no (hailed us) last at Thu Jun 10 07:31:03 2004
        i.e. not seen for 0.41 hours
        (Expected <delta_t> = 32.58 secs (= 0.01 hours))


You wll only see it in verbose mode unless it exceeds the aler value
you give. I am still in the process of fine tuning is behaviour -- hence
incomplete docs. The examples above do not generate alters normally.

> Forgive me for firing of questions to the list right away, but the nature of 
> this animal seems to make exploratory testing somewhat tricky.  You mentioned 
> something about an advanced tutorial that might cover FriendStatus in a post 
> last April (http://lists.gnu.org/archive/html/help-cfengine/2004-04/
> msg00110.html), but I couldn't find it....
> 

Yes - if there is to be an advanced cfengine workshop at LISA, it will
be included.

M

> On Wednesday 09 June 2004 16:16, Mark.Burgess@iu.hio.no wrote:
>> 
>> To extract data you can use the FriendStatus() function in cfengine.
>> To write your own stuff, you need to use the lastseen struct
>> in cf.defs.h. Look at the code in ip.c for the friendstatus
>> function and just copy it. berkeley does not have schema - just
>> raw data.
>> 
>> M
>> 
>> On  9 Jun, Chip Seraphine wrote:
>> > 
>> > I'm in a situation where it would be very useful to get cruncheable data 
> out 
>> > of cf_lastseen.db, but I am rather Berkeley ignorant.  Any good tricks/
> tools 
>> > out there for doing this?   Is there a schema or something I should be 
>> > looking at?
>> > 
>> 
>> 
>> 
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Work: +47 22453272            Email:  Mark.Burgess@iu.hio.no
>> Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  Mark.Burgess@iu.hio.no
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

[Prev in Thread] Current Thread [Next in Thread]