1

What I am trying to do is get alerts when my bandwidth goes above a limit. I am using Cacti to graph my bandwidth usage, but I currently get no alerts if my usage goes up.

So I think the best way to do this would be to write a script to check the graph data every say 5 mins.

Please can someone start me on the right track to this? I have looked online how to view the graphs but it gets very complicated for me.

  • are you asking how cacti can send email alerts? – Alex Jun 09 '15 at 11:31
  • Well I suppose that would work as well. I simply need an alert if my bandwidth usage goes up. I was just now looking into using snmpwalk to get the data so I wouldn't really need cacti at all, also this is more flexible for future. But please if you know how to send alert from Cacti let me know. –  Jun 09 '15 at 11:56
  • This sounds like a Cacti Notifications question. RRDTool does not send out alerts itself, it only stores the data. MRTG (similar to Cacti) can send out thresholded alerts, so I would assume Cacti can also, though I don't know how off the top of my head. – Steve Shipway Jun 10 '15 at 04:16
  • A quick Google shows that Cacti does not do threshold notifications natively, but this plugin adds the functionality: http://docs.cacti.net/plugin:thold – Steve Shipway Jun 10 '15 at 04:18

1 Answers1

0

If you are already using Cacti to collect and graph your bandwidth usage, then the thold plugin will allow you to set thresholds and notification methods. http://docs.cacti.net/plugin:thold

If you are not already using Cacti, then you could instead use MRTG (with RRDTool as the backend) to collect and graph the data. MRTG has a ThreshMaxO[] directive (and corresponding directives for Inbound and Minima) to define thresholds, and a ThreshProg[] directive to define which program or script to call to do the notification.

Steve Shipway
  • 3,754
  • 3
  • 22
  • 39
  • I ended up using Thold, and it's very nice. I originally wanted a single command that could simply print the last data retrieved from rrd graph. Then I would of wrote a script around that to send alerts. Thold seems to do everything I needed and more. –  Jun 10 '15 at 09:02