Ad Widget

Collapse

CFEngine

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xs-
    Senior Member
    Zabbix Certified Specialist
    • Dec 2007
    • 393

    #1

    CFEngine

    Hi all,

    Thought i'd share this with you;

    Check when cfagent as run last. cfshow will output a line per known policy server. This will output the time since the last communication in hours.
    The first is the exact output (float), the 2nd is the whole hour part (not rounded up/down) which i am using now
    The reason for the regexp is that the output of cfshow differs between cfengine versions and linux distributions.
    It has been tested on: RHEL3+4, solaris9+10, debian, ubuntu.

    ## Outputs last seen in hours (float)
    UserParameter=cfengine.lastseen,cfshow -s | sed 's/.*not seen for .\([0-9.]*\).*/\1/' | sort | head -1
    ## Outputs last seen in hours (full hour/int)
    UserParameter=cfengine.lastseen,cfshow -s | sed 's/.*not seen for .\([0-9]*\).*/\1/' | sort | head -1

    Anyone else doing cfengine stuff with zabbix?
  • spindi
    Junior Member
    • May 2006
    • 3

    #2
    Hi,

    we also monitor our cfengine infrastructue via zabbix.

    1) Checking for cfexecd/cfservd processes
    (still got a problem on solaris 10 with zones, because the global zone sees all local running cfexecd processes)

    2) We have a simple rule (last statement) in our cfengine-files:
    shellcommands:
    any::
    "/bin/touch /var/log/cfengine.monitoring && chmod a+r /var/log/cfengine.monitoring" inform=false

    In Zabbix, I have the following:
    Item: vfs.file.time[/var/log/cfengine.monitoring]
    Trigger: {TEMPLATENAME:vfs.file.time[/var/log/cfengine.monitoring].fuzzytime(3601)}=0


    Best regards,
    Michael

    Comment

    Working...