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.
new wrote:
No, it is not an interface traffic, some dhcp server gives IP adresses from the poll, I need to have threshold of percentage of given from the total.
This is from the rrdtool graph
DEF:a="/opt/lampp/htdocs/cacti/rra/fbsr64k01_total_22994.rrd":total:AVERAGE \
DEF:b="/opt/lampp/htdocs/cacti/rra/fbsr64k01_total_22994.rrd":used:AVERAGE \
CDEF:cdeff=b,a,/,100,* \
I need to have a threshold when CDEF reaches for example 75 %.
OK, I see. Then yes, the same formula should work. What do you actually see? an error? 0? something else?
The current values is either = 0 (when I use ALL_DATA_SOURCES_NODUPS in CDEF) or the threshold are reached for all the devices (when I use SIMILAR_DATA_SOURCES_NODUPS), independent on the value. I tried to apply the CDEF to the hdd DS and the situation is the same, so this is a general problem.
What should I change in the thold-functions? In the topic there are several patches, I tried to apply the last one that you included, it does not work, maybe because I have a linux OS, therefore I would like to include the necessary changes in the original thold-functions file.
new wrote:
No, it is not an interface traffic, some dhcp server gives IP adresses from the poll, I need to have threshold of percentage of given from the total.
This is from the rrdtool graph
DEF:a="/opt/lampp/htdocs/cacti/rra/fbsr64k01_total_22994.rrd":total:AVERAGE \
DEF:b="/opt/lampp/htdocs/cacti/rra/fbsr64k01_total_22994.rrd":used:AVERAGE \
CDEF:cdeff=b,a,/,100,* \
I need to have a threshold when CDEF reaches for example 75 %.
OK, I see. Then yes, the same formula should work. What do you actually see? an error? 0? something else?
I made the modifications to thold_functions.php and created a new cdef for Percentage. The modification is working fine, I'm getting alerts, but I'm also getting a message in my cacti log for every alert:
I have been using this mod for the last few days and it seems to be working great. For an enhancement, is there a way to display the percentage in the thold tab, rather than the hdd_free (or used) instead? Obviously, right now the "Current" number being displayed is the actual number, not the percentage. If you alert on a percentage, it would be nice to display the percentage the metric is at, not the actual number.
I have been using this mod for the last few days and it seems to be working great. For an enhancement, is there a way to display the percentage in the thold tab, rather than the hdd_free (or used) instead? Obviously, right now the "Current" number being displayed is the actual number, not the percentage. If you alert on a percentage, it would be nice to display the percentage the metric is at, not the actual number.
Nice simple mod for something so useful!
I see what you mean. It wouldn't be too hard to store the 'post-CDEF' value somewhere...
cwahlin wrote:I am getting an error trying to patch thold-functions.php:
[root@cacti thold]# patch thold-functions.php hj.thold_functions.rpn.all_data_sources.patch
patching file thold-functions.php
Hunk #1 FAILED at 298.
patch: **** `<' expected at line 66 of patch
Is this patch for the newer version of thold only? I am still using 0.3.2
Carl
Yes, it's for the latest version (0.3.9).
I just upgraded our installation to 0.8.7b, get the new thold (and settings) and tried to run the patch again. Even downloaded the patch again to make sure... Exact same problem!!
[root@cacti thold]# patch thold_functions.php hjthold_functionsrpnall_data_sources_830.patch
(Stripping trailing CRs from patch.)
patching file thold_functions.php
Hunk #1 FAILED at 298.
patch: **** `<' expected at line 66 of patch
I don't know if it's funny, or just sad. I feel kind of stupid though as it is most likely something I did...
cwahlin wrote:
I don't know if it's funny, or just sad. I feel kind of stupid though as it is most likely something I did...
/Carl
It probably is something you did, but you can just sidestep the whole thing by downloading the .txt file that's prepatched, a few posts further on. Rename it to .php, and you're done.
Howie wrote:
I see what you mean. It wouldn't be too hard to store the 'post-CDEF' value somewhere...
Actually, mine already *does* show the percentage. It doesn't have a percentage sign after it, but it is the percentage and not the raw value. I don't think it's something I changed either.
Howie wrote:Actually, mine already *does* show the percentage. It doesn't have a percentage sign after it, but it is the percentage and not the raw value. I don't think it's something I changed either.
Huh, in looking closer, mine does too. I thought the period was a comma. I just don't need five digits of percentage points. One would be fine...
cwahlin wrote:
I don't know if it's funny, or just sad. I feel kind of stupid though as it is most likely something I did...
/Carl
It probably is something you did, but you can just sidestep the whole thing by downloading the .txt file that's prepatched, a few posts further on. Rename it to .php, and you're done.
That worked. Now I just have to make the CDEF work
Edit: Howie, your CDEF doesn't work for me. I am getting -100. My CDEF looks like yours:
cdef=CURRENT_DATA_SOURCE,100,*,ALL_DATA_SOURCES_NODUPS,CURRENT_DATA_SOURCE,-,/
And, I am trying to use this on the SNMP based hdd_used that comes with cacti.
I don't think it likes ALL_DATA_SOURCES_NODUPS. This value does not exist for me. When I do ALL_DATA_SOURCES_NODUPS - CURRENT_DATA_SOURCE I just get a negative value of the current used disk.
This seems to be going the direction I need, however a lack of knowledge on my side is preventing me to grasp all this. I have installed the patch to thold_functions.php. I have added CDEF as Howie stated. I still can't get multiple different HDD sizes on the same machine to show different High Thresholds. The CDEF I created does not show up on the Threshold Template I try to create. I am new to CACTI and RRD.
Cacti System:
Ubuntu 7.10
MySQL 5
PHP5
Cacti (latest and greatest)
PA (same)
Settings (same)
Thold (same)
Could someone just quickly do a step by step on what to do? People are referencing other posts, and I guess I am missing something. Cacti does 80% of what I need, the last part would be notifications and Thold has the possibility to do this.
When creating the cdef im not able to select it in the Threshold Template.
Fair enough.
So i updated my thold_functions.php under plugins\thold with an updated one... Still no joy.
Also im not able to use the patch because im running under windows, however this should not matter as the patch basically does what over writing the thold_functions.php does.
When creating the cdef im not able to select it in the Threshold Template.
Fair enough.
So i updated my thold_functions.php under plugins\thold with an updated one... Still no joy.
Also im not able to use the patch because im running under windows, however this should not matter as the patch basically does what over writing the thold_functions.php does.
Any assistance would be appreciated.
What does the CDEF look like? There are restrictions on which CDEFs Thold can use (from memory, I think it must contain CURRENT_DATA_SOURCE, and possibly not contain certain other things).