Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
in a command definition, how $HOSTADDRESS is resolved? Being on a unix box I know things do not always resolve physical names on the network.
So in my host definition am I supposed to enter the fully qualified domain name there? I have the IP listed as well as "address" but doesn't seem to be working right. Thought that field was just a display name not necessarily the actual machine name.
define host{
use generic-printer ; Inherit default values from a template
host_name Dell_2130cn_Color_Laser ; The name we're giving to this printer
alias Dell LaserJet 2130n ; A longer name associated with the printer
address 192.168.0.4 ; IP address of the printer
hostgroups network-printers ; Host groups this printer is associated with
}
define service {
host_name Dell_2130cn_Color_Laser
use generic-service
service_description Yellow2
check_command check_printer!public!"CONSUM yellow"!20!10
Your problem is that you are missing the $ that goes at the end, it should be $HOSTADDRESS$
jriker1 wrote:So in my host definition am I supposed to enter the fully qualified domain name there? I have the IP listed as well as "address" but doesn't seem to be working right. Thought that field was just a display name not necessarily the actual machine name.
The address directive is what $HOSTADDRESS$ relates to.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Bingo. Thanks. I can run some commands OK manually, but when the definitions are setup, they don't always work like this. Is there anyway to physically see what Nagios executed when the test ran?
UNKNOWN - OID not found! Your printer may not support checking this consumable. Use the CONSUM TEST option to determine which consumables may be monitored.
Note found the problem in an older post. With authors of the plugins would update things but guess good they have created these at all. Sample from author was missing the end dollar sign after $ARG2. Still like to know if there is a way to see the output of what Nagios ran when it executes these things.