[naemon-users] Expanded Command

Peter Reilly peter_reilly at wycliffe.org
Thu Jan 22 16:24:10 CET 2015



On 01/22/2015 10:01 AM, Sven Nierlein wrote:
> On 22.01.2015 15:45, Peter Reilly wrote:
>> Hello,
>>
>> In Naemon with Thruk, in viewing service information, at the bottom of the page I have listed both:
>>
>> Check Command
>> Expanded Command
>>
>> Under Expanded Command, if a variable is used that has been defined in /etc/naemon/resource.cfg, that variable is also expanded and displayed.
>>
>> Is there a way to not expand the variables?
>>
>> Thanks!
>
> Hi,
>
> you can specify an alternative resource.cfg for Thruk which then will be used for macro expansion.
> See http://thruk.org/documentation/configuration.html#resource_file
>
> If using multiple backends, you can also specify one resource.cfg per backend:
> http://thruk.org/documentation/configuration.html#component-thruk-backend
>
> This could be a completly different file from the usual resource.cfg and maybe could
> just contain the plugin paths.
>
> Cheers,
>   Sven
>


I don't think I have it right yet.

I have the following resource file in /etc/naemon/naemon.cfg

# RESOURCE FILE
# This is an optional resource file that contains $USERx$ macro
# definitions. Multiple resource files can be specified by using
# multiple resource_file definitions.  The CGIs will not attempt to
# read the contents of resource files, so information that is
# considered to be sensitive (usernames, passwords, etc) can be
# defined as macros in this file and restrictive permissions (600)
# can be placed on this file.
resource_file=/etc/naemon/resource.cfg

In /etc/naemon/thruk_local.conf I now have the following:
resource_file=/etc/naemon/thruk_resource.cfg

But the service information looks the same, and variables are still 
expanded.

Which resource file should contain the variables  I do not want thruk to 
display?

Thanks,




More information about the Naemon-users mailing list