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:

Thresholds v0.2.6 Released

Post by cigamit »

I have now released v0.2.6 of the <u>Thold Plugin</u>. I have fixed a few problems and added a few minor features.
  • Fixes for HI and Low thresholds limiting the max characters
    Fixed wrong data reported to thold.log
    Fix for the error: "sh: line 1: -e: command not found" during thold checks
    Added command line switch /show for check-thold.php, which will show the output of all thresholds
    Added command line switch /debug to allow it to log to file
    Fixed the Test Email link for IE
<u>It is not necessary to update your Plugin Architecture to upgrade to this version.</u>
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Re: broken links

Post by torstentfk »

cigamit wrote:
torstentfk wrote:Hi,

in console view the links on the left sideare normal as:
http://cacti.xxx.xx/cacti08/plugins/tho ... plates.php
or
http://cacti.xxx.xxx/cacti08/plugins/th ... ueries.php

Now I click on the links to get into the plugins (thold, Reporting). I get the right pages, but all links on the left changed into:
http://cacti.xxx.xx/cacti08/plugins/tho ... plates.php
or
http://cacti.xxx.xx/cacti08/plugins/tho ... ueries.php

There seems to be a change inthe directory change, but I could not locate it in the php-files. Any idea?

Btw: The host down notification does still not work -sorry...
Greetings
Torsten
Did you set $config['url_path'] in the config file properly. In your case you should probably set it to "/cacti08/". That is what usually cases this. If not get back to me and I will see if I can dig up the problem.
Hi,
just downloaded the new thold-plugin.
- Testmail is running
- Links are still broken:

Code: Select all

$plugins = array();
$plugins[] = 'monitor';
$plugins[] = 'reports';
$plugins[] = 'thold';
/* Do not edit this line */
$config = array();
*/
$config["url_path"] = '/cacti08/';
But this does not work.
In the picture on the left site you can find the layout with errors, on the right side the correct one.

and another error:
at Threshold-Config-Page:
Fatal error: Call to undefined function: timr() in /srv/www/htdocs/cacti08/plugins/thold/thold-functions.php on line 21
Changed to trim....

Greetings Torsten
Attachments
error.jpg
error.jpg (45.6 KiB) Viewed 10607 times
sbot
Posts: 2
Joined: Mon Nov 07, 2005 3:39 pm

http://forums.cacti.net/posting.php?mode=reply&t=7765

Post by sbot »

Hi could any body help me on this one, when i click on the monitor tab a get teh following error

A session had already been started - ignoring session_start() in /data/www/html/cacti-0.8.6g/include/config.php on line 109, referer: http://localhost:9000/cacti/plugins/tho ... _thold.php
[client 192.168.2.1] PHP Fatal error: Cannot redeclare db_connect_real() (previously declared in /data/www/html/cacti-0.8.6g/lib/database.php:36) in /data/www/html/cacti-0.8.6g/lib/database.php on line 56, referer: http://localhost:9000/cacti/plugins/tho ... _thold.php[Mon Nov 07 22:30:33 2005] [error] [client 192.168.2.1] File does not exist: /data/www/html/favicon.ico

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

Re: http://forums.cacti.net/posting.php?mode=reply&t=776

Post by cigamit »

sbot wrote:Hi could any body help me on this one, when i click on the monitor tab a get teh following error

A session had already been started - ignoring session_start() in /data/www/html/cacti-0.8.6g/include/config.php on line 109, referer: http://localhost:9000/cacti/plugins/tho ... _thold.php
[client 192.168.2.1] PHP Fatal error: Cannot redeclare db_connect_real() (previously declared in /data/www/html/cacti-0.8.6g/lib/database.php:36) in /data/www/html/cacti-0.8.6g/lib/database.php on line 56, referer: http://localhost:9000/cacti/plugins/tho ... _thold.php[Mon Nov 07 22:30:33 2005] [error] [client 192.168.2.1] File does not exist: /data/www/html/favicon.ico

Regards Stephan,
I took care of this for the next version (which will be released shortly). I have already back-ported the changes to the current version, so you can re-download the latest version and give it another go.
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: broken links

Post by cigamit »

torstentfk wrote:
cigamit wrote:
torstentfk wrote:Hi,

in console view the links on the left sideare normal as:
http://cacti.xxx.xx/cacti08/plugins/tho ... plates.php
or
http://cacti.xxx.xxx/cacti08/plugins/th ... ueries.php

Now I click on the links to get into the plugins (thold, Reporting). I get the right pages, but all links on the left changed into:
http://cacti.xxx.xx/cacti08/plugins/tho ... plates.php
or
http://cacti.xxx.xx/cacti08/plugins/tho ... ueries.php

There seems to be a change inthe directory change, but I could not locate it in the php-files. Any idea?

Btw: The host down notification does still not work -sorry...
Greetings
Torsten
Did you set $config['url_path'] in the config file properly. In your case you should probably set it to "/cacti08/". That is what usually cases this. If not get back to me and I will see if I can dig up the problem.
Hi,
just downloaded the new thold-plugin.
- Testmail is running
- Links are still broken:

Code: Select all

$plugins = array();
$plugins[] = 'monitor';
$plugins[] = 'reports';
$plugins[] = 'thold';
/* Do not edit this line */
$config = array();
*/
$config["url_path"] = '/cacti08/';
But this does not work.
In the picture on the left site you can find the layout with errors, on the right side the correct one.

and another error:
at Threshold-Config-Page:
Fatal error: Call to undefined function: timr() in /srv/www/htdocs/cacti08/plugins/thold/thold-functions.php on line 21
Changed to trim....

Greetings Torsten
Error #1

This seems more like the Plugin Architecture hasn't been applied properly. The file that takes care of this problem is lib/html.php, could you try re-applying the Plugin Architecture to that file (just override it with the provided files).


Error #2

This is now fixed, as you could see, sometimes I tend to type way too fast. Thanks!
sbot
Posts: 2
Joined: Mon Nov 07, 2005 3:39 pm

Re: http://forums.cacti.net/posting.php?mode=reply&t=776

Post by sbot »

cigamit wrote:
sbot wrote:Hi could any body help me on this one, when i click on the monitor tab a get teh following error

A session had already been started - ignoring session_start() in /data/www/html/cacti-0.8.6g/include/config.php on line 109, referer: http://localhost:9000/cacti/plugins/tho ... _thold.php
[client 192.168.2.1] PHP Fatal error: Cannot redeclare db_connect_real() (previously declared in /data/www/html/cacti-0.8.6g/lib/database.php:36) in /data/www/html/cacti-0.8.6g/lib/database.php on line 56, referer: http://localhost:9000/cacti/plugins/tho ... _thold.php[Mon Nov 07 22:30:33 2005] [error] [client 192.168.2.1] File does not exist: /data/www/html/favicon.ico

Regards Stephan,
I took care of this for the next version (which will be released shortly). I have already back-ported the changes to the current version, so you can re-download the latest version and give it another go.
Nop, still not working sorry, actually I alraedy downloaded the latest plugins and the latest arch patch, I have got nog problems with the thold plugin works fine for example.
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Re: broken links

Post by torstentfk »

Hi,

error1 fixed: indeed it was the html.php. now fixed.

thold reaplied: hostdown-notifcation does not work

btw: how can I use the thold-templates?

...Torsten

cigamit wrote:
torstentfk wrote:
cigamit wrote: Error #1
This seems more like the Plugin Architecture hasn't been applied properly. The file that takes care of this problem is lib/html.php, could you try re-applying the Plugin Architecture to that file (just override it with the provided files).

Error #2
This is now fixed, as you could see, sometimes I tend to type way too fast. Thanks!
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: broken links

Post by cigamit »

torstentfk wrote:Hi,

error1 fixed: indeed it was the html.php. now fixed.

thold reaplied: hostdown-notifcation does not work

btw: how can I use the thold-templates?

...Torsten
For the host down notifications, do you happen to have the "Alert e-mail" set in the settings? Someone has posted before that they reinstalled and compared their database and it was missing a few settings that were causing it not to work, but he never said which ones (the "Alert E-Mail is the only one it uses though).

Using threshold templates is fairly simple. Just create a new template and select a datasource (for example: CPU Usage). Now setup the template exactly how you want it (EX: High of 95, etc...). Now either goto a existing device, or create a new device. Click on the "Create Graphs for this Host" link that is at the top. On the next page you should see a link at the top that says "Auto-Create Thresholds". Clicking this link will go through all the graphs currently created for that device, and create thresholds using the templates you setup. Thats it!
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Re: thold notification

Post by torstentfk »

cigamit wrote: For the host down notifications, do you happen to have the "Alert e-mail" set in the settings? Someone has posted before that they reinstalled and compared their database and it was missing a few settings that were causing it not to work, but he never said which ones (the "Alert E-Mail is the only one it uses though).

Using threshold templates is fairly simple. Just create a new template and select a datasource (for example: CPU Usage). Now setup the template exactly how you want it (EX: High of 95, etc...). Now either goto a existing device, or create a new device. Click on the "Create Graphs for this Host" link that is at the top. On the next page you should see a link at the top that says "Auto-Create Thresholds". Clicking this link will go through all the graphs currently created for that device, and create thresholds using the templates you setup. Thats it!
Hi,
- email allert setting are set. see picture (allother settings are displayed).
- templates: wohhw - that's simple now.

Torsten
Attachments
test2.gif
test2.gif (11.14 KiB) Viewed 10504 times
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Plugin Architecture v0.9 Released

Post by cigamit »

I have made a minor update to the Plugin Architecture today to add 2 new hooks into utilities.php. These are currently needed for the new Mac Track plugin, and will allow other plugins to add their own "utility" to the Utilities page and to perform actions based on them.

Please note, only the patches and files for Cacti v0.8.6h have been updated, not the older versions of the Plugin Architecture.

For upgraders, all you need to do is to use the pre-patched utilities.php file, and override your current one with it.
Mikkel
Posts: 32
Joined: Thu May 12, 2005 12:41 am

Post by Mikkel »

I don't know if this question has been asked before, but I am experiencing some kind of memory leak with the Monitor plugin. Internet Explorer seems to use loads of memory when the monitor plugin is displayed. I left IE running over night displaying the monitor page and the memory usage went from 64MB to 216MB!

Anybody else ever noticed this?
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

Alerts are only sent to the first e-mail listed - I've tried with just a comma and a comma-space between the addresses.
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

So...has anyone else tried configuring more than one e-mail to send alerts to? Did it work? Did you use only a comma or was there a space involved?
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

knobdy wrote:So...has anyone else tried configuring more than one e-mail to send alerts to? Did it work? Did you use only a comma or was there a space involved?
Multiple emails works for me, I just use a comma, no space, but it shouldn't matter as it does a TRIM on the email before sending, so it strips the spaces.
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

cigamit wrote:Multiple emails works for me, I just use a comma, no space, but it shouldn't matter as it does a TRIM on the email before sending, so it strips the spaces.
Is there a script I can run manually to see why mine isn't working that way? I'm only getting them sent to the first e-mail configured.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests