DataDog/dd-agent — pull request #1150 by donaldguy (2014-10-06 21:53:34+00:00)
Title: Turnkey check for mpherman/sidekiq

This check uses the ruby Sidekiq API to extract stats from running
sidekiq workers via the rails runner (or a configurable alternative
executable). In this way, it provides monitoring without requiring
modifications to the ruby application. It also avoids depending
on non-interface details of sidekiq, e.g. individual redis commands.

The tradeoff is the dd-agent user must be granted sufficient permissions
to spin up an instance of the application. This can be accomplished via
file permissions alone. Alternatively, the check provides the capacity
to sudo to a different user when executing the ruby runner.

This is probably not ideal for security or performance. An alternative
would be to depend on sidekiq_web (particularly the /dashboard/stats
endpoint), but that is an optional component of sidekiq and does not
report stats for individual queues.

The pattern of runner and script, as well as naive json parsing from
a specified tag, could reasonably be factored into a higher level
construct. I leave the decision as to if that is desirable to the
datadog masters.