Native httpd monitoring by AppicationHA on RHEL 5.8
Created: 01 Oct 2012 | Updated: 03 Oct 2012 | 5 comments
This issue has been solved. See solution.
Hi,
I have configured Apache monitoring with Application on RHEL 5.8. This server runs /usr/sbin/httpd and the coniguration file is /etc/httpd/conf/httpd.conf. However AppHA alway report that
"Apache HTTP server with Config file [/etc/httpd/conf/httpd.conf] is NOT RUNNING (Starting)"
However if I login to the server, I can see that the process is running.
The error code is V16-20081-3.
Accoring to the logs under /var/VRTSvcs/log , ( apache log ) it is considring the http directory as /usr/sbin instead of /etc/httpd
Any suggestions or recommendations?
Thanks in advance
Hari
Discussion Filed Under:
Comments 5 Comments • Jump to latest comment
Hi Hari,
Are you selecting Generic Application for this configuration or Apache? What is the ApplicationHA version?
Hi Hari,
If you are using Apache agent, could you please let us know the exact error message seen in the Apache agent log file?
Also please share the main.cf.
Thanks,
Laxmikant
It is likely that the httpd processes that are running do not have the required "-f <config file>" option that is needed for monitoring the different Apache processes in ApplicationHA. You may have to update the startup script for the Apache instance to pass "-f /etc/httpd/conf/httpd.conf" option to httpd while starting it up. You confirm the same by "ps -ef | grep httpd" . Application HA detects the processes only if the httpd is started with the config file option provided.
e.g.
ps -ef |grep http
root 3588 1 17 17:02 ? 00:00:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
apache 3589 3588 0 17:02 ? 00:00:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
apache 3590 3588 0 17:02 ? 00:00:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
apache 3591 3588 0 17:02 ? 00:00:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
apache 3592 3588 0 17:02 ? 00:00:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
apache 3593 3588 0 17:02 ? 00:00:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
apache 3594 3588 0 17:02 ? 00:00:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
apache 3595 3588 0 17:02 ? 00:00:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
apache 3596 3588 0 17:02 ? 00:00:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
apache 3597 3588 0 17:02 ? 00:00:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
Excellent. that works.
I have updated /etc/init.d/httpd script and changed the startup line to uuse -f $CONFFILE where CONFFILE is /etc/httpd/conf/httpd.conf
Now I have another query
The startup script is provided by Red Hat as part httpd rpm. Modifying this outside rpm is not recommended
Do Application HA has got a fix around this ?
Can we use /etc/init.d/httpd as the startup script directly with HA
I am using Application HA configuration wizard and selects Apache in the Application Selection from the Supported Application List
Yes, this is possible through Generic / Custom Application. You can specify "/etc/init.d/httpd start", "/etc/init.d/httpd stop" and "/etc/init.d/httpd status" values for Program to Start/Stop/Monitor fields to monitor the Apache server through init scripts.
Would you like to reply?
Login or Register to post your comment.