Using environment variable in nrpe.cfg or alternate method

Botnick, Steven sbotnick at usgs.gov
Thu May 25 01:07:35 CEST 2017


Hello,

Is there a way to use an environment variable in the nrpe daemon config
file or does anyone have any alternate ideas for this scenario:

Attempting to include an auxiliary config file for host-specific items of
software package that is used on multiple hosts and is set up so each host
has a unique personality.

An example:

# INCLUDE CONFIG FILE
# This directive allows you to include definitions from an external config
file.

#include=<somefile.cfg>
include=/usr/local/dingle/etc/$HOSTNAME/nrpe.cfg


The intent is to have checks unique to 'dingle' for the individual host be
separate from the checks that are specific to the host's system

The net effect is that if you change the hostname and reboot, the system
will come up as the personality of the specified hostname so the checks
from the monitoring server will not need changes.

TIA for the answer or viable suggestions.





-- 
Steve Botnick
I.T. Specialist
Alaska Volcano Observatory
U.S. Geological Survey
4230 University Dr. STE 100
Anchorage, AK 99508
email: sbotnick at usgs.gov
voice: 907.786.7019
fax:   907.786.7425
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20170524/73305fca/attachment.html>


More information about the Help mailing list