:roll: Thresholds alarming prematurely?
Moderators: Developers, Moderators
:roll: Thresholds alarming prematurely?
Hi Guys I have just got thresholds, as close as possible to working for Percentage for Disk Space. I wanted to be emailed when the disk space was at 90% on the root partition.
So I followed this example: http://vivaz.net/2009/06/cacti-install- ... -settings/
Setup my Threshold for /
I created a massive file using seq to run up the disk space to get to 90%. And then Bam at 65% disk space I get an email letting me know I have gone above the threshold.
/dev/mapper/vg_templatenox-lv_root
34G 21G 12G 65% /
Now in the screenshot I see under the 'current' tab it's at 178.5804 which , yes is above 90 or 90%, hence the alarm, however the disk space has 65% free shouldn't this be displaying 65.88833 or something?
I am using Cacti 0.8.7.i and tholds: 0.4.9-3
Could someone please assist??
- Attachments
-
- tholdpercen.PNG (4.75 KiB) Viewed 4262 times
Re: :roll: Thresholds alarming prematurely?
I have the right CDEF Formula right...??
- Attachments
-
- cdefformula.PNG (25.89 KiB) Viewed 4257 times
Re: :roll: Thresholds alarming prematurely?
I was not aware such a "hidden" Special Data Source (VALUE_OF_HDD_TOTAL)...
Currently Cacti doesn't support that, but related code is included even in the latest (v0.4.9) thold plugin.
But current thold plugin can use another data source item within the given datasource to calculate evaluation value.
Try to use "RPN Expression" instead CDEF.
Does the same issue occur?
Graph:
Threshold settings:
Result:
(53MB / 1.5GB = about 3.5%)
Currently Cacti doesn't support that, but related code is included even in the latest (v0.4.9) thold plugin.
But current thold plugin can use another data source item within the given datasource to calculate evaluation value.
Try to use "RPN Expression" instead CDEF.
Does the same issue occur?
Graph:
Threshold settings:
Result:
(53MB / 1.5GB = about 3.5%)
Re: :roll: Thresholds alarming prematurely?
Hi noname, Thanks for your reply!
There is no hidden function I added into Cacti Manually using the instructions using this link: http://vivaz.net/2009/06/cacti-install- ... -settings/
17.4 some threshold examples
Create disk usage Thold template
When (used_space/total_space%) > 90%, cacti will send alert mail
4.1.1 Add “VALUE_OF_HDD_TOTAL” at global _arrays.php
vi /opt/www/html/cacti/include/global _arrays.php
add VALUE_OF_HDD_TOTAL
find
$custom_data_source_types = array(
add
“VALUE_OF_HDD_TOTAL” => “Value of hdd_total data source”,
add a new CDEF
Now go to Console -> Graph Management -> CDEFs click “Add” to add a new CDEF
Add new CDEF named like “Used Disk Space Percent”, at this CDEF, add 5 items:
Item #1 Special Data Source: CURRENT_DATA_SOURCE
Item #2 Custom String: 100
Item #3 Operator: *
Item #4 Special Data Source: VALUE_OF_HDD_TOTAL
Item #5 Operator: /
I have used your instructions below and changed from CDEF TO RPI
|ds:hdd_used|,100,*,|ds:hdd_total|,/
and it's looking better , I will test it tommrow a bit more. Still I wish I had a better understanding of the calculated value...
I know this is a bigger calculation then the last example...
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_templatenox-lv_root
34G 31G 734M 98% /
Threshold email:
Partition - /dev/mapper/vg_ [hdd_used] [hdd_used] went above threshold of 90 with 3896.2081
Thanks
There is no hidden function I added into Cacti Manually using the instructions using this link: http://vivaz.net/2009/06/cacti-install- ... -settings/
17.4 some threshold examples
Create disk usage Thold template
When (used_space/total_space%) > 90%, cacti will send alert mail
4.1.1 Add “VALUE_OF_HDD_TOTAL” at global _arrays.php
vi /opt/www/html/cacti/include/global _arrays.php
add VALUE_OF_HDD_TOTAL
find
$custom_data_source_types = array(
add
“VALUE_OF_HDD_TOTAL” => “Value of hdd_total data source”,
add a new CDEF
Now go to Console -> Graph Management -> CDEFs click “Add” to add a new CDEF
Add new CDEF named like “Used Disk Space Percent”, at this CDEF, add 5 items:
Item #1 Special Data Source: CURRENT_DATA_SOURCE
Item #2 Custom String: 100
Item #3 Operator: *
Item #4 Special Data Source: VALUE_OF_HDD_TOTAL
Item #5 Operator: /
I have used your instructions below and changed from CDEF TO RPI
|ds:hdd_used|,100,*,|ds:hdd_total|,/
and it's looking better , I will test it tommrow a bit more. Still I wish I had a better understanding of the calculated value...
I know this is a bigger calculation then the last example...
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_templatenox-lv_root
34G 31G 734M 98% /
Threshold email:
Partition - /dev/mapper/vg_ [hdd_used] [hdd_used] went above threshold of 90 with 3896.2081
Thanks
Re: :roll: Thresholds alarming prematurely?
Hmm, it seems that modification was derived from this post.Cactus84 wrote:There is no hidden function I added into Cacti Manually using the instructions using this link: http://vivaz.net/2009/06/cacti-install- ... -settings/
- http://forums.cacti.net/viewtopic.php?f=17&t=20486 (Of course, that's not ugly)
Re: :roll: Thresholds alarming prematurely?
Hi noname,
We still seem to have an issue I am posting my screenshots below:
This time the disk go to 70% and sent an alarm email:
Disk Stats:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_templatenox-lv_root
34G 22G 9.5G 70% /
Email:
ALERT: - Partition - /dev/mapper/vg_ [hdd_used] [hdd_used] went above threshold of 90 with 126.6311
and I used the RPN Expression...
In the above screenshot it shows current: 224.0932 which makes sense as 22GB is in use... how the alarm it hit's me up at 70% the alarm comes through and the graph is showing: 126.6311?
We still seem to have an issue I am posting my screenshots below:
This time the disk go to 70% and sent an alarm email:
Disk Stats:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_templatenox-lv_root
34G 22G 9.5G 70% /
Email:
ALERT: - Partition - /dev/mapper/vg_ [hdd_used] [hdd_used] went above threshold of 90 with 126.6311
and I used the RPN Expression...
In the above screenshot it shows current: 224.0932 which makes sense as 22GB is in use... how the alarm it hit's me up at 70% the alarm comes through and the graph is showing: 126.6311?
- Attachments
-
- tholdissue1.PNG (73.17 KiB) Viewed 4234 times
Re: :roll: Thresholds alarming prematurely?
Here is the thold screenshot alarm...
- Attachments
-
- tholdissue2.PNG (7.83 KiB) Viewed 4234 times
Re: :roll: Thresholds alarming prematurely?
I am using RRDtool 1.4, anyone else having issues..?
Re: :roll: Thresholds alarming prematurely?
"ucd/net - Hard Drive Space" data template doesn't have "hdd_total" data source item.
Try this RPN expression instead:
Try this RPN expression instead:
Code: Select all
|ds:hdd_used|,100,*,|ds:hdd_used|,|ds:hdd_free|,+,/
Re: :roll: Thresholds alarming prematurely?
Hi noname,
Thanks for your reply, this is the most accurate yet! I am noticing with theshold you have to wait a bit, so it can cycle through to get the result I will keep you posted soon!
Thanks!
Thanks for your reply, this is the most accurate yet! I am noticing with theshold you have to wait a bit, so it can cycle through to get the result I will keep you posted soon!
Thanks!
Re: :roll: Thresholds alarming prematurely?
Thanks noname it works great now on the ucd / net graphs just one last request I have tried your other formula:
|ds:hdd_used|,100,*,|ds:hdd_total|,/
On the HOST-MIB graphs and it seems to be showing 73.5498
/dev/mapper/VolGroup00-LogVol00
18G 13G 3.7G 78% /
Instead of close to the 78% in use. Can you please double check this?
Thanks
|ds:hdd_used|,100,*,|ds:hdd_total|,/
On the HOST-MIB graphs and it seems to be showing 73.5498
/dev/mapper/VolGroup00-LogVol00
18G 13G 3.7G 78% /
Instead of close to the 78% in use. Can you please double check this?
Thanks
- Attachments
-
- 79.PNG (73.71 KiB) Viewed 4222 times
Re: :roll: Thresholds alarming prematurely?
Probably it's a difference between AVERAGE (=graph item) and LAST (=thold current value).Cactus84 wrote: On the HOST-MIB graphs and it seems to be showing 73.5498
/dev/mapper/VolGroup00-LogVol00
18G 13G 3.7G 78% /
Instead of close to the 78% in use. Can you please double check this?
- http://forums.cacti.net/viewtopic.php?p=225422#p225422
Re: :roll: Thresholds alarming prematurely?
Thanks for your reply noname,
Where can I look to view this and change it? If not I will have to settle, and just change the threshold value to an "as close" value.
Where can I look to view this and change it? If not I will have to settle, and just change the threshold value to an "as close" value.
Re: :roll: Thresholds alarming prematurely?
Thold plugin uses the result which is last stored into poller_output table.
In detail,
at function process_poller_output() in 'cacti/lib/poller.php', Cacti calls this API function:
That API function will hand the result to registered function of plugins, so plugins can use the value which is most recently polled for their own purposes.
e.g.) thold_poller_output() in 'plugins/thold/includes/polling.php'
On the other hand, normally in the graph template, graph items are defined to show its AVERAGE which is stored in RRD file.
Probably that value is already adjusted to fit polling interval, and consolidated (e.g. averaged) by certain periods depend on RRA settings.
You can change graph template items with LAST instead of AVERAGE, but I'm not sure whether you will see close values to the threshold's.
In detail,
at function process_poller_output() in 'cacti/lib/poller.php', Cacti calls this API function:
Code: Select all
api_plugin_hook_function('poller_output', $rrd_update_array);
e.g.) thold_poller_output() in 'plugins/thold/includes/polling.php'
On the other hand, normally in the graph template, graph items are defined to show its AVERAGE which is stored in RRD file.
Probably that value is already adjusted to fit polling interval, and consolidated (e.g. averaged) by certain periods depend on RRA settings.
You can change graph template items with LAST instead of AVERAGE, but I'm not sure whether you will see close values to the threshold's.
Re: :roll: Thresholds alarming prematurely?
Thanks for your reply, noname
Before I attempt to play with these settings I was looking in the Thresholds section and notices it has the exact value as a meter.
Can this used for actual disk space or is it referring the exact value of RRD on the graph?
Before I attempt to play with these settings I was looking in the Thresholds section and notices it has the exact value as a meter.
Can this used for actual disk space or is it referring the exact value of RRD on the graph?
- Attachments
-
- evalue.PNG (4.48 KiB) Viewed 4178 times
Who is online
Users browsing this forum: No registered users and 3 guests