Cigamit,
I installed fast poller and, as usual, your program worked correctly. Now I have cacti 0.8.6d+thold 2.1a+monitor plugin fully operating on my fedora c3
Please be patience....I have only some others questions: one regards the time that passes between sending of first alert and others; the second is related to the patch that allow to change the "refresh" period of the page; the last is related to crontab.
Because my english isn't good I will try to explain with one example:
1) Problem regarding the time that passes between sending of first alert and others:
At 19:57 I turned off pc "xpvmware" and at 19:58 fastpoller sent me the first email alert.
But...as you can see below, in cron log (tail -f /var/log/cron) I see the poller correctly running every minute but, strangely, others alerts are sent to me randomly; the time that passes between the shipment of the first email and the others does not have a sense or....maybe...emails are sent every 10/12 minutes???
In fact, second alert was sent to me at 20:08 (10 minutes), the third was sent to me at 20:20, 20:32 (12 minutes) etc....
This is my cron.log
Jun 6 19:57:01 trialfc3 crond[7538]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 19:58:01 trialfc3 crond[7550]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 19:59:01 trialfc3 crond[7564]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:00:01 trialfc3 crond[7574]: (root) CMD (/usr/lib/sa/sa1 1 1) Jun 6 20:00:01 trialfc3 crond[7578]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Jun 6 20:00:01 trialfc3 crond[7579]: (avalon) CMD (/usr/local/percival/bin/overlord.pl check)
Jun 6 20:00:01 trialfc3 crond[7580]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:00:01 trialfc3 crond[7582]: (root) CMD (php /var/www/html/cacti/poller.php >/dev/null 2>&1 && php /var/www/html/cacti/thold/check-thold.php > /dev/null 2>&1)
Jun 6 20:01:01 trialfc3 crond[7630]: (root) CMD (run-parts /etc/cron.hourly)
Jun 6 20:01:01 trialfc3 crond[7631]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:01:01 trialfc3 crond[7633]: (root) CMD (root run-parts /etc/cron.hourly)
Jun 6 20:02:01 trialfc3 crond[7643]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:03:01 trialfc3 crond[7652]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:04:01 trialfc3 crond[7662]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:05:01 trialfc3 crond[7672]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:05:01 trialfc3 crond[7674]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Jun 6 20:05:01 trialfc3 crond[7675]: (root) CMD (php /var/www/html/cacti/poller.php >/dev/null 2>&1 && php /var/www/html/cacti/thold/check-thold.php > /dev/null 2>&1)
Jun 6 20:06:01 trialfc3 crond[7719]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 19:57:01 trialfc3 crond[7538]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 19:58:01 trialfc3 crond[7550]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 19:59:01 trialfc3 crond[7564]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:00:01 trialfc3 crond[7574]: (root) CMD (/usr/lib/sa/sa1 1 1) Jun 6 20:00:01 trialfc3 crond[7578]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Jun 6 20:00:01 trialfc3 crond[7579]: (avalon) CMD (/usr/local/percival/bin/overlord.pl check)
Jun 6 20:00:01 trialfc3 crond[7580]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:00:01 trialfc3 crond[7582]: (root) CMD (php /var/www/html/cacti/poller.php >/dev/null 2>&1 && php /var/www/html/cacti/thold/check-thold.php > /dev/null 2>&1)
Jun 6 20:01:01 trialfc3 crond[7630]: (root) CMD (run-parts /etc/cron.hourly)
Jun 6 20:01:01 trialfc3 crond[7631]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:01:01 trialfc3 crond[7633]: (root) CMD (root run-parts /etc/cron.hourly)
Jun 6 20:02:01 trialfc3 crond[7643]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:03:01 trialfc3 crond[7652]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:04:01 trialfc3 crond[7662]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:05:01 trialfc3 crond[7672]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:05:01 trialfc3 crond[7674]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Jun 6 20:05:01 trialfc3 crond[7675]: (root) CMD (php /var/www/html/cacti/poller.php >/dev/null 2>&1 && php /var/www/html/cacti/thold/check-thold.php > /dev/null 2>&1)
Jun 6 20:06:01 trialfc3 crond[7719]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:07:01 trialfc3 crond[7728]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:08:01 trialfc3 crond[7737]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:09:01 trialfc3 crond[7751]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:10:01 trialfc3 crond[7760]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Jun 6 20:10:01 trialfc3 crond[7763]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:10:01 trialfc3 crond[7765]: (root) CMD (/usr/lib/sa/sa1 1 1)
Jun 6 20:10:01 trialfc3 crond[7766]: (root) CMD (php /var/www/html/cacti/poller.php >/dev/null 2>&1 && php /var/www/html/cacti/thold/check-thold.php > /dev/null 2>&1)
Jun 6 20:11:01 trialfc3 crond[7810]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:12:01 trialfc3 crond[7819]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:13:01 trialfc3 crond[7845]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:14:01 trialfc3 crond[7854]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:15:01 trialfc3 crond[7900]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:15:01 trialfc3 crond[7903]: (root) CMD (php /var/www/html/cacti/poller.php >/dev/null 2>&1 && php /var/www/html/cacti/thold/check-thold.php > /dev/null 2>&1)
Jun 6 20:15:01 trialfc3 crond[7905]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Jun 6 20:15:01 trialfc3 crond[7906]: (avalon) CMD (/usr/local/percival/bin/overlord.pl check)
Jun 6 20:16:01 trialfc3 crond[7951]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:16:04 trialfc3 crontab[7959]: (root) LIST (root)
Jun 6 20:16:19 trialfc3 crontab[7967]: (root) LIST (root)
Jun 6 20:17:01 trialfc3 crond[7969]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:18:01 trialfc3 crond[7978]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:19:01 trialfc3 crond[7987]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:20:01 trialfc3 crond[7999]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Jun 6 20:20:01 trialfc3 crond[8000]: (root) CMD (/usr/lib/sa/sa1 1 1)
Jun 6 20:20:01 trialfc3 crond[8001]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
Jun 6 20:20:01 trialfc3 crond[8003]: (root) CMD (php /var/www/html/cacti/poller.php >/dev/null 2>&1 && php /var/www/html/cacti/thold/check-thold.php > /dev/null 2>&1)
Jun 6 20:21:01 trialfc3 crond[8053]: (root) CMD (php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1)
I WOULD LIKE to have an email alert every minute or, at least every 5 minutes. For example, I monitor hd usage with thold and I configured "Re-Alert Cycle" (Repeat alert after specified number of cycles) to 1; with this configuration every 5 minutes, thold send me email alert until I solve the problem.
Is possible with fastpoller?
Moreover:
Possible BUG??? Whe I disable monitor for a specified host, email still arrive and notify me that host in down. I tried to restar machine but the problem is always present.
May be a bug???
2) Second question is related to the patch to change "refresh" period of the page
In previous post you told:
I should also probably add the patch to allow you to change the "refresh" period of the page, since right now it does it in 5 minute intervals still (mine is at 30 seconds)
I would like to install this patch. Can you send this patch?
3) Cron:
Following your suggestion, I didn't touch /etc/crontab that, in fact is:
[root@trialfc3 ~]# cd /etc
[root@trialfc3 etc]# vi crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
I simply used (as root)
crontab -e
and modified as follow:
[root@trialfc3 etc]# crontab -l
HELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
*/5 * * * * php /var/www/html/cacti/poller.php >/dev/null 2>&1 && php /var/www/html/cacti/thold/check-thold.php > /dev/null 2>&1
*/1 * * * * php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1
This works fine but, every hour I receive an email with object:
Cron <root@trialfc3> root run-parts /etc/cron.hourly
and body:
/bin/sh: root: command not found
What could be the problem?
Thanks
Marco
Italy
