librato

command
v0.0.0-...-f82f096 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

README

Librato Service Plugin for DC/OS

This plugin supports sending metrics from the DC/OS metrics service on both master and agent hosts to Librato.

Installation

Build this plugin (requires a Golang environment)
  1. go get github.com/dcos/dcos-metrics
  2. cd $(go env GOPATH)/src/github.com/dcos/dcos-metrics
  3. make && make plugins

The plugin will be available in the build directory:

$ tree build
build/
|-- collector
|   `-- dcos-metrics-collector-1.1.0-44-ga9f1e73
|-- plugins
|   `-- [email protected]
`-- statsd-emitter
    `-- dcos-metrics-statsd-emitter-1.1.0-44-ga9f1e73
Install the DC/OS Librato metrics plugin

For each host in your cluster, you'll need to transfer the binary you build for the plugin and then add a systemd unit to manage the service. This unit differs slightly between agent and master hosts.

Create a Valid Auth Token for DC/OS

The DC/OS docs have good info on making this auth token for OSS and enterprise DC/OS.

Deploy the Metrics Plugin to Every Cluster Host
  1. scp build/plugins/[email protected] my.host:/usr/bin
  2. ssh my.master "chmod 0755 /usr/bin/[email protected]"
Master Systemd Unit

Add a master systemd unit file: cat /etc/systemd/system/dcos-metrics-librato-plugin.service

[Unit]
Description=DC/OS Librato Metrics Plugin (master)

[Service]
ExecStart=/usr/bin/[email protected] \
	-dcos-role master \
	-auth-token <MY_AUTH_TOKEN> \
	-metrics-port 80 \
	-librato-email "your librato email" \
	-librato-token "your librato API token with record permissions" \
	-librato-metric-prefix "dcos"
Agent Systemd Unit

Add a agent systemd unit file: cat /etc/systemd/system/dcos-metrics-librato-plugin.service

[Unit]
Description=DC/OS Librato Metrics Plugin (agent)

[Service]
ExecStart=/usr/bin/[email protected] \
	-dcos-role agent \
	-auth-token <MY_AUTH_TOKEN> \
	-librato-email "your librato email" \
	-librato-token "your librato API token with record permissions" \
	-librato-metric-prefix "dcos"

Note: This plugin runs on port :61001 (agent adminrouter) by default, so we don't pass the port as we did in the master version of the service.

Enable, Start & Verify
  1. systemctl enable dcos-metrics-librato-plugin && systemctl start dcos-metrics-librato-plugin
  2. journalctl -u dcos-metrics-librato-plugin -> Make sure everything is OK

That's it!

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL