John
Very belatedly, here is a possible solution to this problem.
I managed to trigger this situation recently. I decided to rename a host using "xymon 127.1 'rename host1 host2'" and after that, my alert.log showed the log message containing "*... which is not yet defined; some alerts may not immediately fire*" - the same as you. The old hostname was specified in the log message.
The cause appears to have been that the old hostname was stuck in the alert.ckp checkpoint file, while not in hosts.cfg, which xymond_alert didn't like. After dropping the old hostname using "xymon 127.1 'drop host1'" the log messages stopped.
My guess is that I didn't wait long enough after renaming the host in hosts.cfg, and when I did the rename, xymond_alert hadn't picked up the change in hostname, and re-added the old hostname.
J
On Thu, 5 Dec 2019 at 01:55, Rothlisberger, John R. via Xymon < xymon@xymon.com> wrote:
---------- Forwarded message ---------- From: "Rothlisberger, John R." <john.r.rothlisberger@accenture.com> To: "'xymon >> xymon@xymon.com'" <xymon@xymon.com> Cc: Bcc: Date: Wed, 4 Dec 2019 14:54:55 +0000 Subject: xymond_alert errors when hosts.cfg uses directory includes
A valid option for hosts.cfg is to use a directory tag which includes all files in that directory and sub directories.
It works as far as the webpage is concerned and monitoring in general – but, when it comes to xymond_alert it is not happy that the client is not in the hosts.cfg file itself.
xymon@tc3mon:~/xymon-4.3.30/xymond$ xymond_alert --test client test
2019-12-04 14:44:50.906606 Host not found in hosts.cfg - assuming it is on the top page
00095241 2019-12-04 14:44:50 send_alert client:test state Paging
Checking criteria for host ‘client', which is not yet defined; some alerts may not immediately fire
00095241 2019-12-04 14:44:50 Matching host:service:dgroup:page ‘client:test:(NULL):' against rule line 11
…
00095241 2019-12-04 14:44:50 *** Match with 'SERVICE=test COLOR=red EXPAGE=%.*PAGE1' ***
00095241 2019-12-04 14:44:50 Script alert with command '/home/xymon/server/ext/pg/exalert_SSLHEADERS' and recipient headers_alert
It does eventually match the rule for the service but the errors generated end up polluting xymonlaunch.log and it grows at a crazy pace.
In xymond_alert.c – the client is only searched for in the hosts.cfg file and does not include any valid include directories or files.
Xymond_alert.c:
load_hostnames(xgetenv("HOSTSCFG"), NULL,get_fqdn());
hinfo = hostinfo(testhost); if (hinfo) { testpage = strdup(xmh_item(hinfo,XMH_ALLPAGEPATHS));
} else { errprintf("Host not found in hosts.cfg -assuming it is on the top page\n");
testpage = ""; }Any chance of getting this fixed in the next version?
Thanks,
John
Upcoming PTO:
John Rothlisberger
IT Strategy, Infrastructure & Security - Technology Growth Platform
TGP for Business Process Outsourcing
Accenture
312.693.3136 office
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. Your privacy is important to us. Accenture uses your personal data only in compliance with data protection laws. For further information on how Accenture processes your personal data, please see our privacy statement at https://www.accenture.com/us-en/privacy-policy.
www.accenture.com
---------- Forwarded message ---------- From: "Rothlisberger, John R. via Xymon" <xymon@xymon.com> To: "'xymon >> xymon@xymon.com'" <xymon@xymon.com> Cc: Bcc: Date: Wed, 4 Dec 2019 14:54:55 +0000 Subject: [Xymon] xymond_alert errors when hosts.cfg uses directory includes
Xymon mailing list Xymon@xymon.com http://lists.xymon.com/mailman/listinfo/xymon