Ugly way of calculating % for threshold

Support questions about the Threshold plugin

Moderators: Developers, Moderators

mechin
Posts: 2
Joined: Tue Apr 01, 2008 7:06 am

Post by mechin »

hello,
when i modify config_arrays.php i have "Parse error: syntax error, unexpected ',' in /usr/share/cacti/site/include/config_arrays.php on line 228"

my config_arrays.php

$custom_data_source_types = array(
"CURRENT_DATA_SOURCE" => "Current Graph Item Data Source",
"ALL_DATA_SOURCES_NODUPS" => "All Data Sources (Don't Include Duplicates)",
"ALL_DATA_SOURCES_DUPS" => "All Data Sources (Include Duplicates)",
"CURRENT_DS_MINIMUM_VALUE" => "Current Data Source Item: Minimum Value",
"SIMILAR_DATA_SOURCES_NODUPS" => "All Similar Data Sources (Don't Include Duplicates)",
"CURRENT_DS_MAXIMUM_VALUE" => "Current Data Source Item: Maximum Value",
"CURRENT_GRAPH_MINIMUM_VALUE" => "Graph: Lower Limit",
"CURRENT_GRAPH_MAXIMUM_VALUE" => "Graph: Upper Limit"),
"VALUE_OF_HDD_TOTAL" => "Value of hdd_total data source");

can some one help me to fix it?
actived
Posts: 1
Joined: Tue Apr 01, 2008 7:32 am

Host MIB Available Disk Space

Post by actived »

I dont have a template for Host MIB - Available Disk Space. Is this a show stopper or can I import it from somewhere ?

Thanks
mechin
Posts: 2
Joined: Tue Apr 01, 2008 7:06 am

Post by mechin »

it's strange :o :o
i didnt instal it alone. It was with cacti
gab
Posts: 12
Joined: Tue Apr 22, 2008 9:55 am

Post by gab »

mechin wrote:hello,
when i modify config_arrays.php i have "Parse error: syntax error, unexpected ',' in /usr/share/cacti/site/include/config_arrays.php on line 228"

my config_arrays.php

$custom_data_source_types = array(
"CURRENT_DATA_SOURCE" => "Current Graph Item Data Source",
"ALL_DATA_SOURCES_NODUPS" => "All Data Sources (Don't Include Duplicates)",
"ALL_DATA_SOURCES_DUPS" => "All Data Sources (Include Duplicates)",
"CURRENT_DS_MINIMUM_VALUE" => "Current Data Source Item: Minimum Value",
"SIMILAR_DATA_SOURCES_NODUPS" => "All Similar Data Sources (Don't Include Duplicates)",
"CURRENT_DS_MAXIMUM_VALUE" => "Current Data Source Item: Maximum Value",
"CURRENT_GRAPH_MINIMUM_VALUE" => "Graph: Lower Limit",
"CURRENT_GRAPH_MAXIMUM_VALUE" => "Graph: Upper Limit"),
"VALUE_OF_HDD_TOTAL" => "Value of hdd_total data source");

can some one help me to fix it?
You should remove the red character.
myfreeke
Cacti User
Posts: 82
Joined: Tue Dec 04, 2007 10:24 pm

Post by myfreeke »

I add the CDEF, but I can not find in the Threshold CDEF add the CDEF
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

Hello ! i've implemented this way. It's work but when I show the Threshold, my value are in red with a current value 180225325 by example but when a open the Threshold for a specific graph, the current value is 18...

How can I do for fix this problem ?
Cacti 0.8.7b

-> Architecture plugin
-> Thold plugin
-> Monitor plugin
-> Weathermap plugin
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

I do not understand why its not working. Sometimes Thold takes the value and sometimes not. Yet all my graphics work and that is all the same.

Show the following:

Code: Select all

chmscoswin - Used Space - C: Label:Coswin [hdd_used] 90  off 37.1844 no 
chmscoswin - Used Space - D: Label:INGDAT [hdd_used] 90  off 0 no 
why this difference ???

Please help me !
Cacti 0.8.7b

-> Architecture plugin
-> Thold plugin
-> Monitor plugin
-> Weathermap plugin
redawg
Posts: 6
Joined: Sun Mar 30, 2008 10:58 pm

Post by redawg »

Doesnt work well..

I found another consistent way

http://forums.cacti.net/viewtopic.php?t=28156
User avatar
dune
Posts: 38
Joined: Tue Oct 24, 2006 4:19 pm
Location: Dallas, TX

Post by dune »

Does this still work? I'm trying to get THold percentages working as well and would much rather have it calculated real-time vs. adding more data to my RRAs. I know there are other methods, but they all appear to expand the data template.

When I add the line to my config_arrays.php, I cannot get it to show up when adding a "Special Data Source" item to my new CDEF. Here is how my array looks now:

Code: Select all

$custom_data_source_types = array(
	"CURRENT_DATA_SOURCE" => "Current Graph Item Data Source",
	"ALL_DATA_SOURCES_NODUPS" => "All Data Sources (Don't Include Duplicates)",
	"ALL_DATA_SOURCES_DUPS" => "All Data Sources (Include Duplicates)",
	"CURRENT_DS_MINIMUM_VALUE" => "Current Data Source Item: Minimum Value",
	"SIMILAR_DATA_SOURCES_NODUPS" => "All Similar Data Sources (Don't Include Duplicates)",
	"CURRENT_DS_MAXIMUM_VALUE" => "Current Data Source Item: Maximum Value",
	"CURRENT_GRAPH_MINIMUM_VALUE" => "Graph: Lower Limit",
	"CURRENT_GRAPH_MAXIMUM_VALUE" => "Graph: Upper Limit",
	"VALUE_OF_HDD_TOTAL" => "Value of hdd_total data source");
UPDATE: it's global_arrays.php now (as of 0.8.7a I believe), not config_arrays.php.
[b]dune[/b]
Cacti v0.8.7b/Spine v0.8.7c-beta2 (PA 2.1, Settings 0.5, THold 0.3.9) on Server 2003 SP2/IIS 6.0/PHP5/MySQL 5.0.45
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

The next version of Thold has built in Percentage calculations, which should fix this for everyone.
temak82
Cacti User
Posts: 59
Joined: Tue May 02, 2006 3:00 pm

Post by temak82 »

This is an old thread, but just set this up and everything seems to be working using this trick.

Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests