[Xymon] Separating Windows and Unix hosts and dropping bbd column from web page
Ward, Martin
Martin.Ward at colt.net
Fri Mar 23 11:56:21 CET 2012
OK, I think I see what you are after but there is a caveat. If you have a file APP1.cfg that has some servers and IP addresses specified in it and you include that more than once then you are effectively going to get two entries with the same hostname and IP address, which Xymon won't like. You can include a server more than once in the hosts.cfg files by specifying it once with its real IP address and then multiple times thereafter with an IP address of 0.0.0.0 - How you get around this is up to you, you could have two APP1.cfg files, one with the IPs and the other with 0-based IPs. You can include the second file multiple times and Xymon will be happy.
To answer your question about having Unix and Windows servers, I would recommend having multiple include files, one for each O/S, like this:
----
page AllServers Server Lists by Hostname
group-sorted UNIX_Systems
include APP1_unix.cfg
include APP2_unix.cfg
group-sorted WINDOWS_Systems
include APP1_windows.cfg
include APP2_windows.cfg
page Applications
group-sorted APP1
include APP1_unix_0.cfg
include APP1_windows_0.cfg
group-sorted APP2
include APP2_unix_0.cfg
include APP2_windows_0.cfg
----
In this manner you would have the servers all listed by O/S in the AllServers page, sorted by O/S, and in the Applications page they would be listed by application type. This assumes that the include files ending in "_0.cfg" are the same as the other include files but with the IP addresses zeroed out.
Any instructions you specify in the hosts.cfg file you can also specify in the include files, so if you always divided your servers into O/S groups then you could include the "group-sorted" lines in the include files themselves.
Does this help you any?
|\/|
From: Don Kuhlman [mailto:Don.Kuhlman at schawk.com]
Sent: 22 March 2012 16:56
To: Ward, Martin
Subject: Re: [Xymon] Separating Windows and Unix hosts and dropping bbd column from web page
Hi Martin. Yes - you have it exactly! Thanks for the reply. Here is some more detail to further discuss...
I have the hosts.cfg file with the Server list by hostname page. In this page I may have one or two hard coded servers that don't fit a particular group so they are actually typed right in that section.
Then I have my groups of applications - say APP1, APP2
Each group could have PROD or DEV servers and in each of these groups they could have Unix or Windows or even MAC systems.
I would like to just use an include APP1.cfg file on the "server list by hostname" page so I don't have to re-type or duplicate any hosts anywhere, and it also allows easier host management by having them in only one .cfg file.
My confusion is that if in the APP1.cfg file I have Unix and Windows hosts, I don't know how to use that include file on the server list by hostname page and then have the Unix and Windows hosts from the include file separate out.
For example, if I have a windows host named winserver1 and it's in the APP1.cfg file, when I include that APP1.cfg file in the hosts.cfg file page for servers by hostname, the winserver1 shows up in the Unix list (Or wherever I place the include APP1.cfg statement).
Does that make sense or is it even more muddy now ? ;)
Thanks again!
Don K
From: "Ward, Martin" <Martin.Ward at colt.net<mailto:Martin.Ward at colt.net>>
Date: Thu, 22 Mar 2012 16:30:49 +0000
To: Don Kuhlman <don.kuhlman at schawk.com<mailto:don.kuhlman at schawk.com>>
Subject: RE: [Xymon] Separating Windows and Unix hosts and dropping bbd column from web page
Hi Don,
I have not seen ".default." used more than once as you have done it so have no idea if that will work, however I use include files a lot so may be able to help you otherwise.
As far as I can tell from your description you have a single page on which you want servers displayed in two separate groups, UNIX_Systems and WINDOWS_Systems. Looking at your config file I would hazard a guess that your page looks like (x x x x x are meant to be the green/yellow/red/purple icons):
Server lists by hostname
UNIX_Systems
server1.domain.com x x x x x
server2.domain.com x x x x x
server3.domain.com x x x x x
app1a.domain.com x x x x x
app1b.domain.com x x x x x
app1c.domain.com x x x x x
app2a.domain.com x x x x x
app2b.domain.com x x x x x
app2c.domain.com x x x x x
server3.domain.com x x x x x
XYMON_Server x x x x x
WINDOWS_Systems
SERVER4-Domain-DC x x x x x
SERVER5 x x x x x
XYZCHIMEDAGT02 x x x x x
Server6 x x x x x
WinXP x x x x x
Note that the columns listed for UNIX_Systems and WINDOWS_Systems will differ depending on the tests that each server does.
Is this what you want as it looks like your config should give you what you need.
|\/|
From: xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com> [mailto:xymon-bounces at xymon.com] On Behalf Of Don Kuhlman
Sent: 19 March 2012 17:10
To: xymon at xymon.com<mailto:xymon at xymon.com>
Subject: [Xymon] Separating Windows and Unix hosts and dropping bbd column from web page
Hi folks. I thought I was getting the hang of this but I seem to be missing something.
I set up the hosts.cfg to use include files (see the snip below) to allow us to keep things more readable and managable.
I am trying to figure out the best way to put the Windows systems and Unix systems in their own list on the "AllServers" page but still use the include files. Is there a tag or directive I can use on the #CLIENT line to have xymon take a Windows or Unix host and put in it the right group?
Also, I'm having a problem getting one of the hosts to get rid of the purple status on bbd. I used the ./bb 127.0.0.1 "server2 drop bbd" command. I went into the hosts.cfg file for that server2 and tried !bbd, nobbd, NOBBD, but it still won't go away.
Any pointers would be appreciated.
Thanks!
Don K
0.0.0.0 .default.
# TITLE Server Lists byhostnames
page AllServers Server Lists by Hostname
group-sorted UNIX_Systems
10.1.nn.101 server1.domain.com # CLIENT:server1
10.1.nn.77 server2.domain.com # CLIENT:Server2
10.1.nn.81 server3.domain.com #http://server3.domain.com
# These are the APP1 servers
include /home/xymon/server/etc/hostsapp1prod.cfg
include /home/xymon/server/etc/hostsapp1dev.cfg
# These are the App2 servers
include /home/xymon/server/etc/hostsapp2prod.cfg
include /home/xymon/server/etc/hostsapp2test.cfg
10.1.nn.27 server3.domain.com #CLIENT:server3 http://server3.domain.com
10.1.nn.29 XYMON_Server #CLIENT:xyzxymon.domain.com http://xyzxymon.domain.com/xymon
group-sorted WINDOWS_Systems
0.0.0.0 .default. # NOCOLUMNS:bbd
10.1.nn.11 SERVER4-Domain-DC #CLIENT:SERVER4
10.1.nn.67 SERVER5 #CLIENT:SERVER501 ftp ssh
10.1.nn.192 XYZCHIMEDAGT02
10.1.nn.10 Server6 #CLIENT:server6
10.1.70.100 WinXP #CLIENT:domain-27429192 dialup
# Syntax for creating pages under subpages
# subparent parentpage newpage [Page-title]
page Applications Applications
subpage app1 APP1
subparent app1 app12x APP1 2.x
subparent app12x app12xprod APP1 2.x Prod
subparent app12x app12xdev APP1 2.x Dev
etc...
[Colt Disclaimer] The message is intended for the named addressee only and may not be disclosed to or used by anyone else, nor may it be copied in any way. The contents ofthis message and its attachments are confidential and may also be subject to legal privilege. If you are not the named addressee and/or have received this message in error, please advise us by e-mailing abuse at colt.net<mailto:abuse at colt.net> and delete the message and any attachments without retaining any copies. Internet communications are not secure and Colt does not accept responsibility for this message, its contents nor responsibility for any viruses. No contracts can be created or varied on behalf of Colt Technology Services, its subsidiaries, group companies or affiliates ("Colt") and any other party by email communications unless expressly agreed in writing with such other party. Please note that incoming emails will be automatically scanned to eliminatepotential viruses and unsolicited promotional emails. For more information refer to www.colt.net<http://www.colt.net> or contact us on +44(0)20 7390 3900
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20120323/ed80351c/attachment.html>
More information about the Xymon
mailing list