Page 1 of 1
Show alerts on DB
Posted: Tue Jul 09, 2013 5:24 am
by oz123
Hi,
can you please provide me the select query for the Service Status online alerts where status not "OK" ?
Thanks
Re: Show alerts on DB
Posted: Tue Jul 09, 2013 10:52 am
by abrist
You can get this information from the backend api:
Code: Select all
http://<XI IP>/nagiosxi/backend/?cmd=getservicestatus&brevity=3¤t_state=nin:0
Or from bash(query in quotes):
Code: Select all
echo "use nagios; select current_state,service_object_id,name1,name2 from nagios_servicestatus inner join nagios_objects on service_object_id=object_id where (current_state != 0)order by name1;" | mysql -t -pnagiosxi
Re: Show alerts on DB
Posted: Sun Jul 14, 2013 2:59 am
by oz123
Thank you !!