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
Prerequisites
- None
Process
-
Log in to the Opsview host as
root
. -
Use
cat
to print the host’s machine.ref:
cat /opt/opsview/var/machine.ref ; echo
Command structure
The machine.ref file does not end in a line break, we useecho
to add a line break after the machine.ref to make the output more readable.Find a collector’s machine.ref
Prerequisites
- None
Process
-
Log in to the orchestrator as
root
. -
Query the
opsview.collectors
table 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
You can query theopsview.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;"
Comments
0 comments
Please sign in to leave a comment.