On 14/12/11 1:17 AM, Henrik Størner wrote:
On 13-12-2011 15:05, Olivier AUDRY wrote:
no answer ? I want to find a way to get the list of all available trends to generate a report. Right now I 'm parsing the html. It's not elegant I want to find a better way to get this informations It's rather tricky, there is no simple way to do that. Basically, you'll have to scan the graphs.cfg file to see what filename-patterns exist, then scan the directory holding the RRD files for a host to check the actual filenames against the patterns from graphs.cfg.
Xymon's showgraph tool does that, but there is no simple way of exporting that information to other tools. And the way it is done makes it difficult when adding new graphs, or to control which graphs are actually displayed for a given host. See my e-mail of 2 days ago (RE: [Xymon] Problem adding GRAPHS in xymonserver.cfg (known bug?)) for related issues - what is described above is how it should work, but in practice it seems to look for RRD files matching graph definitions - i.e. graphname.*.rrd as a first pass before getting to the FNPATTERN step when it actually generates the graph image. In other words, svcstatus.sh doesn't use FNPATTERN but showgraph.sh does.
Even if svcstatus.sh did use FNPATTERN, some graphs will appear multiple times on the trends page but others only once.
David.
-- David Baldwin - Senior Systems Administrator (Datacentres + Networks) Information and Communication Technology Services Australian Sports Commission http://ausport.gov.au Tel 02 62147830 Fax 02 62141830 PO Box 176 Belconnen ACT 2616 david.baldwin at ausport.gov.au Leverrier Street Bruce ACT 2617
Keep up to date with what's happening in Australian sport visit http://www.ausport.gov.au