Community Project: Internet Connection Monitoring
Behrends has set up ISP Monitor by leveraging InfluxDB and Telegraf for storage and alerting on Raspberry Pi’s for several friends’ and families’ houses. They receive notifications on their phone when the internet is down and when it comes back up. ISP reliability in Argentina is not always a given. This capability is pretty useful for power outages!
The goal is to set up a local Agent (most commonly using a Raspberry Pi) to run in your home, and make it report all data to InfluxDB. The default configuration of the Agent will ping every ten seconds to google.com and 126.96.36.199. It will also measure DNS resolution to google.com domain using 188.8.131.52 and 184.108.40.206 DNS Servers. With this information being reported constantly to InfluxDB, it is possible to configure Deadman Alerts to notify users regarding downtime. This is also useful for identifying power outages, and ISP quality by reviewing package loss jitter.
Behrends likes that InfluxDB is open source. Instead of building your own toolset to store time series data, you already have a UI to build beautiful charts, and an alerting system. He is leveraging the simple configuration of InfluxDB and Telegraf to achieve his goals in just a couple of minutes. The fact that all these products are open source allows Behrends to deploy his own infrastructure, which is configurable and extensible.
Behrends has used Telegraf, InfluxDB, and Grafana for several projects:
- Telegraf: The amount of plugins provided out of the box are incredible! It also runs in several platforms (Mac, Linux, Raspberry Pi’s and even Unifi Router)
- InfluxDB: Great time series DB built to scale and great integration with Telegraf and Grafana
- Grafana: Beautiful UI to query and consume all InfluxDB metrics, with an excellent alerting system.
Behrends recommends starting with small queries and increasing the complexity over time. Coming from SQL, InfluxQL will be pretty straightforward. However, Flux queries take some more time to get used to the syntax, but it is way more powerful!