Update nginx-metrics.rb
Update nginx-metrics.rb

If multiple different sites are hosted on the same Nginx instance, and you want stats only for one of them, you will have to specify a custom Host header in your request, which will be different from the hostname part in the URL.

Also, sometimes it's easier to allow the stats page to be accessed only from localhost, and block it for the rest. Then, again, you'll need a custom Host header. Example:

./nginx-metrics.rb -u http://127.0.0.1/nginx_status --hostheader 'my.site.com'

For these reasons, I've added an option to allow custom values for the Host header that cannot be deduced from the URL.
sensu-plugins/sensu-plugins-nginx