Plugin Architecture for Cacti and Monitoring Module

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

I have now made an update to both the Plugin Architecture and the Thold Plugin.

In the Thold plugin (v0.2.3)
  • * Hopefully fixed the problem where thresholds are always 0 (hopefully!)
    * In Threshold emails, the graphs are now embedded images instead of just a link to the current image
    * You now have the option to send the email through PHP's Mailer, Sendmail, or SMTP (even authicated!)
    * You can now set the email and name that the threshold is sent from
    * Fixed the host down emails
In the Plugin Architecture (v0.5)
  • * Added a new hook for the host status update function
You can download it from my site here. The only changed file in the Plugin Architecture is "lib/functions.php" so to update it, just override that file with the new one.

Let me know how everything works, I hope to have the Threshold Templates done fairly soon also.
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

Yet another update to both the Plugin Architecture and the Thold Plugin are available.

In the Thold plugin (v0.2.4)
  • * Added the Threshold Templates so you can now easily create auto-thresholds for only the graphs you want using a simple GUI wizard.
    * Added a few custom error messages
    * A few minor GUI fixes
In the Plugin Architecture (v0.6)
  • * Added a few new hooks for the custom error messages
    * Fixed a few image problems
You can download it from my site here. The only changed files in the Plugin Architecture are "lib/functions.php" and "include/top_header.php" so to update it, just override those files with the new ones.

Let me know how everything works, I hope to have the CurrentValue=0 and the guest account access fixed fairly soon.
kingaru
Cacti User
Posts: 54
Joined: Wed Mar 09, 2005 6:35 am

Plugin Architecture - broken download?

Post by kingaru »

Link http://cactiusers.org/docs/PluginArchitecture to Plugin Architecture page goes to nowhere so it is impossible to download this script. Could you please fix it ? :))))

Thanks
Igor
cigamit wrote:Yet another update to both the Plugin Architecture and the Thold Plugin are available.

In the Thold plugin (v0.2.4)
  • * Added the Threshold Templates so you can now easily create auto-thresholds for only the graphs you want using a simple GUI wizard.
    * Added a few custom error messages
    * A few minor GUI fixes
In the Plugin Architecture (v0.6)
  • * Added a few new hooks for the custom error messages
    * Fixed a few image problems
You can download it from my site here. The only changed files in the Plugin Architecture are "lib/functions.php" and "include/top_header.php" so to update it, just override those files with the new ones.

Let me know how everything works, I hope to have the CurrentValue=0 and the guest account access fixed fairly soon.
User avatar
NHDave
Cacti User
Posts: 61
Joined: Sun Mar 20, 2005 9:14 am
Contact:

Re: Plugin Architecture - broken download?

Post by NHDave »

kingaru wrote:Link http://cactiusers.org/docs/PluginArchitecture to Plugin Architecture page goes to nowhere so it is impossible to download this script. Could you please fix it ? :))))

Thanks
Igor
You can d/l it at http://cactiusers.org/downloads/patches/
User avatar
Pumpi
Cacti User
Posts: 259
Joined: Wed Jan 14, 2004 3:23 am
Location: Germany

Post by Pumpi »

Hi cigamit,

your plugins getting better and better - excellent work !

I've done a fresh install with thold[root@localhost plugins]# ls -l
total 16
-rw-r--r-- 1 root root 44 Aug 31 04:06 index.php
-rw-r--r-- 1 root root 94 Aug 31 13:59 index.php.rej
drwxr-xr-x 3 root root 4096 Aug 31 13:51 monitor
drwxr-xr-x 3 root root 4096 Aug 31 13:51 thold and monitor plugin.

Thold works but nothing to see from the monitor plugin.

config.php looks like:

Code: Select all

$plugins = array();
$plugins[] = 'thold';
$plugins[] = 'monitor';
and plugins dir looks like:

Code: Select all

[root@localhost plugins]# ls -l
total 16
-rw-r--r--  1 root root   44 Aug 31 04:06 index.php
-rw-r--r--  1 root root   94 Aug 31 13:59 index.php.rej
drwxr-xr-x  3 root root 4096 Aug 31 13:51 monitor
drwxr-xr-x  3 root root 4096 Aug 31 13:51 thold
Running on FC4 with newest Cacti (patched) and Cactid.

Any ideas ?
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

I had the same issue. check your user perms under the console. The monitor box was not checked. The monitor tab showed as soon as I saved the new settings
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
User avatar
Pumpi
Cacti User
Posts: 259
Joined: Wed Jan 14, 2004 3:23 am
Location: Germany

Post by Pumpi »

This is the clue :P ,

Thanks egarnel !
User avatar
NHDave
Cacti User
Posts: 61
Joined: Sun Mar 20, 2005 9:14 am
Contact:

Post by NHDave »

I am seeing an error when I try to set a threshold :
Notice: Undefined offset: 0 in /var/www/html/stats/cacti/plugins/thold/thold.php on line 72

Great job on it all though!
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

NHDave wrote:I am seeing an error when I try to set a threshold :
Notice: Undefined offset: 0 in /var/www/html/stats/cacti/plugins/thold/thold.php on line 72

Great job on it all though!
Seems that your tholdset table is empty when really it should never be (maybe bad import?).

In either case, I will add a simple check to ensure that you never see the error.
spotman
Posts: 15
Joined: Thu Sep 01, 2005 7:22 am

Cigamit Rocks

Post by spotman »

Cigamit:

