Possibility of Global Tags for all Inputs

Tags:

#1 mats

What I'm trying to achive is to have a few Values globaly defined and the should be automatically added to all inputs.
Ie the same thing as Global Tags in Telegraf

Today I first use a define statement in the global part of NXLog.conf

Define Company Acme 

 

For each input I define i have to add a Exec line

Exec $Company = '%Company%';

I would like to be able to do this only once and have it automatically appended to all inputs. For a multi Company Scenario with a lot of logfiles It gets rather messy to maintain when you need to add anoter global value. It works well in Telegraf so I would like to be able to do something similar in Nxlog

 

#2 b0ti Nxlog ✓
#1 mats
What I'm trying to achive is to have a few Values globaly defined and the should be automatically added to all inputs. Ie the same thing as Global Tags in Telegraf Today I first use a define statement in the global part of NXLog.conf Define Company Acme    For each input I define i have to add a Exec line Exec $Company = '%Company%'; I would like to be able to do this only once and have it automatically appended to all inputs. For a multi Company Scenario with a lot of logfiles It gets rather messy to maintain when you need to add anoter global value. It works well in Telegraf so I would like to be able to do something similar in Nxlog  

This is not currently possible. On the other hand if you have a lot of separate input module instances it would probably make more sense to generate your config or do something like this:

define COMPANY foo
include company-input.conf

define COMPANY bar
include company-input.conf

Then you only have to edit stuff in company-input.conf once.