In addition to the
/opt/opsview/var/machine.ref file on each collector, collector machine.refs are stored in the database. This means you can find a collector machine.ref by querying the database.
Find any Opsview host’s machine.ref
Log in to the Opsview host as
catto print the host’s machine.ref:
cat /opt/opsview/var/machine.ref ; echo
Command structureThe machine.ref file does not end in a line break, we use
echoto add a line break after the machine.ref to make the output more readable.
Find a collector’s machine.ref
Log in to the orchestrator as
- Note: within the database the machine.ref is recorded as collector_ref
/opt/opsview/coreutils/utils/cx opsview "SELECT collector_ref FROM collectors WHERE hostname = '<collector hostname>';"
Additional query optionsYou can query the
opsview.collectorstable using any of the other available fields. Use this query to get a full listing of available fields:
/opt/opsview/coreutils/utils/cx opsview "DESC collectors;"