Page 1 of 1
Query Nagios Log Server logs entries using API
Posted: Tue May 22, 2018 9:50 am
by mgsteiner
Hello all,
I would like to query the logs entries on Nagios Log Server from a script using the API.
Can anybody provide me with some help, where to start or samples?
Does anybody has experience doing that query from Talend using JSON ?
Thanks a lot in advance
BR
Max
Re: Query Nagios Log Server logs entries using API
Posted: Tue May 22, 2018 4:38 pm
by cdienger
The API doesn't allow much in the way of querying - there is the /usr/local/nagios/libexec/check_nagioslogserver.php script that you can review to get an idea of how to submit a query, but will only return the number of entries that a query matched.
Re: Query Nagios Log Server logs entries using API
Posted: Wed May 23, 2018 9:47 am
by mgsteiner
cdienger wrote:The API doesn't allow much in the way of querying - there is the /usr/local/nagios/libexec/check_nagioslogserver.php script that you can review to get an idea of how to submit a query, but will only return the number of entries that a query matched.
Thanks for the reply.!
I'm having the script and will check what I can do.
Anyhow, I was expecting using the API I could verify from an external code if a certain log entry already exists in order to avoid duplicated logs.
Nevertheless, this script might workout
Thanks and BR
Re: Query Nagios Log Server logs entries using API
Posted: Wed May 23, 2018 4:23 pm
by cdienger
Glad to hear that it may work for you
