DA service monitor

Webcart

Verified User
Joined
Jan 14, 2004
Messages
367
Hello,

I wonder whether someone could shed a light on service monitor feature, i.e., how DA determines the service is dead, what command it issues to restart the service and what log file it writes to when this happens.

It works fine for us on CentOS, but doesn't seem to restart custom services on FreeBSD and there is nothing in the log files I could think of (/var/log/messages, /var/log/directadmin/errortaskq.log) to troubleshoot this.

Thank you.
 
Im pretty sure they are just using "grep -c" to count for whatever service name is set.

As far as logging Im sure its somewhere in /var/log/directadmin more then likely its /var/log/directadmin/system.log

As far as when it restarts programs im sure its using the same name that it was monitoring and uses that init script from /usr/local/etc/rc.d

So say you are wanting to monitor httpd and you have httpd=ON while if it is checking "ps xua | grep -c httpd" and it sees the reply come back to 0 it figures that httpd went down and it issues that init script from /usr/local/etc/rc.d with the name httpd with a restart command.

grep -c is counting the number of processes currently running.

Correct me if I am wrong but I am pretty sure this is how it works.
 
chatwizrd said:
Im pretty sure they are just using "grep -c" to count for whatever service name is set.

As far as logging Im sure its somewhere in /var/log/directadmin more then likely its /var/log/directadmin/system.log

As far as when it restarts programs im sure its using the same name that it was monitoring and uses that init script from /usr/local/etc/rc.d

So say you are wanting to monitor httpd and you have httpd=ON while if it is checking "ps xua | grep -c httpd" and it sees the reply come back to 0 it figures that httpd went down and it issues that init script from /usr/local/etc/rc.d with the name httpd with a restart command.

grep -c is counting the number of processes currently running.

Correct me if I am wrong but I am pretty sure this is how it works.

chatwizrd,

Thank you for your reply.
I don't think it uses something like "ps xua | grep -c httpd" because it would probably work otherwise.
One thing I didn't make clear enough is that monitoring of standard services (httpd, directadmin etc) works fine on FreeBSD. What I couldn't get working is a perl script. I suspect it could be related to the fact that the program name (/usr/bin/perl) is different than the filename (name of the perl program being executed).
 
Back
Top