help-cfengine
[Top][All Lists]
Advanced

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

monitoring cfagent(s)


From: Dmitry Sazonov
Subject: monitoring cfagent(s)
Date: Thu, 05 Jan 2006 16:58:16 -0500

Hello,
Happy New Year!

I'd like to monitor that each cfengine runs and if hosts are in the
desired state (ie no action were performed during the last run).

Is there any cfengine class that will tell me that all rules were
processed, but no action were necessary - meaning that the host state is
as desired (convergent).
If "corrective" actions were required - I'd like to know that too, as
if the actions are required on every run - there must be something
wrong.

Based on this class(?) I could fire a syslog message (submit a passive
check) to Nagios.
Later using freshness check I could say if all my hosts are in fact in
desired state, or some hosts are "acting" on every run, or
from some hosts we didn't receive passive checks for defined time.

I guess I could do that manually like that:


copy:
    .....
    define did_work

editfiles:
   { /tmp/bla
      ....
      DefineClasses did_work
   }

tidy:
   /tmp
   define did_work

shellcommands:
   !did_work::    "logger OK: $(host) no action necessary"
   did_work::   "logger WARNING: $(host) action performed" 


PS: how would that work if I have many imports? whould that class
(did_work) survive across imports and be still defined in the last
import (that will do syslog based on it)???


Thank you!


--
Dmitry Sazonov
UNIX sysadmin, AAMC
Office: 202-862-6168





reply via email to

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