[Xymon] Sorting host names in hosts.cfg via include files

Don Kuhlman Don.Kuhlman at schawk.com
Thu Apr 5 20:41:22 CEST 2012


Hi folks. I'm working on reconfiguring my hosts.cfg file structures. Using a lot of includes to try and streamline and organize things.

I ran into a question about how the sorting works when using the include directives.

For example, I now have the main hosts.cfg file set up to show systems by OS – UNIX/MAC and WINDOWS
Under there is PROD/Dev.
Under there I use includes like hosts-windows-prod.cfg, hosts-windows-dev.cfg, etc.
These hosts-windows-prod.cfg etc files may include other files that I have setup by an application.
For example, the application named APP1, has certain servers.  It also has DEV & PROD servers.
So I built a hosts-windows-app1-prod.cfg file, hosts-windows-app1-dev.cfg file.
The file hosts-windows-app1-prod.cfg would be included in the hosts-windows-prod.cfg file, etc.

So, how do I use the group-sorted directive to get the entire set of hosts in order if there are three different includes in the subpage or subparent groups ?

More explanation below…

Server1 – is in app1 in hosts-windows-app1-prod.cfg
Winserver1 – is in app2 in hosts-windows-app2-prod.cfg

When I use the include hosts-windows-app1-prod and include hosts-windows-app2-prod directive, with a group-sorted comand above the include statements, I'm not getting Server1 before Winserver1.

Thanks

Don K

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20120405/3cefe018/attachment.html>


More information about the Xymon mailing list