- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Monit and httpd.pid
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2007 04:16 AM
тАО07-02-2007 04:16 AM
I've got monit instaalled and configured only to monitor httpd and localhost.
set daemon 60
set logfile syslog facility log_daemon
set alert peterk@xxx.com
#set alert colin@xxx.com
set httpd port 2812
allow localhost
allow admin:xxx
allow xxx.xx.xxx.xxx
allow xxx.xxx.xxx.xxx
# localhost
check system localhost
if loadavg (1min) > 4 then alert
if loadavg (5min) > 3 then alert
if memory usage > 70% then alert
if cpu usage (user) > 70% then alert
if cpu usage (system) > 70% then alert
if cpu usage (wait) > 30% then alert
#apache
check process httpd with pidfile /var/run/httpd.pid
group apache
start program = "/usr/local/apache2/bin/apachectl start"
stop program = "/usr/local/apache2/bin/apachectl stop"
if failed port 80 protocol http then alert
if cpu > 60% for 2 cycles then alert
if cpu > 90% for 5 cycles then alert
if children > 255 then alert
if loadavg(5 min) greater than 10 for 8 cycles then alert
if totalmem > 200.0 MB for 5 cycles then alert
if 3 restarts within 5 cycles then timeout
There is only one httpd.pid in this system - but two paches installed - the apache2 is not working.
Where am I doing a mistake
Cheers
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2007 04:49 AM
тАО07-02-2007 04:49 AM
Re: Monit and httpd.pid
I don't know monit specifically.
pidfile /var/run/httpd.pid
Is not a good way to check if apache/httpd is running.
do a kill -9 on all your httpd processes on a test box. Then check the pid. You will see it sits there merrily telling your current monitor that the server is up and running.
Ways to check:
ps -ef | grep httpd | wc -l
# Shows the number of open processes.
wget for a website index.html served by the server. This will actually let you know if there is content being served up.
How to integrate it with monit? Can't help with that.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2007 09:48 AM
тАО07-02-2007 09:48 AM
Re: Monit and httpd.pid
The configuration directive is simly:
PidFile /location/to/httpd.pid
This can be over-ridden, so it's no big deal.
So simply put, you need to tell the other apache to use a different pid location, and set up a 2nd 'apache' monit looking at that, with it's own start/stop programs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2007 10:42 PM
тАО07-02-2007 10:42 PM
Re: Monit and httpd.pid
# wget 127.0.0.1 80
--11:38:05-- http://127.0.0.1/
=> `index.html'
Connecting to 127.0.0.1:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
11:38:05 ERROR 403: Forbidden.
Why is this site forbiden at localhost I think this is a source of my problem.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2007 01:14 AM
тАО07-03-2007 01:14 AM
SolutionThis appears to be a misconfiguration in httpd.conf
Check that the DocumentRoot location is correct and permissions are appropriate so the apache server can at least read the content.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com