×
Back to Opsview FAQ
Find an Opsview collector machine.ref
The machine.ref is stored locally on each Opsview host in the /opt/opsview/var/machine.ref file.
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 Copied
Prerequisites Copied
- None
Process Copied
- Log in to the Opsview host as
root. - Use
catto print the host’s machine.ref:
cat /opt/opsview/var/machine.ref ; echo
Command structure Copied
The machine.ref file does not end in a line break, we use echo to add a line break after the machine.ref to make the output more readable.
Find a collector’s machine.ref Copied
Prerequisites Copied
- None
Process Copied
- Log in to the orchestrator as
root. - Query the
opsview.collectorstable usingcx:
- 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 options Copied
You can query the opsview.collectors table 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;"
["Geneos"]
["FAQ"]