One of the most oft-mentioned challenges with NHC is changing which hostname it uses for match string comparisons, offlining support, etc. Due to the way configuration files are parsed, you can't use the config file to alter the HOSTNAME variable and have that setting affect which checks get loaded and run. The only way to do it at present is to use /etc/sysconfig/nhc, the global, multi-context, system-wide settings file.
So here's my current plan:
[ ] Allow easy command-line manipulation of the HOSTNAME setting via a new -H option
[ ] Detect attempts to alter HOSTNAME (and HOSTNAME_S?) in the config file; if detected, update the HOSTNAME setting, clear out the check array, and reload the config file from scratch
[ ] ❓ In parallel to /etc/nhc/<NAME>.conf, we could add support for /etc/nhc/<NAME>.hostname
[ ] ❓ Is there a need for a new RMHOST setting to allow the hostname used for match strings to differ from the one passed to the resource manager (RM)?
One of the most oft-mentioned challenges with NHC is changing which hostname it uses for match string comparisons, offlining support, etc. Due to the way configuration files are parsed, you can't use the config file to alter the
HOSTNAME
variable and have that setting affect which checks get loaded and run. The only way to do it at present is to use/etc/sysconfig/nhc
, the global, multi-context, system-wide settings file.So here's my current plan:
HOSTNAME
setting via a new-H
optionHOSTNAME
(andHOSTNAME_S
?) in the config file; if detected, update theHOSTNAME
setting, clear out the check array, and reload the config file from scratch/etc/nhc/<NAME>.conf
, we could add support for/etc/nhc/<NAME>.hostname
RMHOST
setting to allow the hostname used for match strings to differ from the one passed to the resource manager (RM)?As always, your feedback is welcome!