Thold: problem with v0.4.9 with displaying "warning" color

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
pier62350
Posts: 15
Joined: Thu Aug 02, 2012 9:12 am

Thold: problem with v0.4.9 with displaying "warning" color

Post by pier62350 »

Hi all,

I've just install cacti with the thold plugin and I can see many error in my log:

"Undefined index: Alarm-Warn in [...]/cacti/plugins/thold/thold_graph.php on line 1199"

After some research the Alarm-Warn Value is defined in line 986 in the $thold_status array.

Code: Select all

 $thold_status = array(
                '0' => 'Restore',
                '1' => 'Alert Trigger',
                '2' => 'Re-Trigger',
                '3' => 'Warning',
                '4' => 'Alarm',
                '5' => 'Restoral',
                '6' => 'Warn Trigger',
                '7' => 'Alarm-Warn');
This array is used by another one: $thold_log but there is an error in his define.

The original define (line 986) is:

Code: Select all

$thold_log = array(
                'Alarm'     => 'F21924',
                'Warning'   => 'FB4A14',
                'Re-Trigger' => 'FF7A30',
                'Alert Trigger'   => 'FAFD9E',
                'Warn Trigger'  => 'FAFD9E',
                'Restoral'  => 'CCFFCC',
                'Restore'   => 'CDCFC4',
                'Alarm2Warn' => 'FACD6E');
We can see that the name defined here is "Alarm2Warn"

We have just to replace "Alarm-Warn" by "Alarm2Warn" (line 986)

The result is the following:
before.png
before.png (5.33 KiB) Viewed 798 times
after.png
after.png (6.65 KiB) Viewed 797 times
Maybe a developper can make the change in the plugin package? (maybe you prefer change Alarm2Warn (line 976) by Alarm-warn?, in case I can edit my post to make the change
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests