Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
alright, I believe I've found the exact part of the code that is the cause of my woes. if you look at the function get_current_value, at one point it does a search in $result["data_source_names"] for rrd_maximum. when I printed out the array, though, it only has three values, none of which are rrd_maximum:
so, if we can figure out why it's not in this array and (more usefully) how to get it in there, this should be fixed. here's the code with the problem line called out.
function get_current_value($rra, $ds, $cdef = 0) {
global $config;
$last_time_entry = thold_rrd_last($rra, "AVERAGE");
// This should fix and "did you really mean month 899 errors", this is because your RRD has not polled yet
if ($last_time_entry == -1)
$last_time_entry = time();
// Round down to the nearest 100
$last_time_entry = (intval($last_time_entry /100) * 100) - 300;
$last_needed = $last_time_entry + 300;
$result = rrdtool_function_fetch($rra, trim($last_time_entry), trim($last_needed));
// Return Blank if the data source is not found (Newly created?)
if (!isset( $result["data_source_names"])) return "";
-------> $idx = array_search($ds, $result["data_source_names"]);
// Return Blank if the value was not found (Cache Cleared?)
if (!isset($result["values"][$idx][0]))
return "";
$value = $result["values"][$idx][0];
if ($cdef != 0)
$value = thold_build_cdef($cdef, $value, $rra, $ds);
return round($value, 4);
}
Hi all,
How do i apply the patch included in this post. I am relatively new to Cacti. I am trying to get the THold plugin to work properly, but i don't understand what to do with this patch file. Any assistance would be greatly appreciated.
apperrault wrote:Hi all,
How do i apply the patch included in this post. I am relatively new to Cacti. I am trying to get the THold plugin to work properly, but i don't understand what to do with this patch file. Any assistance would be greatly appreciated.
app
You are using thold v0.3.2, the above patch is old, and should actually already be applied and possibly even changed a little.
I am using 0.3.2 version. I would really love to use this plugin, as an addition to Nagios that we are using here in our office, this way i can set specific thresholds for certain systems, that we want monitored differently than the corporate standard. Any assistance in getting this up and running would be greatly apprecaited.
apperrault wrote:I am using 0.3.2 version. I would really love to use this plugin, as an addition to Nagios that we are using here in our office, this way i can set specific thresholds for certain systems, that we want monitored differently than the corporate standard. Any assistance in getting this up and running would be greatly apprecaited.
Thanks much
app
What isn't working? The above patch should not be necessary anymore as it has already been integrated.
I cannot get percentages to work. I have tried creating the CDEF and applying it to the THold, but if i put in 90, for the space used, i don't get 90% i get alerted that the system is over 90 (MBs i would assume).
How do i get it to apply the percentages correctly?
apperrault wrote:I cannot get percentages to work. I have tried creating the CDEF and applying it to the THold, but if i put in 90, for the space used, i don't get 90% i get alerted that the system is over 90 (MBs i would assume).
How do i get it to apply the percentages correctly?
I have also attached a screen shot of the actual page.
Thanks for the help
app
Isn't CURRENT_DS_MAXIMUM_VALUE the maximum SEEN value of this DS? I mean if your HDD has 40GB and at some point it had 35GB used, CURRENT_DS_MAXIMUM_VALUE would return 35GB (not 40GB)?
I have installed thold 0.3.2 and the plugin architecture and so far so good. The one thing I am having a problem with is the CDEFs. I don't know if I should or should not be able to use custom CDEFs or not.
Currently I have the following available:
Make Stack Negative
Make Per 5 Minutes
turn Bytes into Bits
Multiply by 1024
Diviser Par Dix