collectd-sidekiq-plugin

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2017 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

collectd-sidekiq-plugin

A collectd exec plugin to query Sidekiq status.

Using

wget github -O /usr/local/bin/check_sidekiq
./collectd_sidekiq --help

Then add collectd configuration:

LoadPlugin exec
<Plugin exec>
  Exec deploy "/usr/local/bin/check_sidekiq"
</Plugin>

(Change deploy to whatever user you want to run the check as.)

Then restart collectd:

sudo service collectd restart

You should soon see Sidekiq stats showing up in your graphs:

image

image

(the above is from Grafana + InfluxDB with a query like SELECT mean("value") FROM "sidekiq_value" WHERE "host" = 'li123-45.members.linode.com' AND "type" = 'queue_depth' AND "instance" = 'scraper' AND $timeFilter GROUP BY time($interval) fill(null))

Customising the check

To change the Redis instance to query:

./collectd_sidekiq --redis-server="192.168.1.111:6380"

To change the Redis database to query:

./collectd_sidekiq --redis-database=7

As of collectd 4.9, the exec plugin exports two environment variables:

  • COLLECTD_HOSTNAME - the global hostname
  • COLLECTD_INTERVAL - the global interval setting

To change the hostname the check reports as:

./collectd_sidekiq --hostname=$(hostname -f)

To change the interval the check runs at (this is useful for debugging):

./collectd_sidekiq --interval=5

Developing

Ensure you have Git, Go, and Redis installed, then run:

git clone https://github.com/auxesis/collectd-sidekiq-plugin.git
cd collectd-sidekiq-plugin
make # runs a local copy of the check
Releasing

Follow the above developing steps, then run:

make build

This will produce a binary at ./collectd_sidekiq.linux_amd64

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
_vendor
src/github.com/alecthomas/template
Package template implements data-driven templates for generating textual output.
Package template implements data-driven templates for generating textual output.
src/github.com/alecthomas/template/parse
Package parse builds parse trees for templates as defined by text/template and html/template.
Package parse builds parse trees for templates as defined by text/template and html/template.
src/github.com/alecthomas/units
Package units provides helpful unit multipliers and functions for Go.
Package units provides helpful unit multipliers and functions for Go.
src/github.com/garyburd/redigo/internal/redistest
Package redistest contains utilities for writing Redigo tests.
Package redistest contains utilities for writing Redigo tests.
src/github.com/garyburd/redigo/redis
Package redis is a client for the Redis database.
Package redis is a client for the Redis database.
src/github.com/garyburd/redigo/redisx
Package redisx contains experimental features for Redigo.
Package redisx contains experimental features for Redigo.
src/gopkg.in/alecthomas/kingpin.v2
Package kingpin provides command line interfaces like this: $ chat usage: chat [<flags>] <command> [<flags>] [<args> ...] Flags: --debug enable debug mode --help Show help.
Package kingpin provides command line interfaces like this: $ chat usage: chat [<flags>] <command> [<flags>] [<args> ...] Flags: --debug enable debug mode --help Show help.
src/gopkg.in/alecthomas/kingpin.v2/_examples/curl command
A curl-like HTTP command-line client.
A curl-like HTTP command-line client.

Jump to

Keyboard shortcuts

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