[collectd] Curl output value threshold

Jeremy Hanna jeremy.hanna1234 at gmail.com
Mon Mar 8 18:27:25 CET 2010


I have a collectd metric that bases off of the curl plugin.  It gets a
numeric value from a webpage through a regex that writes to the
output, in my case, csv for now.

I check the output file and I verify that the output, e.g.
"1268065305,1" so it does have a positive value.

I configure a threshold to make sure it doesn't fall below 1 like this:
<Plugin "curl">
	<Type "counter">
		Instance "live-nodes"
		FailureMin 1
	</Type>
</Plugin>

However, in the log output, I see that it finds the output file but is
getting the wrong value and gives this message:
[2010-03-08 16:32:13] Notification: severity = FAILURE, host = gizmo,
plugin = curl, plugin_instance = hdfs-status, type = counter,
type_instance = live-nodes, message = Host gizmo, plugin curl
(instance hdfs-status) type counter (instance live-nodes): Data source
"value" is currently 0.000000. That is below the failure threshold of
1.000000.

So it seems that it isn't getting the correct value.

Here is the configuration of the curl plugin:
<Plugin curl>
	<Page "hdfs-status">
		URL "http://myserver:50070/dfshealth.jsp"
		<Match>
			Regex "Live Nodes</a>.*?([0-9]+)<tr"
			DSType "CounterSet"
			Type "counter"
			Instance "live-nodes"
		</Match>
	</Page>
</Plugin>

Any ideas why it is reading 0.00000 instead of 1 for that value?

Thanks a bunch.



More information about the collectd mailing list