[Xymon] Where are xymonproxy errors?!

Jeremy Laidman jeremy at laidman.org
Tue Jul 28 07:27:38 CEST 2020


Rodrigo

Disclaimer: I don't use xymonproxy, so I'm having a bit of a guess as to
what might be wrong and what to look for.

Typically xymonproxy is allowed to send messages to STDOUT and STDERR,
which are redirected by the LOGFILE parameter in tasks.cfg to
$XYMONSERVERLOGS/xymonproxy.log (same directory as xymond.log, on my
servers it's /var/log/xymon/). However it can be run with the "--logfile
<filepath>" switch, to specify another location.

The errprintf() function calls send to STDERR, so should go to the logfile,
whatever that is. Perhaps if you run something like, "sudo lsof -p `pgrep
-f xymond_proxy`" you will be able to see what filename is bound to file
descriptors 1 and 2.

It could be that there's not a lot of logging going on anyway. Perhaps edit
tasks.cfg and edit the entry for [xymonproxy] to append "--debug" onto the
CMD command line, to increase the chance of getting a log entry. Failing
that (or as well as), append an invalid switch value (eg
"--listen=999.999.999.999:999") so that it has no choice to log an error
and die. Or even simpler, send a HUP signal to the process, which should
cause the message "Caught SIGHUP, reopening logfile" to be logged.

I'd expect it to log "Attempting recovery from write error" or "Connect to
server failed: <servername> - retrying" in your situation. But it could be
that a failed connection is not detected until the next time a message is
ready to be sent to the server.

Could it be possible that the USR1 signal was sent to the process at some
point? Apparently this toggles the logging of details, and without this
logging, you might not see as much.

Cheers
Jeremy


On Tue, 12 May 2020 at 10:16, Rodrigo Borges Pereira <
rodrigoborgespereira at gmail.com> wrote:

> Hi there,
>
> So, I'm trying to run xymonproxy as a standalone daemon, to facilitate the
> broadcast of status messages to multiple xymon servers with a single local
> machine listener.
>
> And that is working very well, I must say.
>
> But.. if one of the xymon servers is unreachable.. (I'm testing with an
> iptables DROP on the server side) I don't see any errors at all from
> xymonproxy. Even running it in foreground in the shell, nada.
>
> I've looked at the code on GitHub, and I do see some errprintf calls I
> would expect would result in some output in this type of situation.
>
> Am I missing something?
>
> Appreciate any pointers, thanks in advance.
>
> Rodrigo
>
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20200728/249176e5/attachment.htm>


More information about the Xymon mailing list