Thank you so much for your efforts! Thanks to you I have cacti running pretty smoothly.

Only one quick question. I am in the process of replacing MRTG, and I have to graph each port on about 100+ switches. I am using thold w/ your plugin system and so far it is working great. I click auto-create after I add a switch and I made a default thold template so that everything comes up great, I can add a switch in under 15 seconds.

The only issue is that when I click auto-create threshholds is that it seems to only create thresholds for traffic_in, and not both templates. I have created 2 templates in the thold template area. One is to alert over 7mbit for traffic_in and one is to alert over 7mit for traffic_out, when I click auto create it only creates them for traffic_in, so at the end of adding a switch, I have 24 ports that are correctly alerting me @ 7mbit, but only for 7mbit inbound, not both ways, so to add a threshhold for the traffic_out (which means 48 alerts per switch on a 24 prt switch), I have to manually add each one. Is there a way to make your auto-creating threshholds script make it for both traffic_in and traffic_out.

I hope I explained clearly :)

Thank you very very very much for your time. You have saved me EONS of time.
-Scott
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Cigamit Rocks

Post by cigamit »

spotman wrote:Cigamit:

Thank you so much for your efforts! Thanks to you I have cacti running pretty smoothly.

Only one quick question. I am in the process of replacing MRTG, and I have to graph each port on about 100+ switches. I am using thold w/ your plugin system and so far it is working great. I click auto-create after I add a switch and I made a default thold template so that everything comes up great, I can add a switch in under 15 seconds.

The only issue is that when I click auto-create threshholds is that it seems to only create thresholds for traffic_in, and not both templates. I have created 2 templates in the thold template area. One is to alert over 7mbit for traffic_in and one is to alert over 7mit for traffic_out, when I click auto create it only creates them for traffic_in, so at the end of adding a switch, I have 24 ports that are correctly alerting me @ 7mbit, but only for 7mbit inbound, not both ways, so to add a threshhold for the traffic_out (which means 48 alerts per switch on a 24 prt switch), I have to manually add each one. Is there a way to make your auto-creating threshholds script make it for both traffic_in and traffic_out.

I hope I explained clearly :)

Thank you very very very much for your time. You have saved me EONS of time.
-Scott
I will do some testing today, but it should be working without a hitch. Let me see what I can find and I will get back to you.
spotman
Posts: 15
Joined: Thu Sep 01, 2005 7:22 am

Re: Cigamit Rocks

Post by spotman »

cigamit wrote:
spotman wrote:Cigamit:

Thank you so much for your efforts! Thanks to you I have cacti running pretty smoothly.

Only one quick question. I am in the process of replacing MRTG, and I have to graph each port on about 100+ switches. I am using thold w/ your plugin system and so far it is working great. I click auto-create after I add a switch and I made a default thold template so that everything comes up great, I can add a switch in under 15 seconds.

The only issue is that when I click auto-create threshholds is that it seems to only create thresholds for traffic_in, and not both templates. I have created 2 templates in the thold template area. One is to alert over 7mbit for traffic_in and one is to alert over 7mit for traffic_out, when I click auto create it only creates them for traffic_in, so at the end of adding a switch, I have 24 ports that are correctly alerting me @ 7mbit, but only for 7mbit inbound, not both ways, so to add a threshhold for the traffic_out (which means 48 alerts per switch on a 24 prt switch), I have to manually add each one. Is there a way to make your auto-creating threshholds script make it for both traffic_in and traffic_out.

I hope I explained clearly :)

Thank you very very very much for your time. You have saved me EONS of time.
-Scott
I will do some testing today, but it should be working without a hitch. Let me see what I can find and I will get back to you.
I really really appreciate it. You are a lifesaver!
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Cigamit Rocks

Post by cigamit »

spotman wrote:
cigamit wrote:I will do some testing today, but it should be working without a hitch. Let me see what I can find and I will get back to you.
I really really appreciate it. You are a lifesaver!
This should now be fixed, try redownloading it and testing again. I will update the version once I get a few more fixes to other things in there.

Let me know how it goes.
spotman
Posts: 15
Joined: Thu Sep 01, 2005 7:22 am

Post by spotman »

Allright I just reinstalled the thold module and wiped the few thold tables from the db and it is working perfectly!

Now I can get alerts when any of our customers start using more bandwidth than the default plan, and when they buy more, then I can change the alert for their port higher. This has saved me a ton of time from writing something custom, and our MRTG system can't handle any more bandaids. Thank you so much for your help.

Does anyone else know any other good ways of using thold in a bandwidth accounting enviroment?

ps - in the future what is the procedure to upgrade the thold module and/or plugin architecture without wiping the thold db clean? or should i just not touch anything now that its all working smoothly :) ?
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

spotman wrote:Allright I just reinstalled the thold module and wiped the few thold tables from the db and it is working perfectly!

Now I can get alerts when any of our customers start using more bandwidth than the default plan, and when they buy more, then I can change the alert for their port higher. This has saved me a ton of time from writing something custom, and our MRTG system can't handle any more bandaids. Thank you so much for your help.

Does anyone else know any other good ways of using thold in a bandwidth accounting enviroment?

ps - in the future what is the procedure to upgrade the thold module and/or plugin architecture without wiping the thold db clean? or should i just not touch anything now that its all working smoothly :) ?
For the most part, you shouldn't have to wipe the DB for any upgrade. The only time would be when I have to add a new feature that modifies the database in some way, but I will state in the release that it is necessary. Until then, just overriding the files should be fine.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest