Hi All, how does the Monitoring scripts actually work. I have setuped them like following: Service: Webserver Monitoring: Yes Hostname: localhost Port: 80 Type: TCP Under Actions: Offline: /etc/init.d/apache2 restart ... but if the apache webserver goes down it doesnt work - i have waited for about an hour and the apache webserver doesnt restart... How often does this script check if the service is up? And where can i tweak the frequency? Thanks
What's the output of Code: netstat -tap ? What's in /etc/hosts? What's the output of Code: crontab -l ?
netstat -tap without the established connections: Code: netstat -tap Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 localhost:imaps *:* LISTEN 7272/dovecot tcp 0 0 localhost:mysql *:* LISTEN 2689/mysqld tcp 0 0 *:941 *:* LISTEN 2879/rpc.statd tcp 0 0 *:pop3 *:* LISTEN 2733/popa3d tcp 0 0 *:imap2 *:* LISTEN 7272/dovecot tcp 0 0 *:sunrpc *:* LISTEN 2166/portmap tcp 0 0 *:www *:* LISTEN 3190/apache2 tcp 0 0 *:81 *:* LISTEN 2952/ispconfig_http tcp 0 0 *:auth *:* LISTEN 2633/inetd tcp 0 0 *:ftp *:* LISTEN 3345/proftpd: (acce tcp 0 0 localhost:domain *:* LISTEN 3329/named tcp 0 0 *:ssh *:* LISTEN 2867/sshd tcp 0 0 localhost:953 *:* LISTEN 3329/named tcp 0 0 *:smtp *:* LISTEN 3294/master tcp 0 0 *:https *:* LISTEN 3190/apache2 crontab -l: Code: crontab -l 30 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php &> /dev/null 59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/ftp_logs.php &> /dev/null 59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null 59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/cleanup.php &> /dev/null 0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php &> /dev/null 0,30 * * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/check_services.php &> /dev/null 15 3,15 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/quota_msg.php &> /dev/null 40 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/traffic.php &> /dev/null 05 02 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php &> /dev/null */5 * * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mysql_quota.php &> /dev/null 0 10 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/check_mx.php
...and in the hosts file localhost is only assigned to 127.0.0.1, but not to the external IP of the server...
The script is running every 30 minutes. Apache is listening on all IP addresses, so that's ok. That's ok, too. Are there any error messages in Apache's error log when the Apache goes down?
Maybe I'm missing something, but the script check_services.php does not have any code to execute commands coming from ispconfig. It has also several functions commented.
You are corect, thats a bit starnge because I'am sure that we implemented this some time ago. I will have a look in the source repositorys where we might have lost this code
monitoring not restarting apache Sometimes Apache does not restart after logrotate on a Sunday morning. In the ISP Monitor / Actions / offline I have "/etc/init.d/apache2 start" but it does not seem to do anything. I get an email every few minutes to tell me the server is down, though. I just want it to start! What should be in that box? Should it say "sh /etc/init.d/apache2 start" instead? By the way, entering /etc/init.d/apache2 start in an ssh shell starts Apache no problem
The only thing I can see that seems likely is this: [Sun Jan 13 01:12:13 2008] [notice] caught SIGTERM, shutting down