Graphite Monitor

This agent monitor plugin acts as a Graphite server, allowing you to import data from Graphite-compatible tools into Scalyr.

An agent monitor plugin is a component of the Scalyr Agent. To use a plugin, simply add it to the monitors section of the Scalyr Agent configuration file (/etc/scalyr/agent.json). For more information, see Agent Plugins.

Sample Configuration

Here is a simple configuration fragment showing use of the url_monitor plugin. This sample will record the instance type of the Amazon EC2 server on which the agent is running.

monitors: [
    module: "scalyr_agent.builtin_monitors.graphite_monitor"

By default, the plugin will listen for connecions on both of the standard Graphite TCP ports (2003 for the "plain text" protocol, and 2004 for "pickle" protocol). For security, it will only accept connections from localhost (i.e. from processes running on the same server). Set the configuration option only_accept_local to false to allow connections from other servers. You can also specify custom ports; see Configuration Reference.

Viewing Data

After adding this plugin to the agent configuration file, wait one minute for the agent to open the Graphite ports. Then configure your Graphite-compatible tools to send data to these ports.

Once you are sending Graphite data to the agent, go to the Search page and search for $monitor = 'graphite_monitor'. This will show all Graphite data imported by the agent, across all servers. You can use the Refine search by dropdown to narrow your search to specific servers and monitors.

The View Logs page describes the tools you can use to view and analyze log data. Query Language lists the operators you can use to select specific metrics and values. You can also use this data in Dashboards and Alerts.

Configuration Reference

Option Usage
module Always scalyr_agent.builtin_monitors.graphite_monitor
only_accept_local Optional (defaults to true). If true, then the plugin only accepts connections from localhost. If false, all network connections are accepted.
accept_plaintext Optional (defaults to true). If true, then the plugin accepts connections in Graphite's "plain text" procotol.
accept_pickle Optional (defaults to true). If true, then the plugin accepts connections in Graphite's "pickle" procotol.
plaintext_port Optional (defaults to 2003). The port number on which the plugin listens for plain text connections. Unused if accept_plaintext is false.
pickle_port Optional (defaults to 2004). The port number on which the plugin listens for pickle connections. Unused if accept_pickle is false.

Log Reference

Each event recorded by this plugin will have the following fields:

Field Meaning
monitor Always graphite_monitor
metric The Graphite metric name
value The Graphite metric value
orig_time The Graphite timestamp