help-cfengine
[Top][All Lists]
Advanced

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

alerts and syslog problem


From: Peter Sevborn
Subject: alerts and syslog problem
Date: 27 Jan 2004 06:08:53 -0800

Hi folks,

Maybe there has been a post regarding this already but I haven't found
any.
I'm running Solaris 8 with cfengine 2.1.1

I have a problem in the alerts: section with the syslog(ERR....)
entry. Below is part of the config.

copy:

  $(cf_main_dir)/masterfiles/binaries/solaris/md5
        dest=/usr/bin/md5
        mode=555
        owner=root
        group=bin
        backup=false
        encrypt=true
        type=checksum
        inform=off
        define=copy_alert
        server=$(policyhost)

alerts:

  copy_alert::
    "Test: This is a test line printed if copy_alert:: is set."
    Syslog(LOG_ERR,"The file md5 had to be copied")

If the /usr/bin/md5 file doesn't exist the file is being copied and
the copy_alert class is defined. So far so good. When the processing
comes to the alerts stage things get a bit strange. The output from
dmesg show two lines for the syslog entry in the alerts.
#dmesg
Jan 27 14:39:40 seludxweber cfagent[19078]: [ID 823470 user.error] 
The file md5 had to be copied
Jan 27 14:39:41 seludxweber cfengine:seludxweber[19078]: [ID 823470
user.error]  The file md5 had to be copied

Why two?

The line "Test:...." is printed to screen as expected.

If the /usr/bin/md5 file exists the copy_alert is not defined but the
syslog line in alerts is being run anyway.
#dmesg
Jan 27 14:42:23 seludxweber cfagent[19084]: [ID 823470 user.error] 
The file md5 had to be copied

How comes that the syslog line is executed even if the copy_alert
class is not defined? Or am I missing something here?

The line "Test:...." is not printed to screen as expected.

Any ideas?

Regards,
Peter


reply via email to

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