TS - Maintenance Mode for a group of hosts?
I have a request to take an entire area of hosts and place setup a maintenance window starting at a certain time and for say 3 hours.
Is there a script that I can send it a list and have it place all of the devices in maintenance mode?
All corporate servers will require a window of 3 hours at 6pm tonight.
Also, is there any option on the HOST line that will not show up (like an actual comment not the COMMENT: entry) that can be used to select them from.
e.g. the word 'CORP' in the options like that will normally be ignored by Xymon?
I am running Xymon 4.3.0-0.beta2.
Also, is there a way to show the COMMENT or DESCRIPTION on the line like it does in the non-green view under this release?
Thanks,
Tom Schmitt
Senior IT Staff
Salt Lake City, UT 84116
Phone (801) 594-3030
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
Have A Nice Day !
It is not necessary to change.
Survival is not mandatory.
-- W. Edwards Deming
You should be able to go into the Administration -> Enable/disable menu, select multiple hosts (ctrl-click for individual selection, shift-click for a top to bottom selection), and then put in a start/stop, duration and "reason".
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of d.tom.schmitt at L-3com.com Sent: Thursday, December 06, 2012 9:51 AM To: xymon at xymon.com Subject: [Xymon] TS - Maintenance Mode for a group of hosts?
I have a request to take an entire area of hosts and place setup a maintenance window starting at a certain time and for say 3 hours.
Is there a script that I can send it a list and have it place all of the devices in maintenance mode?
All corporate servers will require a window of 3 hours at 6pm tonight.
Also, is there any option on the HOST line that will not show up (like an actual comment not the COMMENT: entry) that can be used to select them from.
e.g. the word 'CORP' in the options like that will normally be ignored by Xymon?
I am running Xymon 4.3.0-0.beta2.
Also, is there a way to show the COMMENT or DESCRIPTION on the line like it does in the non-green view under this release?
Thanks,
Tom Schmitt
Senior IT Staff
Salt Lake City, UT 84116
Phone (801) 594-3030
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
Have A Nice Day !
It is not necessary to change.
Survival is not mandatory.
-- W. Edwards Deming
CONFIDENTIALITY NOTICE: This e-mail message, including all attachments, is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure, alteration or distribution is strictly prohibited and may violate state or federal law. If you are not the intended recipient, please contact the sender by reply e-mail, delete this email and destroy all copies of the message.
Tom,
$ man Xymon
disable HOSTNAME.TESTNAME DURATION <additional text>
Disables a specific test for DURATION minutes. This will cause the status of this test to be listed as "blue" on the Xymon server, and
no alerts for this host/test will be generated. If DURATION is given as a number followed by s/m/h/d, it is interpreted as being in sec-
onds/minutes/hours/days respectively. To disable a test until it becomes OK, use "-1" as the DURATION. To disable all tests for a
host, use an asterisk "*" for TESTNAME.
enable HOSTNAME.TESTNAME
Re-enables a test that had been disabled.
Shouldn't be hard to roll your own script from here or I can share a rather simple script we use.
David Gore (v965-3670) Network Management Systems (NMS) IMPACT Transport Team Lead - SCSA, SCNA Page: 1-800-PAG-eMCI pin 1406090 Vnet: 965-3676
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of d.tom.schmitt at L-3com.com Sent: Thursday, December 06, 2012 09:51 To: xymon at xymon.com Subject: [Xymon] TS - Maintenance Mode for a group of hosts?
I have a request to take an entire area of hosts and place setup a maintenance window starting at a certain time and for say 3 hours. Is there a script that I can send it a list and have it place all of the devices in maintenance mode?
All corporate servers will require a window of 3 hours at 6pm tonight. Also, is there any option on the HOST line that will not show up (like an actual comment not the COMMENT: entry) that can be used to select them from. e.g. the word 'CORP' in the options like that will normally be ignored by Xymon?
I am running Xymon 4.3.0-0.beta2.
Also, is there a way to show the COMMENT or DESCRIPTION on the line like it does in the non-green view under this release?
Thanks,
Tom Schmitt Senior IT Staff Salt Lake City, UT 84116 Phone (801) 594-3030 \\\\||//// \ ~ ~ / | @ @ | --oOo---(_)---oOo-- Have A Nice Day !
It is not necessary to change. Survival is not mandatory. -- W. Edwards Deming
If you only want the "disable" or "enable" to apply to a group of hosts, you can search for hosts matching any tag you wish using xymongrep. So for instance, if you have the following:
192.168.1.1 www.test.com # http telnet CORP 192.168.1.2 mail.test.com # smtp telnet FINANCE 192.168.1.3 ftp.test.com # ftp ssh CORP
Then you can disable the first and third (in "CORP" group) for 90 minutes with:
xymongrep CORP | while read IP NAME REST; do xymon $XYMSRV "disable $NAME.* 90m disabled group 1 servers"; done
If you want to disable at a future time, use the "schedule" command to submit the "disable" command at the right time. Or put the above into a script and schedule it using "at".
You can be very flexible with the entries in the host.cfg file, and they are normally ignored by Xymon unless then happen to match a test tag being used elsewhere. So instead of "CORP" and "FINANCE" you could have "GROUP=corp" and "GROUP=finance", and then match that string format appropriately, such as: xymongrep GROUP=corp. You're less likely to match another tag this way.
Then you can match all hosts that are in any group with: xymongrep 'GROUP=*'. You can even have hosts in multiple groups like: GROUP=CORP,Linux,prod; then match all corporate hosts with something like: xymongrep 'GROUP=' | egrep '=CORP|,CORP'
If you already have "NET:location" definitions in hosts.cfg, then you can match these with: xymongrep 'NET:*' Or you can match any untagged entries with
See the man page on xymongrep for more info.
J
On 7 December 2012 01:50, <d.tom.schmitt at l-3com.com> wrote:
I have a request to take an entire area of hosts and place setup a maintenance window starting at a certain time and for say 3 hours.****
Is there a script that I can send it a list and have it place all of the devices in maintenance mode?****
All corporate servers will require a window of 3 hours at 6pm tonight.****
Also, is there any option on the HOST line that will not show up (like an actual comment not the COMMENT: entry) that can be used to select them from.
e.g. the word ‘CORP’ in the options like that will normally be ignored by Xymon?****
I am running Xymon 4.3.0-0.beta2.****
Also, is there a way to show the COMMENT or DESCRIPTION on the line like it does in the non-green view under this release?****
*Thanks,*
*Tom Schmitt*
*Senior IT Staff*****
Salt Lake City, UT 84116****
Phone (801) *594-3030*****
**\\\\||////*****\ ~ ~ / *****| @ @ |**--oOo---(_)---oOo--*
- Have A Nice Day !*
*It is not necessary to change.*
*Survival is not mandatory.*
-- W. Edwards Deming*
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
participants (4)
-
d.tom.schmitt@L-3com.com
-
david.gore@verizon.com
-
jlaidman@rebel-it.com.au
-
Mike.Burger@FreedomMortgage.com