You are here

Query Database for host

2 posts / 0 new
Last post
Jracer
Jracer's picture
Query Database for host

Hello,

I was wondering the best way to query the opsview database to see if a computer object exists? Any help would be greatly appreciated.

 

Thanks in advanced. 

 

Jeff

Jracer
Jracer's picture
For anyone interested you can

For anyone interested you can do this by using the built in cx utility and pass in an argument. So if you want a list of hosts you can run

/usr/local/nagios/utils/cx opsview "select name from hosts;" > file.txt