Hello all,

I noticed that in the python bindings of rrdtool-1.3.99909060808
the rrdtool.info() function the datasources in the flat hash dict returned
are partly indexed with the datasource name and partly indexed with numbers
(see example below). Besides beeing somehow inconsistent a problem arises:

How to find out the ordering of datasources to 
find the datasource name for the rra[].cdp_prep[] values (or for
using rrdtool.update('N:...:...:...')) without knowing the order
of the datasources.

How is this handled in other bindings (e.g. perl) ?

Please tell me if I missed something obvious,
  greetings
   Hermann

 
>>> import rrdtool
>>> rrdtool.__version__
'$Revision: 1.14 $'
>>> rrdtool.create('/tmp/test.rrd','--step','20','DS:ds2:GAUGE:300:0:100','DS:x1:GAUGE:300:0:100','DS:ds0:GAUGE:300:-5:100','RRA:AVERAGE:0.5:3:2')
>>> rrdtool.info('/tmp/test.rrd')
{'rra[0].cdp_prep[0].value': None, 'ds[ds2].min': 0.0, 'ds[ds0].min': -5.0, 
'rra[0].cdp_prep[1].unknown_datapoints': 1L, 'ds[ds2].value': 0.0, 
'ds[ds2].last_ds': 'U', 'ds[x1].max': 100.0, 'ds[ds2].unknown_sec': 5L, 
'ds[ds0].value': 0.0, 'ds[ds0].unknown_sec': 5L, 'ds[ds0].max': 100.0, 
'ds[ds2].max': 100.0, 'rrd_version': '0003', 'filename': '/tmp/test.rrd', 
'last_update': 1256646805L, 'rra[0].cf': 'AVERAGE', 'ds[x1].type': 'GAUGE', 
'rra[0].pdp_per_row': 3L, 'rra[0].cur_row': 1L, 'header_size': 1172L, 
'ds[ds0].last_ds': 'U', 'step': 20L, 'rra[0].cdp_prep[0].unknown_datapoints': 
1L, 'ds[ds0].type': 'GAUGE', 'rra[0].cdp_prep[2].value': None, 
'ds[x1].last_ds': 'U', 'ds[ds2].minimal_heartbeat': 300L, 'rra[0].rows': 2L, 
'ds[x1].min': 0.0, 'ds[ds0].minimal_heartbeat': 300L, 'ds[x1].unknown_sec': 5L, 
'rra[0].xff': 0.5, 'rra[0].cdp_prep[2].unknown_datapoints': 1L, 'ds[ds2].type': 
'GAUGE', 'rra[0].cdp_prep[1].value': None, 'ds[x1].value': 0.0, 
'ds[x1].minimal_heartbeat': 300L}
 
-- 
Netzwerkadministration/Zentrale Dienste, Interdiziplinaeres 
Zentrum fuer wissenschaftliches Rechnen der Universitaet Heidelberg
IWR; INF 368; 69120 Heidelberg; Tel: (06221)54-8236 Fax: -5224
Email: hermann.la...@iwr.uni-heidelberg.de

_______________________________________________
rrd-developers mailing list
rrd-developers@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers

Reply via email to