Company
Date Published
Author
Russ Savage
Word count
2157
Language
English
Hacker News points
None

Summary

Here is a summary of the text: Building a custom service input plugin for Telegraf to monitor keywords from a Twitter live stream and send them into InfluxDB. The first step is to set up the TICK Stack, including Telegraf, InfluxDB, Chronograf, and Kapacitor. Developer environment setup involves installing Go and configuring it for development. A new directory is created in the plugins folder with a file named twitter.go, where the code for the plugin will be written. The plugin configuration and Twitter API keys are set up, including Consumer Key, Consumer Secret, Access Token, Access Token Secret, and a list of keywords to track. The Start and Stop functions are added to turn the plugin into a service input plugin. The fetchTweets function is used to continuously listen for new tweets from the Streaming API and send them to InfluxDB. After completing the coding, the build instructions are followed to create a config file and run Telegraf with the new plugin. Finally, the results are explored in Chronograf to verify that everything is working as expected.