HI Lmitchev,
Thankyou for your help, I've figured out and understood object inheritance now , which is a game changer.
I have the following things that need clarity,
1.We define custom variables in either service or host definitions and modify the actual command definition in commands.cfg to accept this custom variable correct.?
2. Instead of creating custom variables on host direclty, i'd define a template with custom variable, use the template to define hosts or services thereafter. ( tried it but the object created did not inherit the custom variable value from the template)
3. Notification and alert settings are present when defining both a host and service, when I use a host template and service template to define both, which template takes precedence ?
check_nt (server port must be an integer) error
-
tejanagios
- Posts: 24
- Joined: Wed Feb 03, 2016 6:45 am
Re: check_nt (server port must be an integer) error
This is correct. Here's some examples of what custom macros you could use:1.We define custom variables in either service or host definitions and modify the actual command definition in commands.cfg to accept this custom variable correct.?
https://assets.nagios.com/downloads/nag ... tvars.html
It is hard to say why the custom variables didn't get inherited without looking at your configs. Can you show us all of the relevant config files? We will try to recreate the issue in house.2. Instead of creating custom variables on host direclty, i'd define a template with custom variable, use the template to define hosts or services thereafter. ( tried it but the object created did not inherit the custom variable value from the template)
Again, can you show us an example?3. Notification and alert settings are present when defining both a host and service, when I use a host template and service template to define both, which template takes precedence ?
Host templates are applied to hosts, and service templates are applied to services. In regards to notifications, different notification handlers are used for hosts and services, i.e "xi_host_notification_handler", and "xi_service_notification_handler".
In case, where you have two or more templates added to a host/service, the one "on the top" will be used first, then that one below, etc. Example:
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!