Hello

I have setup a sidecar collector config on graylog using the default nxlog 
config

I would like to modify the file input using a snippet.

The config currently looks like this

<Input 582ef996c0ebd7060613002f>
        Module im_file
        File '/var/log/nginx/access-api-*.log'
        PollInterval 1
        SavePos True
        ReadFromLast False
        Recursive True
        RenameCheck True
        Exec $FileName = file_name(); # Send file name with each message
</Input>

I want it to look like

<Input 582ef996c0ebd7060613002f>
        Module im_file
        File '/var/log/nginx/access-api-*.log'
        PollInterval 1
        SavePos True
        ReadFromLast False
        Recursive True
        RenameCheck True
        Exec $FileName = file_name(); # Send file name with each message
        
        rename_field("FileName", "file_name");
        Exec delete($EventReceivedTime);
Exec delete($SourceModuleName);
Exec delete($SourceModuleType);
</Input>

When I add the extra lines as a snippet, it gets added to the global 
context and not inside the Input context.

How could I go about achieving this from the graylog ui ?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/graylog2/f161447b-637f-40d8-8ead-1fbcecc10d78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to