GrayLog 3.1 | Nxlog issues with parsing exec block

Hi All,

I just upgraded graylog 2.4 to 3.1. My collector-sidecar & nx log config worked fine with version 2.4

I have imported nx conf to new graylog-collector, upgrade nxlog to latest version, and replaced collector side car with new graylog-collector.

Now, I am seeing an issue where nxlog exec block isn’t working. I am using the default block

Here is the snippet

<Output gelf>
	Module om_tcp
	Module on_exec
	Host 172.17.1.87
	Port 5044
	OutputType  GELF_TCP
	<Exec>
   # $gl2_source_collector = ${sidecar.nodeId}
   # $collector_node_id = ${sidecar.nodeName}
   $collector_node_id='${sidecar.nodeName}';
	</Exec>
</Output>

the following is logged into nx.log

2019-08-29 15:08:41 INFO nxlog-ce-2.10.2150 started
nxlog failed to start: Couldn't parse Exec block at C:\Program Files\Graylog\sidecar\generated\nxlog.conf:90
couldn't parse statement at line 93, character 38 in C:\Program Files\Graylog\sidecar\generated\nxlog.conf
invalid character: '
' (0xd)
2019-08-29 15:09:50 ERROR Couldn't parse Exec block at C:\Program Files\Graylog\sidecar\generated\nxlog.conf:90; couldn't parse statement at line 93, character 38 in C:\Program Files\Graylog\sidecar\generated\nxlog.conf; invalid character: ';' (0xd)
2019-08-29 15:09:50 WARNING stopping nxlog service
2019-08-29 15:09:50 WARNING nxlog-ce received a termination request signal, exiting...
2019-08-29 15:09:51 ERROR Couldn't parse Exec block at C:\Program Files\Graylog\sidecar\generated\nxlog.conf:90; couldn't parse statement at line 93, character 38 in C:\Program Files\Graylog\sidecar\generated\nxlog.conf; invalid character: ';' (0xd)
2019-08-29 15:09:51 ERROR module 'gelf' has configuration errors, not adding to route 'route-0' at C:\Program Files\Graylog\sidecar\generated\nxlog.conf:98
2019-08-29 15:09:51 ERROR route route-0 is not functional without output modules, ignored at C:\Program Files\Graylog\sidecar\generated\nxlog.conf:98
2019-08-29 15:09:51 WARNING no routes defined!
2019-08-29 15:09:51 WARNING not starting unused module process-buffer
2019-08-29 15:09:51 WARNING not starting unused module eventlog
2019-08-29 15:09:51 WARNING not starting unused module gelf
2019-08-29 15:09:51 INFO nxlog-ce-2.10.2150 started

If i comment or remove the Exec statements, the config loads fine, and there are no errors in the nx.log

I have tried with and without Module om_exec, the results are same.

Any pointers, what i am going wrong here?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.