<div dir="ltr">Hiya<div><br></div><div>I think I've found a rather obscure bug in the handling of the TRENDS overrides in hosts.cfg.  For example, the following hosts.cfg entry doesn't do what I'd expect:</div><div><br></div><div>192.168.0.1 <a href="http://server1.example.com">server1.example.com</a> # TRENDS:*,netstat_enhanced:ns1|ns2,netstat:netstat|netstat1</div><div><br></div><div>(Assume that GRAPHS in xymonserver.cfg includes "netstat" and "netstat_enhanced".)</div><div><br></div><div>I would expect that the trends page for this host would have graphs of ns1, ns2 (in place of netstat_enhanced), and netstat and netstat1 (in place of just netstat).</div><div><br></div><div>However, it appears that the "nestat_enhanced" entry masks the "netstat" entry, and the latter is set to the default of showing only the "netstat" graph.</div><div><br></div><div>Another example is, if I have TRENDS:*,_vmstat_,vmstat:vmstat|vmstat3|vmstat4|vmstat5,...</div><div>then my trends page shows only the one "vmstat" graph.  After removing the "_vmstat_" I get four vmstat graphs as specified.</div><div><br></div><div>If I upper-case any of the characters in the earlier definition, or if I move the definition to be later, everything works as expected.</div><div><br></div><div>I had a quick look at the code, but I can't read C well enough to find the bug.  Although I'm starting to suspect that the strstr() in svcstatus-trends.c might be successfully sub-string matching.  Instead, it should match only a whole word (perhaps terminated by whitespace, comman, pipe and colon.  But this is a guess, really.</div><div><br></div><div>J</div><div><br></div></div>