Is there a way to generate an event log report from the shell? I want to email a monthly report of change in status for column X . One of those things where one failure is not alert-worthy, but if the problem keep re-occurring, somebody need to look.
Bakkies
Bakkies
If you don't mind a report in HTML, you can use wget or curl to fetch the required report by copying the URL from a report you've already generated. Something like this:
curl -s -k ' https://127.0.0.1/xymon-cgi/eventlog.sh?MAXTIME=&FROMTIME=&TOTIME=&MAXCOUNT=... '
You don't actually need to define any parameters, and the defaults should give you something. The only thing you need to provide is some kind of variable so that QUERY_STRING exists so this should work:
curl -s -k 'https://127.0.0.1/xymon-cgi/eventlog.sh?-'
You can query Xymon directly without going through the webserver, using the eventlog.cgi command, with output also in HTML format. It needs a Xymon environment setup (eg run via xymoncmd) and it also needs REQUEST_METHOD to be defined (but can be empty), and it will output a report using defaults:
xymoncmd sh -c 'REQUEST_METHOD="" eventlog.cgi'
You can define QUERY_STRING to specify the parameters of the report, but unless REQUEST_METHOD is set to "GET", it won't be parsed. For example:
xymoncmd sh -c 'REQUEST_METHOD="GET" QUERY_STRING="HOSTMATCH= some-server.example.com" eventlog.cgi'
Cheers Jeremy
On 9 August 2018 at 23:28, Bakkies Gatvol <bakgat8 at hotmail.com> wrote:
Is there a way to generate an event log report from the shell? I want to email a monthly report of change in status for column X . One of those things where one failure is not alert-worthy, but if the problem keep re-occurring, somebody need to look.
Bakkies
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
participants (2)
-
bakgat8@hotmail.com
-
jeremy@laidman.org