https://github.com/mitchellh/lifeguard-graphite
Data source plugin for Lifeguard to query data from Graphite.
https://github.com/mitchellh/lifeguard-graphite
Last synced: 8 months ago
JSON representation
Data source plugin for Lifeguard to query data from Graphite.
- Host: GitHub
- URL: https://github.com/mitchellh/lifeguard-graphite
- Owner: mitchellh
- Created: 2012-06-07T23:24:59.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2012-06-19T21:32:34.000Z (about 14 years ago)
- Last Synced: 2025-04-26T03:34:36.341Z (about 1 year ago)
- Language: Shell
- Size: 238 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lifeguard Graphite Data Source
This is a [Lifeguard](https://github.com/mitchellh/lifeguard) plugin that
adds a data source for accessing information from [Graphite](http://graphite.wikidot.com/).
## Installation
To install the plugin, compile it and generate the release folder:
$ make deps
$ make rel
There will now be a folder `rel/lifeguard_graphite`. Copy this folder
into your Lifeguard plugin directory and add `lifeguard_graphite` to the
list of enabled plugins for Lifeguard. That's it!
## Usage
Once the plugin is installed, you can use the graphite data source with
your watches. Example to enable this in your `sys.config` to point at
a Graphite installation that is hosted at "graph.my-company.com":
```erlang
{data_sources, [
{"graphite", lifeguard_ds_graphite, [[
{host, "graph.my-company.com"}
]]}
]},
{plugins, [lifeguard_graphite]}
```
Then, you can query it like this from a watch:
```javascript
// Get the numbers for the past 10 minutes of the "app.http.200" graph
var data = Lifeguard.get("graphite", {
target: "app.http.200",
from: "-10minutes"
});
```