Adding another httpd to chkservd

NiN

Active Member
Apr 30, 2003
29
0
151
Braga, Portugal
I'm having trouble setting up chkservd to check for an alternate httpd (lighttpd) running on a reserved ip address...

I wanna check the response of lighttpd and restart it if necessary... The way I configured /etc/chkserv.d/lighttpd to:

service[lighttpd]=(the reserved ipaddr):80,GET / HTTP/1.0,HTTP/1..,/etc/restart_lighttpd

(/etc/restart_lighttpd: does a killall & restart)

But it seems that chkserv actually only expects the PORT and doesn't accept an IP:PORT protocol...

Any way around this?
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
I'm having trouble setting up chkservd to check for an alternate httpd (lighttpd) running on a reserved ip address...

I wanna check the response of lighttpd and restart it if necessary... The way I configured /etc/chkserv.d/lighttpd to:

service[lighttpd]=(the reserved ipaddr):80,GET / HTTP/1.0,HTTP/1..,/etc/restart_lighttpd

(/etc/restart_lighttpd: does a killall & restart)

But it seems that chkserv actually only expects the PORT and doesn't accept an IP:PORT protocol...

Any way around this?
Rather than using connection based monitoring, have you considered using the command based monitoring supported by chkservd?

The parameters are as follows:

service[serviceName] = ,,,restart,command,owner

serviceName = Name of the Service
restart = Full path + command to restart the service
command = Perl Regex of what to look for in the process list
owner = Process Owner (useful for separating user processes from system processes).
 

NiN

Active Member
Apr 30, 2003
29
0
151
Braga, Portugal
Rather than using connection based monitoring, have you considered using the command based monitoring supported by chkservd?
Thanks David, that solved it!

I assumed it would be better to do a connection monitor in case it hanged or something, but this works fine.