Hi, click on edit to open the input configuration and add the snippet at the bottom in the 'Verbatim configuration' field.
Cheers, Marius On 22 November 2016 at 13:03, husayn arrah <[email protected]> wrote: > 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. -- Developer Tel.: +49 (0)40 609 452 077 Fax.: +49 (0)40 609 452 078 TORCH GmbH - A Graylog Company Poolstraße 21 20335 Hamburg Germany https://www.graylog.com Commercial Reg. (Registergericht): Amtsgericht Hamburg, HRB 125175 Geschäftsführer: Lennart Koopmann (CEO) -- 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/CAMqbBbKLW7anL7W5pTNGy76DzFWUB0oKR58xFDiFqRoRGALxdA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
