Check_wmi Hostname Computer
Posted: Thu Mar 22, 2018 4:54 am
Hi friends.
I need to know if it is possible to check remote hostname via Nrpe
I can get hostname with command
check_nrpe -H $HOSTADDRESS$ -c check_wmi -a "query=Select Name from win32_ComputerSystem"
And I would like to get CriticalStatus if Value i get with command above is different from $HOSTNAME$
I will try to explain
check_nrpe -H $HOSTADDRESS$ -c check_wmi -a "query=Select Name from win32_ComputerSystem" "crit=Name not like $HOSTNAME$"
Both $HOSTADDRESS$ and $HOSTNAME$ are values from Nagios variables.
Regards.
I need to know if it is possible to check remote hostname via Nrpe
I can get hostname with command
check_nrpe -H $HOSTADDRESS$ -c check_wmi -a "query=Select Name from win32_ComputerSystem"
And I would like to get CriticalStatus if Value i get with command above is different from $HOSTNAME$
I will try to explain
check_nrpe -H $HOSTADDRESS$ -c check_wmi -a "query=Select Name from win32_ComputerSystem" "crit=Name not like $HOSTNAME$"
Both $HOSTADDRESS$ and $HOSTNAME$ are values from Nagios variables.
Regards.