mapping purple to red, and wild card for COMPACT
list Ron Cohen
Hi
I was asked to create a test for the non/existence of crontab in hundreds of testers accounts. The issue is that those accounts using cron daily in order the refresh the testing environments during nights in preparation for next day activities. Testers being testers, quite often removed those crontabs, creating havoc for other testers. I wrote a small script which runs from each of those accounts cron, and sends "All good" to the xymon server. If crontab removed, the test obviously goes purple. This is working fine, but the Operation team who monitors xymon, is less sensitive to tests goes purple rather then red,and too often fails to report it. A while ago, someone asked the same question of mapping purple to red, and I said to myself, "Oh, I should remember this!" which of-course, I didn't, and can't find that exchange... can anyone help with this?
The other issue with this solution, is that there are hundreds of those account, and being lazy, I'm not too enthusiastic with the idea of maintaining arm length COMPACT lists. So what i tried to do is to use a wild card with the column name which is also the user name. So e.g. tester1 account will send a column c_tester1 etc. The compact will be COMPACT:crontab=c_.*
This is working - sought-of - there is a column named crontab, populated with all of the c_test accounts, BUT it also creates a column for each of them on the main page. Is there a way around it, or it is not a workable solution?
Cheers
Ron
list Ron Cohen
Hi
so the trick to use wild card with COMPACT while avoiding the columns creation, is to block those in the hosts.cfg .default line. like this:
0.0.0.0 .default. # TRENDS:*,!whatever, !c_.*
This works for a compiled 4.3.28. Might not for others.
Still couldn't find a way around the mapping of purple to red.
Will appreciate any help.
Cheers
Ron
▸
Hi
I was asked to create a test for the non/existence of crontab in hundreds of testers accounts. The issue is that those accounts using cron daily in order the refresh the testing environments during nights in preparation for next day activities. Testers being testers, quite often removed those crontabs, creating havoc for other testers. I wrote a small script which runs from each of those accounts cron, and sends "All good" to the xymon server. If crontab removed, the test obviously goes purple. This is working fine, but the Operation team who monitors xymon, is less sensitive to tests goes purple rather then red,and too often fails to report it. A while ago, someone asked the same question of mapping purple to red, and I said to myself, "Oh, I should remember this!" which of-course, I didn't, and can't find that exchange... can anyone help with this?
The other issue with this solution, is that there are hundreds of those account, and being lazy, I'm not too enthusiastic with the idea of maintaining arm length COMPACT lists. So what i tried to do is to use a wild card with the column name which is also the user name. So e.g. tester1 account will send a column c_tester1 etc. The compact will be COMPACT:crontab=c_.*
This is working - sought-of - there is a column named crontab, populated with all of the c_test accounts, BUT it also creates a column for each of them on the main page. Is there a way around it, or it is not a workable solution?
Cheers
Ron
list Ron Cohen
I was too quick on that... It does not really work.
▸
Hi
so the trick to use wild card with COMPACT while avoiding the columns creation, is to block those in the hosts.cfg .default line. like this:
0.0.0.0 .default. # TRENDS:*,!whatever, !c_.*
This works for a compiled 4.3.28. Might not for others.
Still couldn't find a way around the mapping of purple to red. Will appreciate any help.
Cheers
Ron
On 11/10/2019 18:52, Ron Cohen wrote:
Hi
I was asked to create a test for the non/existence of crontab in hundreds of testers accounts. The issue is that those accounts using cron daily in order the refresh the testing environments during nights in preparation for next day activities. Testers being testers, quite often removed those crontabs, creating havoc for other testers. I wrote a small script which runs from each of those accounts cron, and sends "All good" to the xymon server. If crontab removed, the test obviously goes purple. This is working fine, but the Operation team who monitors xymon, is less sensitive to tests goes purple rather then red,and too often fails to report it. A while ago, someone asked the same question of mapping purple to red, and I said to myself, "Oh, I should remember this!" which of-course, I didn't, and can't find that exchange... can anyone help with this?
The other issue with this solution, is that there are hundreds of those account, and being lazy, I'm not too enthusiastic with the idea of maintaining arm length COMPACT lists. So what i tried to do is to use a wild card with the column name which is also the user name. So e.g. tester1 account will send a column c_tester1 etc. The compact will be COMPACT:crontab=c_.*
This is working - sought-of - there is a column named crontab, populated with all of the c_test accounts, BUT it also creates a column for each of them on the main page. Is there a way around it, or it is not a workable solution?
Cheers
Ron
list Adam Thorn
▸
On 14/10/2019 14:57, Ron Cohen wrote:
Still couldn't find a way around the mapping of purple to red. Will appreciate any help.
I've no idea is this is natively possible, but you could for example periodically run a script on your xymon server along the lines of: ==== begin ==== #!/bin/bash for LINE in $(/usr/lib/xymon/client/bin/xymon 127.0.0.1 "xymondboard test=c_.* color=purple fields=hostname,testname"); do HOSTNAME=$(echo $LINE | cut -d '|' -f 1) TESTNAME=$(echo $LINE | cut -d '|' -f 2) /usr/lib/xymon/client/bin/xymon 127.0.0.1 "status+24h $HOSTNAME.$TESTNAME red some error message if you like" done ==== end ==== to find the hostname and testname for all purple c_.* tests and send a corresponding red status message with a lifetime of 24h (or whatever length you prefer). Adam
list Paul Root
Alerts.cfg can key off a test being purple.
▸
-----Original Message-----
From: Xymon <xymon-bounces at xymon.com> On Behalf Of Adam Thorn
Sent: Monday, October 14, 2019 11:44 AM
To: xymon at xymon.com
Subject: Re: [Xymon] mapping purple to red, and wild card for COMPACT
On 14/10/2019 14:57, Ron Cohen wrote:
Still couldn't find a way around the mapping of purple to red. Will appreciate any help.
I've no idea is this is natively possible, but you could for example periodically run a script on your xymon server along the lines of: ==== begin ==== #!/bin/bash for LINE in $(/usr/lib/xymon/client/bin/xymon 127.0.0.1 "xymondboard test=c_.* color=purple fields=hostname,testname"); do HOSTNAME=$(echo $LINE | cut -d '|' -f 1) TESTNAME=$(echo $LINE | cut -d '|' -f 2) /usr/lib/xymon/client/bin/xymon 127.0.0.1 "status+24h $HOSTNAME.$TESTNAME red some error message if you like" done ==== end ==== to find the hostname and testname for all purple c_.* tests and send a corresponding red status message with a lifetime of 24h (or whatever length you prefer). Adam
https://imss91-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=http%3a%2f%2flists.xymon.com%2fmailman%2flistinfo%2fxymon&umid=3415AA2A-94E1-F105-BC36-EBE3952656EC&auth=19120be9529b25014b618505cb01789c5433dae7-d727fa6fbb6312fd0749902d03a7dc7c3a60f7f7 This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
list Ron Cohen
Working fine. Thanks. ?Get BlueMail for Android ?
▸
On 14 Oct 2019, 18:09, at 18:09, Adam Thorn <user-f6b877930936@xymon.invalid> wrote:On 14/10/2019 14:57, Ron Cohen wrote:Still couldn't find a way around the mapping of purple to red. Will appreciate any help.I've no idea is this is natively possible, but you could for example periodically run a script on your xymon server along the lines of: ==== begin ==== #!/bin/bash for LINE in $(/usr/lib/xymon/client/bin/xymon 127.0.0.1 "xymondboard test=c_.* color=purple fields=hostname,testname"); do HOSTNAME=$(echo $LINE | cut -d '|' -f 1) TESTNAME=$(echo $LINE | cut -d '|' -f 2) /usr/lib/xymon/client/bin/xymon 127.0.0.1 "status+24h $HOSTNAME.$TESTNAME red some error message if you like" done ==== end ==== to find the hostname and testname for all purple c_.* tests and send a corresponding red status message with a lifetime of 24h (or whatever length you prefer). Adam