Hi,
can you please provide me the select query for the Service Status online alerts where status not "OK" ?
Thanks
Show alerts on DB
Re: Show alerts on DB
You can get this information from the backend api:
Or from bash(query in quotes):
Code: Select all
http://<XI IP>/nagiosxi/backend/?cmd=getservicestatus&brevity=3¤t_state=nin:0Code: 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 -pnagiosxiFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.