Forum: Cfengine Help
Subject: Re: Daemon Checks
Author: nima
Link to topic: https://cfengine.com/forum/read.php?3,18350,18382#msg-18382
Hi Diego,
If you look at the output, you can see that this isn't the case; specifically
here:
I stop the service, then run cf-agent:
ochus:/srv/sysconf# /etc/init.d/dnsmasq stop
Stopping DNS forwarder and DHCP server: dnsmasq.
ochus:/srv/sysconf# cf-agent -K
R: [ config ] [ teispes @ 2010.09.20.09 ]
R: [ cf-serverd ] = [ ou=cfengine ]
R: [ svc-openldap ] = [ ou=openldap ]
R: [ svc-openldap ] M OpenLDAPMaster->rID = 0x002
Q: "....d/dnsmasq star": Starting DNS forwarder and DHCP server: dnsmasq.
I: Last 1 QUOTed lines were generated by promiser "/etc/init.d/dnsmasq start"
R: [ sys-root ] S RestartDaemon->commands->start(dnsmasq)
R: [ svc-dnsmasq ] = [ ou=dnsmasq ]
R: [ svc-ddns-update ] = [ ou=ddns-update ]
And now, I run it again:
ochus:/srv/sysconf# cf-agent -K
R: [ config ] [ ochus @ 2010.09.20.09 ]
R: [ cf-serverd ] = [ ou=cfengine ]
R: [ svc-openldap ] = [ ou=openldap ]
R: [ svc-openldap ] M OpenLDAPMaster->rID = 0x002
R: [ svc-dnsmasq ] = [ ou=dnsmasq ]
R: [ svc-ddns-update ] = [ ou=ddns-update ]
Notice that the first instance, it does start the process, but the second time,
it does not. Regarding the regular expression:
teispes:/srv/sysconf# ps -ef|grep dnsmasq
dnsmasq 1875 1 0 08:51 ? 00:00:00 /usr/sbin/dnsmasq -x
/var/run/dnsmasq/dnsmasq.pid -u dnsmasq -7
/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new
root 7054 11577 0 08:56 pts/0 00:00:00 grep dnsmasq
teispes:/srv/sysconf#
I've tried the following just to be certain it's not a regex issue:
body process_select selectProcess(cmd) {
command => ".*/$(cmd)";
process_result => "command";
}
and even:
body process_select selectProcess(cmd) {
command => "^/usr/sbin/$(cmd)";
process_result => "command";
}
But no luck.
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine