xymond_alert errors when hosts.cfg uses directory includes

Rothlisberger, John R. john.r.rothlisberger at accenture.com
Wed Dec 4 15:54:55 CET 2019


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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20191204/2af1fc90/attachment.htm>


More information about the Xymon mailing list