All,
Somewhat similar question to one asked earlier about custom data/graphing
I have a script that gets SAR data. I am creating the rrd files manually up front, as they have a different step frequency that hobbit would create.
It outputs (for example)
cpu0pusr:number cpu0pwio:number cpu0pidl:number cpu1pusr:number cpu1pwio:number cpu1pidl:number
etc... This can vary based on the number of cpu's in the box. I am only doing this on a limited number of hosts (3) so hand creating the RRD's isn't too big of a deal. The problem is graphing. Some of these have 16 CPU's, some only 4. If I create a graph definition, it would have to be universal (i.e have up to 16 definitions for everything) but that would make the graphs for the boxes with only 4 CPU's not look right (I think, havn't tested yet)
What I was wondering is, is there a way in the hobbitgraph.cfg to do something like: (NOTE: I know this syntax isn't correct, it's more for readability purposes)
[sar] TITLE sar data YAXIS percent DEF:cpu$NUMpusr=sar.rrd:cpu$NUMpusr:AVERAGE DEF:cpu$NUMpwio=sar.rrd:cpu$NUMpwio:AVERAGE DEF:cpu$NUMpidl=sar.rrd:cpu$NUMpidl:AVERAGE LINE1:cpu$NUMpusr#CC3333:cpu$NUM percent usr LINE1:cpu$NUMpwio#FF0000:cpu$NUM percent wio LINE1:cpu$NUMpidl#0000FF:cpu$NUM percent idle COMMENT:\n GPRINT:cpu$NUMpusr:LAST:CPU $NUM usr \: %5.1lf%s (cur) GPRINT:cpu$NUMpusr:MAX: \: %5.1lf%s (max) GPRINT:cpu$NUMpusr:MIN: \: %5.1lf%s (min) GPRINT:cpu$NUMpusr:AVERAGE: \: %5.1lf%s (avg)\n GPRINT:cpu$NUMpwio:LAST:CPU $NUM wio. \: %5.1lf%s (cur) GPRINT:cpu$NUMpwio:MAX: \: %5.1lf%s (max) GPRINT:cpu$NUMpwio:MIN: \: %5.1lf%s (min) GPRINT:cpu$NUMpwio:AVERAGE: \: %5.1lf%s (avg)\n GPRINT:cpu$NUMpidl:LAST:CPU $NUM idle. \: %5.1lf%s (cur) GPRINT:cpu$NUMpidl:MAX: \: %5.1lf%s (max) GPRINT:cpu$NUMpidl:MIN: \: %5.1lf%s (min) GPRINT:cpu$NUMpidl:AVERAGE: \: %5.1lf%s (avg)\n
I think the more correct way is to split the RRD files into sar0.rrd, sar1.rrd, etc... and use the FPATTERN thing with the index. I can split the output up and change the test name for each cpu to sar0,sar1 etc.. so that it updates the correct RRD, but I just wanted to find out first if there is a way to do this in 1 RRD and do the work in the graph portion.
Thanks, Jeff
participants (1)
-
jeffnewman75@gmail.com