Plugin Architecture for Cacti and Monitoring Module

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
john le lardon
Cacti User
Posts: 52
Joined: Fri May 06, 2005 7:39 am
Location: france
Contact:

Post by john le lardon »

okay thanks! i try it now :D
cool it's work fine now thanks a lot again!
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

mgb wrote:@cigamit

I'm pretty sure I used your Thold patch. Don't know what went wrong. Is it possible to post all the patched files complete? Cacti 0.8.6d + Thold 2.1a

That would be great.

Michael
I was going off what you said.. you said that you did
patch -p1 -N < cacti-plugin-arch.diff
and cacti-plugin-arch.diff is the non-thold version
cacti-plugin-arch-thold.diff is the one you needed.

I will post a complete set of files tomorrow sometime (not all of cacti, just the changed files, so you just have to override them)
mgb
Cacti User
Posts: 124
Joined: Mon Jun 21, 2004 4:06 am
Location: North of the Netherlands

Post by mgb »

@cigamit,

I used copy and paste to create the patch file. Therefore I copied the text in a textfile. I used the short filename because I'm a lazy typer :lol:

Michael
User avatar
mpdsville1
Cacti User
Posts: 71
Joined: Wed Mar 16, 2005 12:11 pm
Location: Albany , NY , USA

monitor plugin + co ..

Post by mpdsville1 »

Just an FYI..

monitor + patch as prescribed went in smooth w/out error
in this environment.. thold 2.1a pre-existed

Thanks
Mike Donnelly , Albany , NY
| Cacti 0.8.7g | Spine 0.8.7g | MySQL 5.0.77 | Net-SNMP 5.3.2.2 | Apache 2.2.3 | PHP 5.3.3 | RRDtool 1.2.27 | Rhel6 | Dual Xeon E5410@2.33ghz | Sunfire x4150
mlist
Cacti User
Posts: 50
Joined: Thu May 26, 2005 3:12 pm

fast poller for monitor plugin

Post by mlist »

Hi cigamit,

I installed monitor plugin on fedora c3, cacti 0.8.6d and thold 2.1a and all work perfectly!!!!

But you wrote:
Not included in this plugin is a faster version of poller.php that just checks for host up/down status and updates the database. I took the poller, and cmd.php and ripped out alot of stuff to where you can run every minute (if you normally only poll every 5). The fast poller only checks to see if the host is up, and updates the database with the info. The fast poller don't interfer with the normal poller as it runs side by side (its not a replacement) with this, you can set the Monitor window to refresh itself every 30 seconds (instead of the current 5 minutes, so to not miss something). If anyone wants this, just let me know and I will zip it up

I would to monitor my devices every minute thus I need faster poller. Can you tell me what I need to modify? You said: if anyone...let me know and I will zip it.
Can you send me the file and explain where to place it?

Thank for your great work

marco
italy :D
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: fast poller for monitor plugin

Post by cigamit »

mlist wrote:Hi cigamit,
<snip>
I would to monitor my devices every minute thus I need faster poller. Can you tell me what I need to modify? You said: if anyone...let me know and I will zip it.
Can you send me the file and explain where to place it?

Thank for your great work

marco
italy :D
Here is the faster poller, I make no gaurantees with it (also its from v0.8.6c, but it should still work with v0.8.6d). Just drop it in your cacti folder, and then add another an extra cronjob that looks like this.

Code: Select all

*/1 * * * * cactiuser php /var/www/html/cacti/fast_poller.php >/dev/null 2>&1
(Note: You will probably need to leave out the "cactiuser" on FC3 if you are installing via "crontab -e")

This will only update the up/down status, it will not poll the devices for SNMP information (just checks to make sure they are up). It also does not use cactid, it uses the provided cmd file to do the polling.
Attachments
fast_poller.zip
Stripped Down version of Poller for fast Status Up checking
(4.86 KiB) Downloaded 481 times
mlist
Cacti User
Posts: 50
Joined: Thu May 26, 2005 3:12 pm

Post by mlist »

Hi cigamit

I apologize for my stupid question but unfortunately I' m not a guru like you.
I have some questions:

1) In zip files there are 2 files:
Must I put all 2 files in cacti folder? Or fast_poller_cmd.php need to be placed in other folder?

2) You told:
This will only update the up/down status, it will not poll the devices for SNMP information.
Ok...this is clear to me and one minute is enough but, just as curiosity: is possible to check every 30 seconds adjusting crontab? Are there problems? This could be useful for routers in my wan...one minute is not bad but 30 seconds would be better.

3) Befor cacti I used What's Up Gold in which I can choise the sound file to play. Is possible make the same with monitor? What I need to change?

4) Why must I need to leave out the "cactiuser" on FC3?

:) Thanks!
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

mlist wrote:Hi cigamit

I apologize for my stupid question but unfortunately I' m not a guru like you.
I have some questions:

1) In zip files there are 2 files:
Must I put all 2 files in cacti folder? Or fast_poller_cmd.php need to be placed in other folder?

2) You told:
This will only update the up/down status, it will not poll the devices for SNMP information.
Ok...this is clear to me and one minute is enough but, just as curiosity: is possible to check every 30 seconds adjusting crontab? Are there problems? This could be useful for routers in my wan...one minute is not bad but 30 seconds would be better.

3) Befor cacti I used What's Up Gold in which I can choise the sound file to play. Is possible make the same with monitor? What I need to change?

4) Why must I need to leave out the "cactiuser" on FC3?

:) Thanks!
1) You need to put both files in there.

2) Yes it is possible to switch to any time period you want. I would be careful though that it doesn't overlap! 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)

3) This will be included in future versions, could possibly allow MP3's, ect...

4) It all depends on how you edit the crontab. I persoonally just logon as root, then issue a "crontab -e" which doesn't require the user to be specified (uses the current user). If you edit the files directly then you will have to put in the user.
User avatar
Pumpi
Cacti User
Posts: 259
Joined: Wed Jan 14, 2004 3:23 am
Location: Germany

Post by Pumpi »

cigamit,

must I have thold installed or is your addon "only" displaying up/down informations like it What's up Gold is doing without an own threshold monitoring feature ?

Sry for this noob question :oops:
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

Pumpi wrote:cigamit,

must I have thold installed or is your addon "only" displaying up/down informations like it What's up Gold is doing without an own threshold monitoring feature ?

Sry for this noob question :oops:
It only displays/alerts with up/down status. Thresholding is way more complex and I saw no reason to re-invent the wheel when we already have a perfectly good thresholding module out there.
magnetyk
Posts: 34
Joined: Tue May 10, 2005 10:04 am

Post by magnetyk »

Hi,

The textbox when mouseovering on a host is bad previewed with Mozilla. Let's see the screenshot (it's better than my english :) ). I'm only using Mozilla, anybody knows how to display text box like IE did ?

I've got another question. To play the sound with Mozilla, which plugin i have to install ? Mozilla refused to found it online !

Thx a lot for this wonderful script ;)
Attachments
Preview
Preview
sniff.jpg (44.38 KiB) Viewed 10893 times
magnetyk
Posts: 34
Joined: Tue May 10, 2005 10:04 am

Post by magnetyk »

I think I found the response ...
Multiple Line Tooltip
Netscape/Mozilla does not support multiple line tooltip(title attribute). For IE, you just put \n into title value and it will become multiple line.
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

magnetyk wrote:Hi,

The textbox when mouseovering on a host is bad previewed with Mozilla. Let's see the screenshot (it's better than my english :) ). I'm only using Mozilla, anybody knows how to display text box like IE did ?

I've got another question. To play the sound with Mozilla, which plugin i have to install ? Mozilla refused to found it online !

Thx a lot for this wonderful script ;)
The issue with the tooltips and Mozilla is known, I am currently working on a DHTML version that should work in both.

I believe Mozilla uses Quicktime to play Wav files, or at least that is what it wanted to install on my side of things. I detest Quicktime, so I am currently looking for another option and will let you know if I find something.
mlist
Cacti User
Posts: 50
Joined: Thu May 26, 2005 3:12 pm

Post by mlist »

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?

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
Last edited by mlist on Tue Jun 07, 2005 2:31 am, edited 1 time in total.
mlist
Cacti User
Posts: 50
Joined: Thu May 26, 2005 3:12 pm

Post by mlist »

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 :)
Last edited by mlist on Tue Jun 07, 2005 9:07 am, edited 2 times in total.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests