Custom Variable being truncated

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
tgaastra
Posts: 1
Joined: Mon Nov 18, 2013 6:32 pm

Custom Variable being truncated

Post 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>
DoubleDoubleA
Posts: 273
Joined: Thu Feb 09, 2017 5:07 pm

Re: Custom Variable being truncated

Post 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
danisa
Posts: 7
Joined: Wed Mar 05, 2025 2:50 am

Re: Custom Variable being truncated

Post 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
DoubleDoubleA
Posts: 273
Joined: Thu Feb 09, 2017 5:07 pm

Re: Custom Variable being truncated

Post 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
Post Reply