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

Enhancement suggestion: List defined commands on nrpe-client #200

Open
dan-m-joh opened this issue Sep 28, 2018 · 9 comments
Open

Enhancement suggestion: List defined commands on nrpe-client #200

dan-m-joh opened this issue Sep 28, 2018 · 9 comments

Comments

@dan-m-joh
Copy link

It would be great to have a possibility to list all defined commands (comand[xy]=...) on the client.

Something like this:

nagios@server$ check_nrpe -H clienthost -v
Defined commands:
    check_load
    check_disk_sda
    check_disk_sdb

Of cause all the normal security "features" for the client should be observed.

Regards,
D/\N

@dan-m-joh dan-m-joh changed the title Enhancement request: List defined commands on nrpe-client Enhancement suggestion: List defined commands on nrpe-client Sep 28, 2018
@ericloyd
Copy link

Why not write a script that does just that and parses the config file as a one line awk command? You need to make sure it's all one line output to capture and display properly within Nagios.

@dan-m-joh
Copy link
Author

Yes, I have a "one-liner" that does that - BUT that implies that I have a login on the Client and in our environment I do not always have that.
The clients are managed by an other team and I often get request like "Add host xyz to nagios".
They have installed and configured nrpe, but they often (95% of the time) forgets to tell us which checks they have implemented and we have to get back to them and ask for the config. It would be sooo much easier to be able to list the configured checks from the server.

@ericloyd
Copy link

You have a login: your NRPE server. It can read it's own config file and display output as part of a checj.

@dan-m-joh
Copy link
Author

Yes, that's true, but then I have to write a check (which is the easy part) and distribute it to all the new Hosts (which is the really hard part). It would be easier if this was "integrated" in the daemon.

@ericloyd
Copy link

So, from a security standpoint, if you and a customer share access to NRPE, but you don't manage the config file, why should you (Nagios server) be authorized to know what's in the config file? This may not he your specific case, but I can see where having NRPE report back the config file contents could be considered a security risk.

@dan-m-joh
Copy link
Author

Yes, I agree with you on that point, but it would (for us at least) ease the configuration.
And that is why it should not return the complete configuration, only the configured check-names.

@ericloyd
Copy link

I'm generally against the idea of building finctionality into NRPE that can be provided by scripts run by NRPE. However, I can see this going both ways though. Perhaps with a server flag added that enabled the ability and having it disabled by default. I could support that idea.

@dan-m-joh
Copy link
Author

Yes, I can certainly live with that.
THX

@ericloyd
Copy link

Don't thank me; I'm just a user like you, not a Nagios developer. :-)

I may think about submitting some code but I'm on vacation this week so not until after the First.

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

No branches or pull requests

2 participants