I have noticed there are many column that are suffixed with tploptions. For example, if you look at tbl_service you will see a column called host_name_tploptions. It's a tinyint column and it's always populated with integer 2. What is this for and will it ever be a different value than 2? Thanks.
Todd
What is the purpose of the tploptions columns?
-
toneill2000
- Posts: 29
- Joined: Sun Jan 14, 2018 12:56 pm
- Location: Madison, WI
Re: What is the purpose of the tploptions columns?
The tploptions columns are related to the null, additive, and standard inheritance. I am not 100% certain about this, but I believe that the values could be: 0 (null), 1 (+), and 2 (standard). If needed, this could be easily tested/verified.
Thank you!
Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
toneill2000
- Posts: 29
- Joined: Sun Jan 14, 2018 12:56 pm
- Location: Madison, WI
Re: What is the purpose of the tploptions columns?
Hi @lmiltchev,
We have hosts and services that have no inheritance and some inheritance. The value is still 2 for all of them. I'd like to find a way to verify the changes in this column. Do you have a specific scenario where I can actually see the value change to a 0 or a 1? Mine are all twos. Thanks.
Todd
We have hosts and services that have no inheritance and some inheritance. The value is still 2 for all of them. I'd like to find a way to verify the changes in this column. Do you have a specific scenario where I can actually see the value change to a 0 or a 1? Mine are all twos. Thanks.
Todd
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: What is the purpose of the tploptions columns?
Create a service Template,
in it click Manage Hosts
Click Null bottom left
close
Save
This will trigger a host_name_tploptions with a value of 0
in it click Manage Hosts
Click Null bottom left
close
Save
This will trigger a host_name_tploptions with a value of 0
-
toneill2000
- Posts: 29
- Joined: Sun Jan 14, 2018 12:56 pm
- Location: Madison, WI
Re: What is the purpose of the tploptions columns?
@lmiltchev and @scottwilkerson,
You both were correct, thank you.
@scottwilkerson, the example scenario you gave solidified it. Just as you indicated, the values changed in the DB after I changed these settings. These three options (+, null, and standard) are available on most or all the object management screens. Thanks much.
Can someone provide a link to the Nagios documentation for the three options for inheritance discussed in this thread? The standard inheritance documentation does NOT cover this well enough. I see the sections about "null" which means inheritance won't happen. Standard just means standard inheritance as the documentation describes. And finally, additive which means Nagios literally will use the both the parent attributes AND the object attributes together. Is that all there is to this?
I've done some basic testing and I see te "NULL" and then the + symbol added to the config files like I thought they should work. If that's all there is to it, this post can be closed.
See the image below on exactly the three options that I would like to have documentation resource for if one exists beyond the one I cited above. thanks.
Todd
You both were correct, thank you.
@scottwilkerson, the example scenario you gave solidified it. Just as you indicated, the values changed in the DB after I changed these settings. These three options (+, null, and standard) are available on most or all the object management screens. Thanks much.
Can someone provide a link to the Nagios documentation for the three options for inheritance discussed in this thread? The standard inheritance documentation does NOT cover this well enough. I see the sections about "null" which means inheritance won't happen. Standard just means standard inheritance as the documentation describes. And finally, additive which means Nagios literally will use the both the parent attributes AND the object attributes together. Is that all there is to this?
I've done some basic testing and I see te "NULL" and then the + symbol added to the config files like I thought they should work. If that's all there is to it, this post can be closed.
See the image below on exactly the three options that I would like to have documentation resource for if one exists beyond the one I cited above. thanks.
Todd
You do not have the required permissions to view the files attached to this post.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: What is the purpose of the tploptions columns?
That is all there is, also, if you search that doc for the plus sign (+) you will find this section which describes it's use
and for nullAdditive Inheritance of String Values
Nagios gives preference to local variables instead of values inherited from templates. In most cases local variable values override those that are defined in templates. In some cases it makes sense to allow Nagios to use the values of inherited and local variables together.
This "additive inheritance" can be accomplished by prepending the local variable value with a plus sign (+). This features is only available for standard (non-custom) variables that contain string values.
I am locking this thread as requested.Cancelling Inheritance of String Values
In some cases you may not want your host, service, or contact definitions to inherit values of string variables from the templates they reference. If this is the case, you can specify "null" (without quotes) as the value of the variable that you do not want to inherit.