How to use Custom Variables - Tried all possible ways but facing issues
Posted: Wed Nov 12, 2025 11:06 am
Hi Everyone,
I'm trying to use Custom Variables from my nagios XI GUI but facing below issues
1. I'm using below command arguments, custom variables
$USER1$/check_purefa_alert.py $HOSTADDRESS$ $ARG1$
CUSTOM VARIABLE is _purefa_apitoken
As per the documentation, I'm using _HOST before the variable name while using as arguments, in this case "$_hostpurefa_apitoken$"
but when using the above custom variable, in command line it is being reflected as /usr/local/nagios/libexec/check_purefa_alert.py IP "$_hostpurefa_apitoken$"
but by using like this no output is being showin in Nagios XI command line
2. I have declared Custom Variables under "Manage Custom Variables" in a host, but after saving no matter if I'm saving these using small or cappital letters, it's always showing in small letters only (I don't know whether it is intended functionality or not)
3. After declaring custom variables, I created a new service and entered these custom variables in place of arguments, no output or output as below
PURE_FA_ALERT UNKNOWN - FA REST call returned "PureError: Failed to retrieve session token with error: {"errors":[{"context":"$","message":"Unable to list user for API token."}]} (400)"
4. In the place of arguments I tried all possibilities mentioned below but no use
$_hostpurefa_apitoken$
$_purefa_apitoken$
$_HOSTPUREFA_APITOKEN$
$_PUREFA_APITOKEN$
Could anyone please help me on this. As I'm not able to use custom variable, It's very hectic work to enter everything manually
Thank You
I'm trying to use Custom Variables from my nagios XI GUI but facing below issues
1. I'm using below command arguments, custom variables
$USER1$/check_purefa_alert.py $HOSTADDRESS$ $ARG1$
CUSTOM VARIABLE is _purefa_apitoken
As per the documentation, I'm using _HOST before the variable name while using as arguments, in this case "$_hostpurefa_apitoken$"
but when using the above custom variable, in command line it is being reflected as /usr/local/nagios/libexec/check_purefa_alert.py IP "$_hostpurefa_apitoken$"
but by using like this no output is being showin in Nagios XI command line
2. I have declared Custom Variables under "Manage Custom Variables" in a host, but after saving no matter if I'm saving these using small or cappital letters, it's always showing in small letters only (I don't know whether it is intended functionality or not)
3. After declaring custom variables, I created a new service and entered these custom variables in place of arguments, no output or output as below
PURE_FA_ALERT UNKNOWN - FA REST call returned "PureError: Failed to retrieve session token with error: {"errors":[{"context":"$","message":"Unable to list user for API token."}]} (400)"
4. In the place of arguments I tried all possibilities mentioned below but no use
$_hostpurefa_apitoken$
$_purefa_apitoken$
$_HOSTPUREFA_APITOKEN$
$_PUREFA_APITOKEN$
Could anyone please help me on this. As I'm not able to use custom variable, It's very hectic work to enter everything manually
Thank You