Skip to content
This repository has been archived by the owner on Jan 9, 2021. It is now read-only.

Add Resque. #14

Merged
merged 2 commits into from May 27, 2016
Merged

Add Resque. #14

merged 2 commits into from May 27, 2016

Conversation

gphat
Copy link
Contributor

@gphat gphat commented May 26, 2016

What's this PR do?

This adds minimal Resque metrics integration to Datadog.

Motivation

Internal tools asked!

Notes

There's more we could do here, but I only did the minimum that was easy since that's what @preinheimer asked for. We can add more and iterate if we like!

How To Deploy

  • Merge
  • Add to our internal puppet, etc.

How to Measure Success

Look for resque.worker_count!

How to Rollback

Revert, merge, repeat How To Deploy

cc @preinheimer

@gphat
Copy link
Contributor Author

gphat commented May 26, 2016

It works!

2016-05-26 20:47:34,341 | WARNING | dd.collector | checks.disk(disk.py:76) | Using `use_mount` in datadog.conf has been deprecated in favor of `use_mount` in disk.yaml
2016-05-26 20:47:34,357 | INFO | dd.collector | config(config.py:899) | initialized checks.d checks: ['network', 'stripe_consul', 'process', 'ntp', 'resque', 'linux_proc_extras', 'dns_check', 'linux_vm_extras', 'file', 'redisdb', 'disk']
2016-05-26 20:47:34,357 | INFO | dd.collector | config(config.py:900) | initialization failed checks.d checks: []
2016-05-26 20:47:34,357 | INFO | dd.collector | checks.collector(collector.py:533) | Running check resque
Metrics:
[('resque.jobs_failed',
  1464295654,
  '5',
  {'hostname': 'qa-supportbox1.northwest.stripe.io', 'type': 'gauge'}),
 ('resque.queues_count',
  1464295654,
  1,
  {'hostname': 'qa-supportbox1.northwest.stripe.io', 'type': 'gauge'}),
 ('resque.worker_count',
  1464295654,
  1,
  {'hostname': 'qa-supportbox1.northwest.stripe.io', 'type': 'gauge'}),
 ('resque.jobs_processed',
  1464295654,
  '20',
  {'hostname': 'qa-supportbox1.northwest.stripe.io', 'type': 'gauge'})]
Events:
[]
Service Checks:
[]
Service Metadata:
[{}]
    resque
    ------
      - instance #0 [OK]
      - Collected 4 metrics, 0 events & 0 service checks

@preinheimer
Copy link

Huzzah!

:shipit:

host = instance.get('host')
port = instance.get('port')

conn = redis.Redis(host=host, port=port)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing that I have found useful is issuing a service check here if the connection fails.

@antifuchs
Copy link
Contributor

Looks great to me - I think we'll want to add that service check, but

LGTM

As a quick win!

@stripe-ci stripe-ci assigned gphat and unassigned antifuchs May 27, 2016
@gphat
Copy link
Contributor Author

gphat commented May 27, 2016

Agreed. I'll make sure and follow up with service checks, tests and other iterative improvements.

@gphat gphat closed this May 27, 2016
@gphat gphat deleted the cory-add-resque branch May 27, 2016 17:26
@gphat gphat merged commit b8a7d16 into master May 27, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants