Environment Variables of nrpe.cfg

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.
Locked
lngphp
Posts: 1
Joined: Wed Jan 17, 2018 10:56 am

Environment Variables of nrpe.cfg

Post by lngphp »

Is it possible to have environment variables of remote server in nrpe.cfg?
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Environment Variables of nrpe.cfg

Post by mcapra »

I know the configparser package allows the use of interpolated variables through SafeConfigParser. NCPA does not appear to use a SafeConfigParser (it appears to use a ConfigParser), but I'll let a tech verify one way or the other whether or not this is or will be supported.

Relevant StackExchange post explaining this a bit more:
https://stackoverflow.com/questions/265 ... v-variable

EDIT: Ha, this post is totally not about NCPA but i'm going to leave this here anyway.
Last edited by mcapra on Wed Jan 17, 2018 10:23 pm, edited 1 time in total.
Former Nagios employee
https://www.mcapra.com/
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Environment Variables of nrpe.cfg

Post by npolovenko »

Hello, @lngphp. Are you referring to the nrpe agent on linux systems? I don't think you will be able to use environment variables in nrpe.cfg, but you could write a custom plugin that is going to be called via nrpe and that will use environment variables.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked