metrics-es-node-graphite.rb constructs invalid URL when cert file flag is used
cwjohnston opened this issue · comments
In #101 many plugins in this collection were updated to add a --cert-file
argument. In this change, a bug was introduced in metrics-es-node-graphite.rb plugin in particular which prevents the check from correctly constructing a request URL when this flag is used.
Specifically, the value of the --host
argument is assigned to config[:server]
around https://github.com/sensu-plugins/sensu-plugins-elasticsearch/blob/4.2.0/bin/metrics-es-node-graphite.rb#L53-L57 but around https://github.com/sensu-plugins/sensu-plugins-elasticsearch/blob/4.2.0/bin/metrics-es-node-graphite.rb#L135-L144 the logic tries to use config[:host]
as the host component of the URL, which will always be null.