Publication: The New Stack
Title: How I Created a Telegraf Plugin to Monitor Solar Panels
Abstract: In this article,how he created the http_listener_v2 Telegraf input plugin. After installing solar panels at his house, he realized that he wanted more access to how metrics were displayed, such as how much power and energy the panels were able to generate from the sun. He also wanted to correlate this data with temperature, cloudiness and sun intensity. To retrieve metrics from the solar panels, he was using Fronius solar inverter, which has a push service that can be configured to periodically send HTTP POST or FTP requests with the data encoded in JSON to the provided endpoint. Since he was also already using InfluxDB for storing other metrics from IoT devices, he thought of persisting the inverter-produced data there. At the time, the InfluxDB metrics collection agent Telegraf didn’t support parsing JSON (and other data formats) data sent via HTTP POST/PUT requests. So he decided to create a http_listener_v2 plugin for supporting that purpose.