[collectd] exec-plugin does not get data

Francesco Sordillo f.sordillo at cineca.it
Tue Mar 31 10:10:14 CEST 2009


Il giorno gio, 26/03/2009 alle 18.50 +0100, Bruno Prémont ha scritto:
> Hi Francesco,

Hi Bruno and thanks for your reply.

> After what delay are you checking your RRD file's content?

After 1 minutes, 10 minutes and 1 hour... no changes.

> Probably collectd is caching the values for some time before writing
> them out to the RRD file. (see config settings of rrdtool plugin and
> eventually also network plugin if you use it)

My collectd configuration was:
------------------
LoadPlugin rrdtool
...
#<Plugin rrdtool>
#        DataDir "/var/lib/collectd"
#        CacheTimeout 120
#        CacheFlush   900
#</Plugin>
------------------

Now I uncommented <plugin > section and I have one rrd updated (rrd
data) and the other one NOT update (rrd data) but both files are updated
(ls -al).

My dump of rrd empty file (iozone_sequential.rrd --> iozone_sequential.xml) is completely empty.

-------- Header information -------------
	<version> 0003 </version>
	<step> 4 </step> <!-- Seconds -->
	<lastupdate> 1238144656 </lastupdate> <!-- 2009-03-27 10:04:16 CET -->

	<ds>
		<name> read </name>
		<type> GAUGE </type>
		<minimal_heartbeat> 8 </minimal_heartbeat>
		<min> 0.0000000000e+00 </min>
		<max> NaN </max>

		<!-- PDP Status -->
		<last_ds> UNKN </last_ds>
		<value> NaN </value>
		<unknown_sec> 0 </unknown_sec>
	</ds>

	<ds>
		<name> write </name>
		<type> GAUGE </type>
		<minimal_heartbeat> 8 </minimal_heartbeat>
		<min> 0.0000000000e+00 </min>
		<max> NaN </max>

		<!-- PDP Status -->
		<last_ds> UNKN </last_ds>
		<value> NaN </value>
		<unknown_sec> 0 </unknown_sec>
	</ds>
---------------------------------------------

------------ Archive Information --------------
...
<!-- 2009-03-27 08:47:00 CET / 1238140020 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2009-03-27 08:47:04 CET / 1238140024 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2009-03-27 08:47:08 CET / 1238140028 --> <row><v> NaN </v><v> NaN </v></row>
<!-- 2009-03-27 08:47:12 CET / 1238140032 --> <row><v> NaN </v><v> NaN </v></row>
...
-----------------------------------------------

It's foolish... Could you tell me what's appening???

Thanks.
Francesco.

> You could dump the RRD file to see when the last value was written and
> if the value is expected. If collected still has values cached you would
> see an older timestamp for the last value written to the RRD file.
> 
> Bruno
> 
> On Thu, 26 March 2009 Francesco Sordillo <f.sordillo at cineca.it> wrote:
> > Hi to all.
> > 
> > I am new here.
> > I installed collectd 4.5.1 on my SLES 10. I developed a bash script
> > for exec-plugin with "while loop". The output of my script is like
> > this one.
> > 
> > ###############
> > PUTVAL siss02/iozone-siss_devel_http/iozone_sequential interval="7"
> > 1238087067:1.57935:0.101224
> > 
> > PUTVAL siss02/iozone-siss_devel_http/iozone_random interval="6"
> > 1238087447:390.846:193.861 ###############
> > 
> > I defined two types in types.db
> > ###############
> > iozone_sequential       read:GAUGE:0:U, write:GAUGE:0:U
> > iozone_random   read:GAUGE:0:U, write:GAUGE:0:U
> > ###############
> > 
> > When I start collectd it works just for the first time that strings
> > are printed with "echo". So I get my rrd file.
> > 
> > ##################
> > <myhost>/iozone-siss_devel_http/iozone_random.rrd
> > <myhost>/iozone-siss_devel_http/iozone_sequential.rrd
> > ##################
> > 
> > Every run of my script updates rrd file (ls -al) BUT when I look into
> > rrd file it seems like rrd file are not updated.
> > 
> > ######### rrdtool info iozone_random.rrd ###########
> > filename = "iozone_random.rrd"
> > rrd_version = "0003"
> > step = 7
> > last_update = 1238087305
> > ds[read].type = "GAUGE"
> > ds[read].minimal_heartbeat = 14
> > ds[read].min = 0.0000000000e+00		<-------- ???
> > ds[read].max = NaN			<-------- ???
> > ds[read].last_ds = "UNKN"		<-------- ???
> > ds[read].value = NaN			<-------- ???
> > ds[read].unknown_sec = 0
> > ds[write].type = "GAUGE"
> > ds[write].minimal_heartbeat = 14
> > ds[write].min = 0.0000000000e+00	<-------- ???
> > ds[write].max = NaN			<-------- ???
> > ds[write].last_ds = "UNKN"		<-------- ???
> > ds[write].value = NaN			<-------- ???
> > ds[write].unknown_sec = 0
> > rra[0].cf = "AVERAGE"
> > rra[0].rows = 1200
> > rra[0].pdp_per_row = 1
> > rra[0].xff = 1.0000000000e-01
> > rra[0].cdp_prep[0].value = NaN
> > rra[0].cdp_prep[0].unknown_datapoints = 0
> > rra[0].cdp_prep[1].value = NaN
> > rra[0].cdp_prep[1].unknown_datapoints = 0
> > 
> > .............
> > 
> > rra[12].cdp_prep[0].value = 7.9821600000e+02
> > rra[12].cdp_prep[0].unknown_datapoints = 3017
> > rra[12].cdp_prep[1].value = 3.7773800000e+02
> > rra[12].cdp_prep[1].unknown_datapoints = 3017
> > rra[13].cf = "MIN"
> > rra[13].rows = 1201
> > rra[13].pdp_per_row = 3764
> > rra[13].xff = 1.0000000000e-01
> > rra[13].cdp_prep[0].value = 3.9910800000e+02
> > rra[13].cdp_prep[0].unknown_datapoints = 3017
> > rra[13].cdp_prep[1].value = 1.8886900000e+02
> > rra[13].cdp_prep[1].unknown_datapoints = 3017
> > rra[14].cf = "MAX"
> > rra[14].rows = 1201
> > rra[14].pdp_per_row = 3764
> > rra[14].xff = 1.0000000000e-01
> > rra[14].cdp_prep[0].value = 3.9910800000e+02
> > rra[14].cdp_prep[0].unknown_datapoints = 3017
> > rra[14].cdp_prep[1].value = 1.8886900000e+02
> > rra[14].cdp_prep[1].unknown_datapoints = 3017
> > #####################################################
> > 
> > Why my rrd file are empty? Anyone can help me?
> > Thanks.
> > 
> > Francesco.
> > 
> 




More information about the collectd mailing list