sensu/sensu-plugin — pull request #55 by mrichar1 (2013-11-15 15:56:13+00:00)
Title: Add mixlib-cli and option parsing

Added mixlib-cli (as used for checks via sensu-plugins) to allow command-line option parsing in handlers.

Some explanation:

While the json config should be used for most configuration, this requires 'hard-coding' a config 'section name' into the handler - usually the name of the handler, so it knows where to read it's config from.

For handlers which would be well suited to being run repeatedly with different configurations (such as mailer, where addressing different recipients for different events is useful), this could be used to specify to the handler on the command-line which config section to read from the json.

Assuming this patch is accepted, I have modified xmpp and mailer to use this functionality, and will submit more pull requests later.