Page 1 of 1
Is there a line length limitation for custom object vars?
Posted: Thu Dec 05, 2013 2:14 pm
by skol
Hey guys, is there a line length limitation for custom macros in nagios XI and nagios core? i.e:
Code: Select all
define service {
use template
host_name hostname
_interface_description intdesc
register 1
}
For example if _interface_description was a combination of 100 keyword=value pairs.
Thanks!
Re: Is there a line length limitation for custom object vars
Posted: Thu Dec 05, 2013 2:22 pm
by abrist
Are there any end of lines in 'intdesc' or exclamation points?
Re: Is there a line length limitation for custom object vars
Posted: Thu Dec 05, 2013 2:47 pm
by skol
No, it would look like this (except much, much longer). My previous example was not very good.
Code: Select all
define service {
use template
host_name hostname
_service_fields -m oid=.1.3.6.1... -a 10.1.1.1 -c mycommunity something=yes description=some_desc hostname=myhostname field=value field=value field=value field=value field=value field=value field=value field=value field=value field=value field=value field=value
register 1
Re: Is there a line length limitation for custom object vars
Posted: Thu Dec 05, 2013 6:10 pm
by abrist
I can ask one of our core devs tomorrow. Have you noticed truncation, or does it just fail?
Re: Is there a line length limitation for custom object vars
Posted: Fri Dec 06, 2013 11:36 am
by skol
abrist wrote:I can ask one of our core devs tomorrow. Have you noticed truncation, or does it just fail?
I just wanted to make sure what I'm trying to do won't hit a limitation.
Re: Is there a line length limitation for custom object vars
Posted: Fri Dec 06, 2013 1:50 pm
by sreinhardt
There does not appear to be a size restriction on this. If you can I would suggest sticking under the 1024 limit that is applied to most strings within nagios, but that doesn't really seem to be enforced in this case. (Note: not a dev, but did dig through the code, most importantly ./includes/objects.h that contains the customvariablemember scruct and the service struct.)
Re: Is there a line length limitation for custom object vars
Posted: Fri Dec 06, 2013 3:12 pm
by skol
Thanks a bunch, I appreciate it!