How can I add bandwidth usage alert


I want to allot bandwidth usage for each server for e.g. server 1 - 1TB data transfer per month, server 2 - 2 TB and so on.
Also want to set alert notification so that get alert on 80% & 95% consumption.

Hi @webkida,

the issue is not the alarming per se. It’s rather the correct measurement of the bandwidth usage. The output of ifconfig or ethtool for example relies on the stats in /proc/net. The data is lost during a reboot for example. So unless I miss something I would split this task into two steps:

  • create a script that writes the currently used bandwidth (maybe since the beginning of the month) to any kind of datastore. It could be a file, database, etc.
  • write a simple check plugin that reads from that datastore or use an existing plugin to read the value from a MySQL database for example and define the thresholds here

Another solution given that you have some kind of network interface monitoring already in place and icinga writes the performance data to Graphite or InfluxDB is to define proper queries in Grafana (if it’s used) and configure the alarming in Grafana. This has the advantage that you can use data you already have and don’t need extra services and plugins to achieve what you want but it has the downside that you will have 2 sources for the alarming.

Keep in mind that both solutions do have some small potential to be inaccurate and loose data - i.e. the traffic generated between the last run of the plugin and the reboot of that server. Whether we’re talking about a minor deviation or a large one depends on the number of reboots and the plugins check_interval.


I tried Graphite + InfluxDB, but now the dashboard is not displaying. No data, maybe I am missing something.

Please describe the setup with some more details and let us know what you’ve tried.

Did you try to send the data to Graphite and InfluxDB but do not have any data in any of them? If yes, did you enable the modules? Did you take a look at ?

We’ll be happy to help if you share some more info. :slight_smile: