Code: Select all
[root@nagios libexec]# ./check_nagioslogserver.php --url='https://SERVER/nagioslogserver/' --apikey='KEY' --minutes='30' --warn='' --crit='1' --query='{"query":{"filtered":{"query":{"bool":{"should":[{"query_string":{"query":"*"}}]}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"from":1442861603011,"to":1442948003012}}},{"fquery":{"query":{"query_string":{"query":"message:(\"EVENTIDCODE\")"}},"_cache":true}},{"fquery":{"query":{"query_string":{"query":"Hostname:(\"WINSERVERNAME\")"}},"_cache":true}}]}}}}}'
OK: 1 matching entries found |logs=1;;1
[root@nagios libexec]# ./check_nagioslogserver.php --url='https://SERVER/nagioslogserver/' --apikey='KEY' --minutes='30' --warn='1' --crit='2' --query='{"query":{"filtered":{"query":{"bool":{"should":[{"query_string":{"query":"*"}}]}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"from":1442861603011,"to":1442948003012}}},{"fquery":{"query":{"query_string":{"query":"message:(\"EVENTIDCODE\")"}},"_cache":true}},{"fquery":{"query":{"query_string":{"query":"Hostname:(\"WINSERVERNAME\")"}},"_cache":true}}]}}}}}'
OK: 1 matching entries found |logs=1;1;2
If I should post this in the XI Support forum, please let me know, but figured this check is supported by the log server side rather than the XI side.
Thanks,