Page 1 of 1

Custom Variable being truncated

Posted: Mon Mar 03, 2025 4:33 pm
by tgaastra
Is there a way to prevent a custom variable from being truncated when entered in Nagios XI?

We have a Webhook URI that we're storing with a contact as "_WEBHOOKURL" and it appears that when it is entered in Nagios XI, it is just long enough that the last 6 characters of it are being truncated when stored.

Is this a problem with the UI? Is there a way to bypass this to properly store the URI?

basically, it's something like

http://example.outlook.com/<LONG UUID>

and Nagios is storing it as

http://example.outlook.com<LONG UUID missing the last 6 characters>

Re: Custom Variable being truncated

Posted: Tue Mar 04, 2025 11:56 am
by DoubleDoubleA
Hi @tgaastra,

From the UI the custom variable gets stored in the database, the default size for the variable value field there is 1024. How big is this URL?

Aaron

Re: Custom Variable being truncated

Posted: Wed Mar 05, 2025 2:53 am
by danisa
Nagios XI uses the Nagios Core custom contact variables (_CUSTOMVARIABLES) which have a character limit of 256 characters by default. Any variable exceeding this length will be silently truncated when stored in the database. Football Bros

Re: Custom Variable being truncated

Posted: Wed Mar 05, 2025 11:50 am
by DoubleDoubleA
Thanks @danisa for that correction, I was looking at the wrong database (nagios vs nagiosql).

@tgaastra you can increase the size of that field. Please see this post for instructions: viewtopic.php?t=35053

Aaron