<div dir="ltr"><div dir="ltr">On Thu, Jun 4, 2020 at 3:36 PM <<a href="mailto:me@tdiehl.org">me@tdiehl.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
On Thu, 4 Jun 2020, Adam Thorn wrote:<br>
<br>
> On 03/06/2020 22:49, <a href="mailto:me@tdiehl.org" target="_blank">me@tdiehl.org</a> wrote:<br>
>>  Hi,<br>
>><br>
>>  I am trying to configure xymon dependencies so that if the core router is<br>
>>  down<br>
>>  my xymon server only pages me for the core router.<br>
>><br>
>>  In reading the man page it says to do something like the following:<br>
>><br>
>>  1.2.3.4 <a href="http://cg1.example.com" rel="noreferrer" target="_blank">cg1.example.com</a> # noconn <a href="https://cg1.example.com" rel="noreferrer" target="_blank">https://cg1.example.com</a><br>
>>  depends=(http:<a href="http://router.example.com/conn" rel="noreferrer" target="_blank">router.example.com/conn</a>)<br>
>><br>
>>  The above works for a single service but the above host for example has<br>
>>  http and sslcert. How can I tell xymon that if <a href="http://router.example.com" rel="noreferrer" target="_blank">router.example.com</a> is down<br>
>>  all<br>
>>  of the other services for a host should go clear?<br>
>><br>
>>  I tried setting the service to a * that does not work. and I tried listing<br>
>>  services separated with either a comma or a pipe but no joy.<br>
><br>
> "man hosts.cfg" suggests that the syntax you want is<br>
><br>
> depends=(testA:host1/test1,host2/test2),(testB:host3/test3)<br>
><br>
> so for your example,<br>
><br>
> depends=(http:<a href="http://router.example.com/conn" rel="noreferrer" target="_blank">router.example.com/conn</a>),(sslcert:<a href="http://router.example.com/conn" rel="noreferrer" target="_blank">router.example.com/conn</a>)<br>
<br>
That does not work for the sslcert test but does work for things like ssh.<br>
Which now makes sense given the info below.<br>
<br>
><br>
> As the man page says, "depends" only applies to tests performed by xymonnet. <br>
> Wildcards do not appear to be supported but protocols.cfg will show you most <br>
> of the tests that xymonnet might perform.<br>
<br>
Ok, that explains why the neither the conn or sslcert test will not go clear.<br>
Neither test is listed in protocols.cfg. Given that both of these tests are<br>
network type tests it seems odd that they cannot be made to go clear on<br>
failure of another network test. I guess I do not really understand how<br>
Xymon works.<br>
<br>
I was really hoping to be able to get a single alert when the router went<br>
down. It does not happen real often but it is a pita to get several hundred<br>
text messages for what is really a single failure.<br>
<br>
Does anyone have a solution for these kinds of failures?<br></blockquote><div><br></div><div>You could write an external script to connect to the router and "do stuff" if the connection fails.</div><div><br></div><div>For example, if you're checking the router every 5 minutes, when it fails you could send a "disable" message to Xymon for the list of things behind the router, with a 10 minute lifetime.  That'll turn off alerts for all those devices.  As long as the router continues to fail, keep on sending disables with 10 min lifetime, essentially extending the original lifetime.  Once the router recovers, the disable message will expire up to 10 mins later and those devices will alert or not depending on their next status.</div><div><br></div><div>I don't have such a script, but it feels like it ought to be fairly trivial to implement.</div><div><br></div><div>Ralph Mitchell</div><div><br></div><div> </div></div></div>