Query to Display Custom Variable Values
Posted: Tue Oct 06, 2015 3:30 pm
I'm trying to pull the custom variables created for particular host and service monitors. Would any one be able to provide the column to link the custom variable with the associated service or host? Following is what I have so far:
SELECT nagios_hosts.alias as HostName, nagios_customvariables.varname, nagios_customvariables.varvalue, nagios_customvariables.object_id
from nagios_hosts, nagios_customvariables
WHERE nagios_hosts.alias like 'Hostname%'
and nagios_customvariables.instance_id = nagios_hosts.instance_id
ORDER BY HostName ASC;
Thanks,
Marcus
SELECT nagios_hosts.alias as HostName, nagios_customvariables.varname, nagios_customvariables.varvalue, nagios_customvariables.object_id
from nagios_hosts, nagios_customvariables
WHERE nagios_hosts.alias like 'Hostname%'
and nagios_customvariables.instance_id = nagios_hosts.instance_id
ORDER BY HostName ASC;
Thanks,
Marcus