Telegraf
Telegraf is an easy to use monitoring client compatible with many operating systems that has a Graphite output plugin, and many useful input plugins for collecting a wide variety of system metrics.
Last updated
Telegraf is an easy to use monitoring client compatible with many operating systems that has a Graphite output plugin, and many useful input plugins for collecting a wide variety of system metrics.
Last updated
Contents
Download Telegraf and unzip it (see the telegraf docs for up-to-date versions and installation commands for many operating systems). Packages and files are generally installed at /etc/telegraf/
.
Ubuntu/Debian
RedHat/CentOS
Locate the configuration file at /etc/telegraf/telegraf.conf
and open it in your preferred text editor, or a VIM shell. Make the following changes to the telegraf.conf file:
uncomment/configure the following lines:
[[outputs.graphite]]
servers = ["carbon.hostedgraphite.com:2003"]
prefix = "YOUR_API_KEY.telegraf"
alternatively, you can download a preconfigured telegraf.conf file from the Agents => Telegraf as mentioned above. Download the preconfigured file, move it to /etc/telegraf
, and replace the original.
Save your changes and start the telegraf service: sudo service telegraf start
or sudo systemctl start telegraf
. Within minutes, telegraf will start sending metrics into your Hosted Graphite account (with the ‘telegraf’ prefix).
Troubleshoot errors by running telegraf in the root directory of the telegraf.conf file: telegraf --config telegraf.conf
. Note: with older versions of telegraf, the influxdb output plugin is enabled by default and this will cause an error message that’s visible in the output when you run the telegraf daemon. To clear this error, comment out the [[outputs.influxdb]]
line in the telegraf.conf file.
Install Telegraf: brew install telegraf
Packages are usually installed at: /usr/local/etc/
(intel) or: /opt/homebrew/etc/
(silicon)
Similar to the Linux steps listed above, locate the configuration file and open it in your preferred text editor. Uncomment/configure the following lines in your telegraf.conf file:
[[outputs.graphite]]
servers = ["carbon.hostedgraphite.com:2003"]
prefix = "YOUR_API_KEY.telegraf"
Restart telegraf: brew services restart telegraf
. Metrics usually take about 3-5 minutes to appear in your Hosted Graphite account and will include the ‘telegraf’ prefix in the name.
Additionally, you can ‘serve’ the telegraf.conf file which can be helpful for troubleshooting any configuration issues: telegraf --config telegraf.conf
Download Telegraf using the wget command (an alias for Invoke-Webrequest) and unzip it:
Note: The link for the most up-to-date version of the config file can be found on the Telegraf downloads page.
Create a directory in Program Files, move the two telegraf files into it, and change the directory to the same location:
Create a new configuration file that includes the Graphite output-filter.
Open the telegraf.conf file using your preferred text editor. Uncomment the section titled [[outputs.graphite]] and uncomment/update the servers and prefix options:
Install telegraf to your services, and start it up:
Metrics will now appear in your Hosted Graphite account with the ‘telegraf’ prefix. More options for collecting Windows metrics include using the Windows Performance Counters plugin, which you can read more about in the win_perf_counters docs).
Once telegraf is installed, you can download a custom telegraf config in your Hosted Graphite account if you navigate to Agents => Telegraf. Then install telegraf using the steps below, and replace the default config with the custom config at the path that telegraf is installed at.
We love the Telegraf agent because it offers a wide variety of easy-to-install input plugins that allow you to collect additional metrics from a range of popular services and technologies like:
Other: (Kubernetes, Jenkins, Jolikia, Elasticsearch, Logstash, Kibana, Nginx, HAproxy, uWSGI, Docker, GitHub, Mailchimp, Salesforce, and many more!)
If you need help or advice on configuring the telegraf agent to include some input plugins, send us a message at support@hostedgraphite.com and we would be happy to walk you through the process.