Thursday, October 12, 2017

Building a Better Telegraf Plugin for Beginners

DZone Database Zone
Building a Better Telegraf Plugin for Beginners
Building a Better Telegraf Plugin for Beginners

Seems like it was just yesterday that I was writing a blog about how to build a Telegraf plugin for beginners. Wait, that was just yesterday! And yet here I am back again writing another one. If you read that post and read all the way to the end, you'll remember that I said:

Ultimately, I'd like to expand and generalize it a bit so that it's not so specific to my needs — have it parse the readings that it is sent, and put them into the database based on other fields in the JSON.

I had no sooner hit "publish" on that post than I decided, "Why not just do it?" So I did. And I made it even better than I thought! I was only publishing a single value with that other plugin, which really wasn't that useful. In reality, my little sensor publishes six values, so publishing six different messages, one for each value, was going to be highly inefficient and too resource intensive. I had to make changes on the device, on the Particle Cloud, and in the Plugin to make it all work so I'll walk you through them all.

No comments:

Fun With SQL: Functions in Postgres

DZone Database Zone Fun With SQL: Functions in Postgres In our previous  Fun with SQL  post on the  Citus Data  blog, we covered w...