Getting Started

In this guide we’ll demonstrate how to install and configure a monitoring agent, view and manage the generated metrics, and finally how to create a simple dashboard with Grafana. This material is also available on the Account Overview page when you first open your account.

For information on sending metrics without a monitoring service, take a look at the examples in our Language Guide.

Using the Hosted Graphite Agent (RHEL/Debian)

The simplest client to install is our own Hosted Graphite Agent client, which is already configured with your API key, monitors itself and can be used to send metrics from your own applications to Hosted Graphite as well.

Installing the HG Agent

  1. The Hosted Graphite Agent can be configured and installed with a single command. Insert your API key into the appropriate command for your operating system:
Debian/Ubuntu: curl -s | sudo sh
RHEL: curl -s | sudo sh

You can also find the command with the API key already filling in, by clicking the ‘How do I send metrics?’ button beneath your API key on the Account Overview page.

The 'How do I send metrics?' button
  1. Go to your server you wish to monitor, and paste this command into the terminal. Press enter - the Agent should be uploaded and installed automatically.

To confirm the HG-Agent is working correctly, go to the Agents page on your Hosted Graphite account.

Agent page showing active agents and links to the dashboard

Agent page showing active agents and links to the dashboard

Viewing the HG-Agent Dashboard

A dashboard is generated automatically when you install the HG Agent, which you can access via the Agents page. Find your agent and click the dashboard icon to the right of the page. You’ll be taken to the HG Agent Dashboard in Grafana with that agent selected. Use the dropdown menu at the top to browse any other agents you have installed.

Using collectd (for other Linux systems)

collectd is a simple monitoring client which can be installed on most Linux systems. To simplify configuration, we provide a configuration file for you to use.

Installing and configuring collectd

  1. Install collectd on your system. It’s usually available via your normal package manager, e.g. apt-get install collectd
  2. From the Hosted Graphite Add-ons page, select collectd and download the appropriate configuration file. Version 5.4 works with most versions of collectd
  3. Copy the downloaded configuration file to /etc/collect/collectd.conf. If you want to keep the original configuration file, rename it to collectd.conf.old
  4. Restart collectd so that it uses the new configuration file: sudo service collectd restart

Generating and viewing the collectd dashboard

Once collectd is up and running, you can automatically generate a dashboard from our dashboard library. Go to the Add-ons page and scroll down to the Dashboards section.

The Dashboard Library panel

The Dashboard Library panel

On that panel select the collectd version you want to make a dashboard for and click the button. In Grafana a dashboard will immediately be available for your collectd metrics.

For details on how to manually configure collectd, the main docs page is here.

Using Telegraf (Windows)

Telegraf is an easy to set up and configure monitoring client for windows (and linux) that has a Graphite output plugin.

installing and configuring Telegraf via Powershell

  1. Download Telegraf using the wget commend (an alias for Invoke-Webrequest) and unzip it:
> wget -O
> Expand-Archive .\

Note: This is the current version as of March 2018. The link for the most up-to-date version can be found on the Telegraf downloads page.

  1. Create a directory in Program Files, move the two telegraf files into it, and change directory to the same location:
> mkdir 'C:\Program Files\Telegraf'
> mv .\telegraf-1.5.2_windows_amd64\telegraf\*.* 'C:\Program Files\Telegraf'
> cd 'C:\Program Files\Telegraf'
  1. Create a new configuration file which includes the Graphite output-filter.
> ./telegraf.exe --output-filter graphite config > telegraf.conf
  1. Open the telegraf.conf file using your preferred text editor. Find the section titled [[outputs.graphite]] and change the servers and prefix options:
> servers = [""]
> prefix = "YOUR-API-KEY.telegraf"
insert your account details into the telegraf config file

The graphite output section of the telegraf configuration file

  1. Install telegraf to your services, and start it up:
> ./telegraf.exe -service install -config 'C:\Program Files\telegraf\telegraf.conf'
> net start telegraf
register telegraf as a service and start it up

Registering telegraf as a service

Metrics will appear under the ‘telegraf’ prefix.