Need help to print free variables in custom component

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
alira
Posts: 2
Joined: Wed Sep 22, 2021 12:25 pm

Need help to print free variables in custom component

Post by alira »

Hello,

I am trying to print the value of a free variable into a custom column in the service status view. I am using the custom column component available here:

https://exchange.nagios.org/directory/A ... nt/details

I installed the custom column and have no problem to print text inside the cell in the service row but i have no success trying to print the free variable of the service.

Suppose the var is called: _FREEVAR1

I have used:

$_SERVICEFREEVAR1$
NAGIOS__SERVICEFREEVAR1

to print it using the php script but no value is being printed.
freevar_custom_column.png
Please, can you give me any tips about how to get it printed?

Thank you!
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Need help to print free variables in custom component

Post by benjaminsmith »

Hi,

That component is pulling status data which contains the notes field but not the free variable. However, there is already an option for this in Nagiso XI.

Go to Admin > System Extensions > Manage Components and make sure to enable the Free Variables component if it isn't already.
enable-free-variable-tab.png
Then go to the tab on Host and Service Detail screens. Let me know if that works for you.
free-variables-tab.png
--Benjamin
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
alira
Posts: 2
Joined: Wed Sep 22, 2021 12:25 pm

Re: Need help to print free variables in custom component

Post by alira »

Hello Benjamin,

I have the Free Variables enabled and i see them in its tab under Host and Service Detail screen. I would like to print a specific Free Variable in a column under Service Status screen as we have this in our previous Nagios Core installation.

Would it be possible to use Free Variables instead of notes modifying this component? Or the use of free variables is restricted.

Thank you!
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Need help to print free variables in custom component

Post by benjaminsmith »

Hi,
Would it be possible to use Free Variables instead of notes modifying this component? Or the use of free variables is restricted.
Both those components are available. Go to Admin > System Extensions > Manage Components >... and under the Actions Tab select the download link.

Take a look at the code you may be able to use the functions in free variable to output the same data in the Columns component.

We don't provide customer development in support but you can reach out to our sales team for options as well.

Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked