New feature: Dependencies

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Post Reply
KyRoo
Cacti User
Posts: 51
Joined: Fri Oct 19, 2007 10:19 am

New feature: Dependencies

Post by KyRoo »

Hi All,

I asked if there was a dependency possibility in the thold plugin a while ago. There was not.
Now I’ve found some time to quickly throw something together.
Code is not very clean but it works. (in my case)

I base my code on : Thresholds (thold - v0.3.9)
Tested this on Cacti Version 0.8.7a and b, Plugin Architecture 1.4 and 2.0 but only with CMD.php.

How does it work, First you have to create a threshold any way you want.
For the moment I did not include this into the templates, so you will have to change the option manually.

When you create a threshold, you see a new option at the bottom.

Image

Here you can enter the THOLD ID of threshold that id the parent:
ex. If you have to monitor a remote localtion, you test the router, the local server, switch….
If the line goes down, you would normally get alerts for the router being not reachable so your ping test will fail, ping test of server and switch will fail, and so does every test you do on that local server (diskspace, cpu, …)
In some cases this will mean you will get a lot of alerts for this.

So with this feature you can enter the router as parent for the server, the server as parent of the diskspace test.
So if the router fails, you will only get an alert for the router, but you will still see every test that is down in the tholdlist view.

If you enable up down alerts you will still get them, because I don’t use them I did not look into it.

If you don’t want a test to have this feature, you just enter 0 as parent.


Here are the changed files:

Changes in table:

ALTER TABLE `cacti`.`thold_data` ADD COLUMN `parent` INTEGER NOT NULL DEFAULT 0 AFTER `template_enabled`;
ALTER TABLE `cacti`.`thold_data` ADD COLUMN `parent_triggered` INTEGER NOT NULL DEFAULT 0 AFTER `parent`;
Attachments
dep.zip
(14.06 KiB) Downloaded 177 times
Dep.jpg
Dep.jpg (20.59 KiB) Viewed 1424 times
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests