Plugin Architecture for Cacti and Monitoring Module
Moderators: Developers, Moderators
hi cigamit,
good news: thold and monitor plugins are intergrated smoothly with 0.8.6f on Win32 but.........................
bad news: "current value" from thold is always 0 so thold makes wrong trigger.
Btw can you add audible alarm to thold beside syslog and email (I like this feature of monitor plugins so much )
rgds,
qpduong
good news: thold and monitor plugins are intergrated smoothly with 0.8.6f on Win32 but.........................
bad news: "current value" from thold is always 0 so thold makes wrong trigger.
Btw can you add audible alarm to thold beside syslog and email (I like this feature of monitor plugins so much )
rgds,
qpduong
- Attachments
-
- currentvalue.gif (37.8 KiB) Viewed 6936 times
-
- goodvalue.gif (56.12 KiB) Viewed 6936 times
Thanks for catching that so fast. I looked over the code, and I definitely was not compensating for Win32 at all. I have updated the plugin (just a small change in setup.php) and it should now be working correctly. If you wouldn't mind giving it another go and make sure that it is now working correctly, I would appreciate it.qpduong wrote:hi cigamit,
good news: thold and monitor plugins are intergrated smoothly with 0.8.6f on Win32 but.........................
bad news: "current value" from thold is always 0 so thold makes wrong trigger.
Btw can you add audible alarm to thold beside syslog and email (I like this feature of monitor plugins so much )
rgds,
qpduong
An audible alarm is definitely something that can be added. I am going to be enhancing the alarm on the monitor plugin to allow the sound to be selectable and you can choose any audio file you like. There are a few other configuration options that I also plan on adding such as a configurable width, maybe even icon "themes". I want to find a way to incorporate the fast-poller also and I think I already have a simple solution.
My Auto-Discover plugin is nearly complete, I am just adding a few finishing touches to it. So look for it soon.
I have also been thinking of adding a plugin to help with the growing cacti.log file (and thold.log). I know that Cacti 0.9 already includes moving the log to a SQL database, but until that is stable, it would be fairly simple to have a plugin do it for now. Either that, or add some simple log management like only keeping the last 1000 lines, or archiving the log every 24 hours. Thoughts?
We need to see the command line that is being ran. Inorder to do that, open setup.php and goto line 147, you should see this.qpduong wrote:hi cigamit,
nothing changes, still get the same prob. (with thold2.1b I didn't face this prob.) Is there any ways to turn on debugging to see what's happening?
rgds,
qpduong
// cacti_log("DEBUG: $command_string $extra_args", true, "POLLER");
Just remove the // and save it. Now let it go through a polling cycle, and look at your polling log. That should get us started. I will also see about installing cacti on win32 today inorder to have my own testbed.
-
- Posts: 16
- Joined: Thu Jul 14, 2005 8:55 am
Once you have this done, can you post a quick blurb on the install process?cigamit wrote: I will also see about installing cacti on win32 today inorder to have my own testbed.
EDIT: Ok - nevermind...
Ill be looking for the win32 fix for the current value problem that is talked about above.
Thanks for a great system
-
- Posts: 16
- Joined: Thu Jul 14, 2005 8:55 am
Found a few errors
Undefined variable: hostid in D:\webroot\cacti.XXXXXXX.com\cacti\plugins\thold\thold.php on line 95
Undefined index: threshold in D:\webroot\cacti.XXXXXXX.com\cacti\plugins\thold\thold.php on line 97
Undefined index: hostid in D:\webroot\cacti.XXXXXXX.com\cacti\plugins\thold\thold.php on line 336
URL:
/cacti/plugins/thold/thold.php?rra=360&view_rrd=970
Any ideas?
Undefined index: threshold in D:\webroot\cacti.XXXXXXX.com\cacti\plugins\thold\thold.php on line 97
Undefined index: hostid in D:\webroot\cacti.XXXXXXX.com\cacti\plugins\thold\thold.php on line 336
URL:
/cacti/plugins/thold/thold.php?rra=360&view_rrd=970
Any ideas?
- Attachments
-
- error.JPG (148.63 KiB) Viewed 6869 times
Last edited by skuzbucket on Wed Aug 03, 2005 12:27 pm, edited 2 times in total.
sweet addon!
I upgraded my internal test cacti box from 86d to 86f and did the following:
down'ld the plugin patch, monitor & thold
patched the files with only one reject - config.php so I manually moved it into place and edited the file.
poked around and finally figured out that the monitor & thold dirs need to be under the plugins dir and not the cacti base dir.
Awesome tool!
before I go and put it on my production server, has any one tried it on Cacti 86e patched up to 86f?
down'ld the plugin patch, monitor & thold
patched the files with only one reject - config.php so I manually moved it into place and edited the file.
poked around and finally figured out that the monitor & thold dirs need to be under the plugins dir and not the cacti base dir.
Awesome tool!
before I go and put it on my production server, has any one tried it on Cacti 86e patched up to 86f?
to answer my own question.....
No, it did not seem to work. After the plugin patch, I got the install/upgrade page for some reason...hmmmm
different server, everything is the same down to the metal except that the 1st was an 86d to 86f upgrade and the 2nd was a patched 86e install...
will have to go back to the drawing board for this one.
thank goodness for backups, I was able to roll back the old cacti dir and not even miss a poll!
tar - "It's not just for putting on doorknobs anymore"
No, it did not seem to work. After the plugin patch, I got the install/upgrade page for some reason...hmmmm
different server, everything is the same down to the metal except that the 1st was an 86d to 86f upgrade and the 2nd was a patched 86e install...
will have to go back to the drawing board for this one.
thank goodness for backups, I was able to roll back the old cacti dir and not even miss a poll!
tar - "It's not just for putting on doorknobs anymore"
-
- Posts: 16
- Joined: Thu Jul 14, 2005 8:55 am
I believe I have the problem figured out. I have created a workaround and have updated the plugin. The problem seems to be an original THold problem that only showed up on Windows hosts under odd circumstances. Browsing the thold thread I have found someelse that had the same issue.skuzbucket wrote:Cigamit:
Any ideas on the Current Showing zero problem? Im not a php guy so I don't really know where to start.
Go ahead and give it ago and let me know if it now works for you.
Re: Found a few errors
Are you by chance using this on an older threshold database, or is it fresh? The old threshold module had an issue where under certain circumstances, it would not add the hostid for the threshold into the database. The patches I have applied to my plugin correct this problem, but only for newly created thresholds.skuzbucket wrote:Undefined variable: hostid in D:\webroot\cacti.XXXXXXX.com\cacti\plugins\thold\thold.php on line 95
Undefined index: threshold in D:\webroot\cacti.XXXXXXX.com\cacti\plugins\thold\thold.php on line 97
Undefined index: hostid in D:\webroot\cacti.XXXXXXX.com\cacti\plugins\thold\thold.php on line 336
URL:
/cacti/plugins/thold/thold.php?rra=360&view_rrd=970
Any ideas?
I am looking into this currently and will update this post once I find something.
--
EDIT: Verified another instance of where this can occur. I am currently debugging it to see the best way of patching it.
EDIT: Patched: It will now pull the host id from the database if it isn't passed. I have updated the Plugin and the Plugin Version. Thanks Guys and keep those bug reports coming!
Its already the #3 thing on my list at the moment.qpduong wrote:ur so great, it works like champ now . Would you mind helping me make threshold play a specific audible file just like ur monitor does (we have 24h duty staffs so audible alarms are prefer over syslog or email).
Rgds,
qpduong
#1 is embedded graph images in the email (already working on my custom, just need to add to plugin, so it should be done fairly quick)
#2 is threshold templates for data sources (most of it is done, just need to write the interface)
Once those 2 things are done, the sound options will be added in. Don't fret, it will not take long at all. If you really want, I could possibly send you a small modification/patch that will get it done for now.
-
- Posts: 16
- Joined: Thu Jul 14, 2005 8:55 am
Meta Refresh added to monitor
Can you add something REALLY simple to the monitor page? A setting that will allow you to set how often the monitor page refreshes automatically? Right now you need to manually reload it.
Just an idea
Thanks again Jimmy!
Just an idea
Thanks again Jimmy!
Re: Meta Refresh added to monitor
Hum... it should reload every 5 minutes (as per the normal graph refresh). I had just added the hook in the last update to the Plugin Architecture so that I can make it refresh at a configurable rate. The only problem now is that the poller still only scans the host for their status every 5 minutes.skuzbucket wrote:Can you add something REALLY simple to the monitor page? A setting that will allow you to set how often the monitor page refreshes automatically? Right now you need to manually reload it.
Just an idea
Thanks again Jimmy!
My slightly modified cacti does the refresh every 30 seconds, and I run a faster version of the poller which just checks for host up every minute. I will see about updating it real quick, and I will include the faster poller with it. You will have to set your own Cron job/Task to run it though. I will also make the time configurable (in seconds).
Who is online
Users browsing this forum: No registered users and 1 guest