-
Notifications
You must be signed in to change notification settings - Fork 453
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
Feature Enhancement Request: Services ARGs should be able to override template values, even if it is specified as blank in the template #986
Comments
I don't know if this entirely fits what you are looking for but you can accomplish this with custom macros
|
Trying to avoid doing wonky things like that. The assumption is that things specified in the service definition override things in the template. But templates that have blanks in the argument fields don't get their arguments overwritten by the service. Would love to see that straightforward logic implemented. |
Are you specifically referring to the ARG macros? Currently, you can't set them like with what you provided, you get an invalid configuration error. Are you wanting the ability to specify the ARGn values in the configuration in addition to being able to set them in the check_command argument? Which one should take precedence in the instance that both are specified? |
Read the original post. |
I did. I guess I'm just a big dumb dumb because I'm confused. Correct me if I'm wrong but you can't currently specify the command arguments in the object definition in the way you specified in the original post. Do you want this ability added with the the normal templating rules applied to it? Is this XI specific and you are referring to setting these values in the CCM? Like you want
To be equivalent to
|
Yes, I know you can't do what I want to do. That's why it's an Enhancement request! 😉 |
Just trying to get the specifics |
Here. This is what I would like to see: TEMPLATE has check_command and arg1 specified but not arg2. arg2 is blank (as are all other args). As it stands now, this is invalid and the command will be "check_command arg1" without arg2. I'd like to see it execute as "check_command arg1 arg2" since the more-specific service definition has an arg2 specified even though the inherited template does not. This is the behavior for everything else (if the template leaves something blank but the service defines it, then it's defined). |
Okay so if a service has the same check command as it's template, then it will also inherit any unspecified args |
For example, the following config
Would be equivalent to
|
No. In pseudo code: Command_Definition: Template: Service: The resulting command should be: |
Whoops. I see I cross-posted. I think we're saying the same thing now, yes. |
Alright, I think I got it, in the event that someone does
Which should take precedence, the values specified in the check command or the values specified via the ARGn parameters? |
I would assume the ARGn parameters |
I just realized we might be talking about two different things here, slightly. This wasn't supposed to be a Nagios Core request, it was Naigos XI. The XI GUI doesn't allow the operation I'm requesting and no one is manipulating check_command directly; it's being built from elements of the UI. I believe that changes how this conversation goes slightly, but in the end, if the service/host definition says "check_command check_dummy!!test" and the template says "check_command check-dummy!six" then the resulting check_command should be "check_dummy!six!test" I'm thinking that my original request was misinterpreted as a Nagios core issue, when I believe it's an XI one. |
This request is from eloyd in the Support Forum
The text was updated successfully, but these errors were encountered: