Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukaszkorecki/resque-statsd
Report resque stats to statsd. No dependencies
https://github.com/lukaszkorecki/resque-statsd
Last synced: 14 days ago
JSON representation
Report resque stats to statsd. No dependencies
- Host: GitHub
- URL: https://github.com/lukaszkorecki/resque-statsd
- Owner: lukaszkorecki
- License: gpl-3.0
- Created: 2015-02-17T14:58:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-02-18T09:46:05.000Z (over 9 years ago)
- Last Synced: 2024-10-04T18:21:08.004Z (about 1 month ago)
- Language: Shell
- Homepage:
- Size: 141 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Simple bash script to report resque stats to statsd
# Warning
This is alpha quality software. Be aware that it might eat your pet
# What it does?
By polling resque information directly from redis it will:
- pull all defined queues and their jobs counts
- number of failed jobsand push it to statsd. The keys will have the following format:
```
resque.$ENVIRONMENT.$QUEUE_NAME.gauge:$VALUE|g"```
for example
```
resque.staging.log_api.gauge:30|g
```I've tested this script with latest resque, statsd and grafana.
YMMV.# The setup
- Create a config file:
```bash
export STATSD_HOST=statsd.test.dev
export STATSD_ENV=production
export REDIS_HOST=redis.test.dev
export REDIS_PORT=6379
export REDIS_PASSWORD=foobar
```- Launch it:
```bash
./resque-statsd ./config.sh
```# Deployment
Easiest way is to:
- create the config
- add the script to cron with appropriate scheduleYou can also do something like this:
```bash
echo "REPORT_INTERVAL=30" >> config.sh
nohup ./resque-statsd ./config.sh > ./resque-statsd.log &
```(it will tell the script to poll redis every 30s, launch itself into the
background and detach from current session).This way is not really recommended.
# Licence
GPL
Łukasz Korecki, 2015