[rrd-users] be more selective with datasources to plot

2014-10-13 Thread Alceu R. de Freitas Jr.
Greetings,
I'm creating a rrdtool database with a large number of datasources (~45). It is 
working fine, but due the large number of datasources, it's pretty hard to make 
find out which line is which datasource based on the legend since I'm forced to 
used small intervals of color to make them different to the eyes.
Just to illustrate, I used an array to fetch a color for each line (hope it is 
OK to put Perl code here):
    my @colors = (
    '80', 'CD', '006400', '008080', '00BFFF', '00FA9A',
    '00FF7F', '00', '1E90FF', '228B22', '2F4F4F', '3CB371',
    '4169E1', '483D8B', '4B0082', '5F9EA0', '66CDAA', '6A5ACD',
    '708090', '7B68EE', '7FFF00', '80', '808000', '87CEEB',
    '8A2BE2', '8B008B', '8FBC8F', '9370DB', '98FB98', '9ACD32',
    'A52A2A', 'ADD8E6', 'AF', 'B0E0E6', 'B8860B', 'BC8F8F',
    'C0C0C0', 'CD5C5C', 'D2691E', 'D3D3D3', 'DA70D6', 'DB7093',
    'DCDCDC', 'DEB887', 'E6E6FA', 'EE82EE', 'F08080', 'F0F8FF',
    'F0', 'F5DEB3', 'F5F5F5', 'F8F8FF', 'FAEBD7', 'FAFAD2',
    );

In most of cases, only part of those datasources will have interesting results 
(~8% of datasources will have values near zero). I would like to filter only 
the datasources that have a value greater than a threshold.
My naive attempt was to use fetch with the same values I'll be using for graph 
(start date, end date an cfunc).
Is this procedure correct? Is there a better way to do that?
Thanks,
Alceu

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] be more selective with datasources to plot

2014-10-13 Thread Simon Hobson
Alceu R. de Freitas Jr. glasswal...@yahoo.com.br wrote:

 In most of cases, only part of those datasources will have interesting 
 results (~8% of datasources will have values near zero). I would like to 
 filter only the datasources that have a value greater than a threshold.

Fetch isn't a useful tool for this. Use graph, and PRINT (not GPRINT) to get 
the values you want (eg data source and max value). You can then use these in a 
script to dynamically generate a graph which only displays the data sources of 
interest.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


Re: [rrd-users] be more selective with datasources to plot

2014-10-13 Thread Alceu R. de Freitas Jr.
Hello Simon,
Not sure if I made myself clear.
I'm first using fetch to loop over the same data interval I would do for graph. 
Inside this loop, I will get the names of data sources that actually have the 
values I'm interested to see.
Out of the loop, I have all the data source names. I can then supply those 
names with the other parameter to generate the chart.
I can post part of the code if it makes easier to understand.
 

 Em Segunda-feira, 13 de Outubro de 2014 11:37, Simon Hobson 
li...@thehobsons.co.uk escreveu:
   
 

 Alceu R. de Freitas Jr. glasswal...@yahoo.com.br wrote:

 In most of cases, only part of those datasources will have interesting 
 results (~8% of datasources will have values near zero). I would like to 
 filter only the datasources that have a value greater than a threshold.

Fetch isn't a useful tool for this. Use graph, and PRINT (not GPRINT) to get 
the values you want (eg data source and max value). You can then use these in a 
script to dynamically generate a graph which only displays the data sources of 
interest.

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


 
___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users