Email and website notifications wrong IPs
list Wes Neal
Emails for some of my systems on the new Xymon server are going out with bad IPs in them. The system is correct in hosts.cfg and it seems it is monitoring the correct host, but when it alerts on it, Xymon puts the wrong IP in the email and it also puts the wrong IP on the webpage. If I grep for that incorrect IP, it doesn't exist in $xymon/server/etc anywhere. From notifications log I see this: Tue Nov 4 15:21:34 2014 DTAMMI-DYN2.conn (XXX.XXX.25.228) EMAIL ADDRESS But the email it sends out says this: System unreachable for 4014 poll periods (1211916 seconds) &red XXX.XXX.19.160 is unreachable If I look at the Xymon webpage for it also has this address listed: XXX.XXX.19.160 is unreachable Any idea what might be causing this? Wes Neal
list Tres Finocchiaro
We had this issue and it was caused by invalid settings in our DNS server. Xymon seems to attempt a DNS resolution prior to using the hard-coded IP address, which was tremendously confusing for us, but identified a problem were were unaware of. -Tres - user-88678e65ced1@xymon.invalid On Tue, Nov 4, 2014 at 11:13 AM, Neal, Jonathan W via Xymon <xymon at xymon.com
wrote:
---------- Forwarded message ---------- From: "Neal, Jonathan W" <user-9e31f92d698c@xymon.invalid> To: "xymon at xymon.com" <xymon at xymon.com> Cc: Date: Tue, 4 Nov 2014 11:12:50 -0500 Subject: Email and website notifications wrong IPs
▸
Emails for some of my systems on the new Xymon server are going out with
bad IPs in them.
The system is correct in hosts.cfg and it seems it is monitoring the
correct host, but when it alerts on it, Xymon puts the wrong IP in the
email and it also puts the wrong IP on the webpage. If I grep for that
incorrect IP, it doesn’t exist in $xymon/server/etc anywhere.
From notifications log I see this:
Tue Nov 4 15:21:34 2014 DTAMMI-DYN2.conn (XXX.XXX.25.228) EMAIL ADDRESS
But the email it sends out says this:
System unreachable for 4014 poll periods (1211916 seconds)
&red XXX.XXX.19.160 is unreachable
If I look at the Xymon webpage for it also has this address listed:
XXX.XXX.19.160 is unreachable
Any idea what might be causing this?
Wes Neal
list Wes Neal
I appreciate the response! Is there a way to make it look at the file only/first? I would rather it not use DNS at all. Wes Neal Group e-mail: user-8d0dda707348@xymon.invalid<mailto:user-8d0dda707348@xymon.invalid> 24x7 Helpdesk for EMS: VZOES/OSC X-XXX-XXX-XXXX Opt3
▸
From: Tres Finocchiaro [mailto:user-88678e65ced1@xymon.invalid]
Sent: Tuesday, November 04, 2014 12:05 PM
To: Neal, Jonathan W
Cc: xymon at xymon.com
Subject: Re: [Xymon] Email and website notifications wrong IPs
We had this issue and it was caused by invalid settings in our DNS server. Xymon seems to attempt a DNS resolution prior to using the hard-coded IP address, which was tremendously confusing for us, but identified a problem were were unaware of.
-Tres
- user-88678e65ced1@xymon.invalid<mailto:user-88678e65ced1@xymon.invalid>
▸
On Tue, Nov 4, 2014 at 11:13 AM, Neal, Jonathan W via Xymon <xymon at xymon.com<mailto:xymon at xymon.com>> wrote:
---------- Forwarded message ----------
From: "Neal, Jonathan W" <user-9e31f92d698c@xymon.invalid<mailto:user-9e31f92d698c@xymon.invalid>>
To: "xymon at xymon.com<mailto:xymon at xymon.com>" <xymon at xymon.com<mailto:xymon at xymon.com>>
Cc:
Date: Tue, 4 Nov 2014 11:12:50 -0500
Subject: Email and website notifications wrong IPs
Emails for some of my systems on the new Xymon server are going out with bad IPs in them.
The system is correct in hosts.cfg and it seems it is monitoring the correct host, but when it alerts on it, Xymon puts the wrong IP in the email and it also puts the wrong IP on the webpage. If I grep for that incorrect IP, it doesn’t exist in $xymon/server/etc anywhere.
From notifications log I see this:
Tue Nov 4 15:21:34 2014 DTAMMI-DYN2.conn (XXX.XXX.25.228) EMAIL ADDRESS
But the email it sends out says this:
System unreachable for 4014 poll periods (1211916 seconds)
&red XXX.XXX.19.160 is unreachable
If I look at the Xymon webpage for it also has this address listed:
XXX.XXX.19.160 is unreachable
Any idea what might be causing this?
Wes Neal
list Tres Finocchiaro
Is there a way to make it look at the file only/first?
I'm not sure, I'll have to defer to someone else. -Tres - user-88678e65ced1@xymon.invalid On Tue, Nov 4, 2014 at 12:10 PM, Neal, Jonathan W <user-9e31f92d698c@xymon.invalid>
▸
wrote:
I appreciate the response! Is there a way to make it look at the file only/first? I would rather it not use DNS at all. Wes Neal
*Group e-mail: user-8d0dda707348@xymon.invalid <user-8d0dda707348@xymon.invalid>*
▸
*24x7 Helpdesk for EMS: VZOES/OSC X-XXX-XXX-XXXX <X-XXX-XXX-XXXX> Opt3*
*From:* Tres Finocchiaro [mailto:user-88678e65ced1@xymon.invalid]
*Sent:* Tuesday, November 04, 2014 12:05 PM
*To:* Neal, Jonathan W
*Cc:* xymon at xymon.com
*Subject:* Re: [Xymon] Email and website notifications wrong IPs
We had this issue and it was caused by invalid settings in our DNS
server. Xymon seems to attempt a DNS resolution prior to using the
hard-coded IP address, which was tremendously confusing for us, but
identified a problem were were unaware of.
-Tres
- user-88678e65ced1@xymon.invalid
On Tue, Nov 4, 2014 at 11:13 AM, Neal, Jonathan W via Xymon <
xymon at xymon.com> wrote:
---------- Forwarded message ----------
From: "Neal, Jonathan W" <user-9e31f92d698c@xymon.invalid>
To: "xymon at xymon.com" <xymon at xymon.com>
Cc:
Date: Tue, 4 Nov 2014 11:12:50 -0500
Subject: Email and website notifications wrong IPs
Emails for some of my systems on the new Xymon server are going out with
bad IPs in them.
The system is correct in hosts.cfg and it seems it is monitoring the
correct host, but when it alerts on it, Xymon puts the wrong IP in the
email and it also puts the wrong IP on the webpage. If I grep for that
incorrect IP, it doesn’t exist in $xymon/server/etc anywhere.
From notifications log I see this:
Tue Nov 4 15:21:34 2014 DTAMMI-DYN2.conn (XXX.XXX.25.228) EMAIL ADDRESS
But the email it sends out says this:
System unreachable for 4014 poll periods (1211916 seconds)
&red XXX.XXX.19.160 is unreachable
If I look at the Xymon webpage for it also has this address listed:
XXX.XXX.19.160 is unreachable
Any idea what might be causing this?
Wes Neal
list Mark Felder
Yes! There are two ways to do this.
1. Set testip globally for everything in hosts.cfg.
At the top of the hosts.cfg you would set this rule:
0.0.0.0 .default. # testip
2. Configure xymonnet for different DNS behavior. From the xymonnet man
page:
--dns=[ip|only|standard]
Determines how xymonnet finds the IP adresses of the hosts to test.
By default (the "standard"), xymonnet does a DNS lookup of the
hostname to determine the IP address, unless the host has the
"testip" tag, or the DNS lookup fails.
With "--dns=only" xymonnet will ONLY do the DNS lookup; if it fails,
then all services on that host will be reported as being down.
With "--dns=ip" xymonnet will never do a DNS lookup; it will use the
IP adresse specified in hosts.cfg for the tests. Thus, this setting
is equivalent to having the "testip" tag on all hosts. Note that
http tests will ignore this setting and still perform a DNS lookup
for the hostname given in the URL; see the "xymonnet tags for HTTP
tests" section in hosts.cfg(5)
You would change this in your tasks.cfg file. The default looks like
this:
# "xymonnet" runs the xymonnet tool to perform the network based tests -
i.e. http, smtp, ssh, dns and
# all of the various network protocols we need to test.
[xymonnet]
ENVFILE /usr/local/www/xymon/server/etc/xymonserver.cfg
NEEDS xymond
CMD xymonnet --report --ping --checkresponse
LOGFILE $XYMONSERVERLOGS/xymonnet.log
INTERVAL 5m
Just add --dns=ip to the CMD line