Threshold for Bandwidth %

Support questions about the Threshold plugin

Moderators: Developers, Moderators

TheHack
Posts: 28
Joined: Fri Apr 28, 2006 4:02 am

Post by TheHack »

BTW: You have to create an Threshold template for in and outbound separately because you have also two data sources (traffic_in/traffic_out).

In addition the CDEF template need to be adapted to the variable you use as reference.

These ifspeed vars need to be "input" not "output" as you stated above:

Code: Select all

    <ifSpeed>
      <name>Interface Speed</name>
      <direction>input</direction>
      <query_name>ifspeed</query_name>
    </ifSpeed>
If you use the percentage threshold template, you have to use the ifspeed of IfBandwidht as reference. But again the interface MIB is responding in bytes rather than bps.
brightm
Cacti User
Posts: 88
Joined: Wed Jun 16, 2010 6:20 am
Location: Bournemouth UK

Post by brightm »

Hi ,

Having had this working for a while I had to move from cacti version 0.8.7g beta 1 to the current release 0.8.7g. This broke thold which has been fixed in 0.4.2

I have installed 0.4.2 but this doesn't include the tweaks in thold_functions.php.

Is it ok to copy this patched version over the 0.4.2 version?
brightm
Cacti User
Posts: 88
Joined: Wed Jun 16, 2010 6:20 am
Location: Bournemouth UK

Post by brightm »

I have copied the calculations for percentage across to v04.2 thold_functions.php which seems to have workd, but am getting the following:

20-Jul-2010 22:50:02] PHP Warning: Division by zero in C:\wamp\www\cacti\plugins\thold\thold_functions.php on line 903


Any ideas? Thanks!
brightm
Cacti User
Posts: 88
Joined: Wed Jun 16, 2010 6:20 am
Location: Bournemouth UK

Post by brightm »

Scrap that I just found a post from TheHack that fixes this issue:
One remark: If you use query_ifspeed to calculate percentage of line speed, then you have to make sure that you deal with division by 0 on the rpn functio thold_rpn:
e.q. on line 905:

case 4:
if ($y == 0) return (-1);
return $x / $y;
break;
mikecarel
Cacti User
Posts: 68
Joined: Thu Jun 03, 2010 10:00 pm

Post by mikecarel »

I've been reading to this thread and I'm a bit confused on how to make this bandwidth threshold works. I've installed tholdv0.4.2 without any patches. I'm using the default Interface Traffic datasource in Cacti. I just want to monitor all my router interfaces which goes beyond 90% of its interface speed.

The attached picture seems to be not working. Hope someone can guide me on this. thanks
Attachments
traffic-thold.jpg
traffic-thold.jpg (73.39 KiB) Viewed 17865 times
mikecarel
Cacti User
Posts: 68
Joined: Thu Jun 03, 2010 10:00 pm

Post by mikecarel »

Disregard my post, I've already applied all necessary patches and followed TheHack instructions and it's now working fine.

Tnx.
relaxibus
Posts: 18
Joined: Thu Jan 09, 2014 6:26 am

Re: Threshold for Bandwidth %

Post by relaxibus »

Hi,

as I´m struggling with the same issue and searching in the web, I found this topic.

I have tryed to set up the same, but without success. :cry: Can you made a step by step configuration guide on how to configure this feature?

Thanks!! :)
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests