Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Referring to one property within another inside the Nagios NRPE config file (nrpe.cfg) #141

Closed
mskadu opened this issue Jul 4, 2017 · 6 comments

Comments

@mskadu
Copy link

mskadu commented Jul 4, 2017

Hello there. To begin with, thank you for the excellent work. In continuation with this thread on Stackoverflow, if I can please make a feature request.

Within the NRPE config file (nrpe.cfg) and similar ones within Nagios fold, please make it possible to refer one property from another. For example, today what looks like the follows

..
server_address=10.68.10.2
..
allowed_hosts=127.0.0.1,100.0.254,10.68.10.2
..

should be re-writable on the following lines

..
server_address=10.68.10.2
..
allowed_hosts=127.0.0.1,100.0.254,$server_address
..

Benefits should be obvious - hopefully?

@hedenface
Copy link
Contributor

We will discuss it internally. Thanks!

@hedenface
Copy link
Contributor

Are there any other parts in the nrpe.cfg file you think this may make sense? I can see the benefits in say an application like postfix - which is why they're there in the first place - but in nrpe's configuration I can't see any other use-case other than the server_address being re-usable. I think this would almost make sense just to force the server_address to be appended to the allowed_hosts (via a configuration option).

What are your thoughts?

@mskadu
Copy link
Author

mskadu commented Jul 17, 2017

Actually server_address was just an example. I meant to say pretty much any property should be referrals in another. Obviously if the wrong combination is used, it will invalidate the config.

@hedenface
Copy link
Contributor

No, I definitely understood that you were only using that one as an example - what I'm asking is are there any other spots in the configuration file that ever be re-used other than that one?

For example, are you ever going to use:

allow_bash_command_substition=$command_prefix

or

command_timeout=$connection_timeout

I can't actually think of a use-case where the work to do this would be justified. I do like the idea of adding the server address automatically to allowed hosts.

@mskadu
Copy link
Author

mskadu commented Aug 7, 2017

Apologies for the delay in response. I was away on holiday.

Coming to think of it, I cannot think of any other example. I guess my need was down to being able to add server address to the allowed hosts' list.

I would like very much to say that I'd like to (like in code) define, $connection_timeout at the top and use it elsewhere in the config file. But, in reality, I don't see that happening.

Hope this helps.

@hedenface
Copy link
Contributor

We've decided against implementing this feature. Although it is a great (and very useful) feature in some projects - the first and best that comes to mind is postfix - it doesn't seem to bring the same value here.

We carefully analyzed the use case for NRPE, and couldn't see it being used for more than just that one possibility.

Thank you for the suggestion, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants