sensu-plugins / sensu-plugins-http

This plugin provides native HTTP instrumentation for monitoring and metrics collection, including: response code, JSON response, HTTP last modified, SSL expiry, and metrics via `curl`.
http://sensu-plugins.io
MIT License
30 stars 97 forks source link

fix metrics-http-json when used without --object #56

Closed mrooney closed 7 years ago

mrooney commented 7 years ago

Pull Request Checklist

Is this in reference to an existing issue? It is not.

General

Presently, both blocks are inside the unless, and so if you don't specify an object, it never grabs any metrics. This maintains the original behavior of doing both scans/outputs if you do specify an object, but if that is also a bug, then this should be an if/else.

Known Compatablity Issues

boutetnico commented 7 years ago

this patch helped me, thanks!

mrooney commented 7 years ago

Any possibility of a review @sstarcher @eheydrick? :)

mrooney commented 7 years ago

Thanks so much @sstarcher ! Any plans to make a new release to rubygems?

eheydrick commented 7 years ago

We need to fix the build then we can cut a new release. Looks like something may have broke with test-kitchen. I will investigate.