Hi Jochen,
Now collector is showing running status only but I am not getting any
messages.
Below the nxlog.conf
/etc/graylog/collector-sidecar/generated/nxlog.conf
define ROOT /usr/bin
<Extension gelf>
Module xm_gelf
</Extension>
User nxlog
Group nxlog
Moduledir /usr/lib/nxlog/modules
CacheDir /var/spool/collector-sidecar/nxlog
PidFile /var/run/graylog/collector-sidecar/nxlog.pid
define LOGFILE /var/log/graylog/collector-sidecar/nxlog.log
LogFile %LOGFILE%
LogLevel INFO
<Extension logrotate>
Module xm_fileop
<Schedule>
When @daily
Exec file_cycle('%LOGFILE%', 7);
</Schedule>
</Extension>
<Input 57dbb2d3bfcab303ba29c467>
Module im_file
File 'var/log/syslog'
PollInterval 1
SavePos True
ReadFromLast True
Recursive True
RenameCheck False
Exec $FileName = file_name(); # Send file name with each message
</Input>
<Input 57dbb305bfcab303ba29c49d>
Module im_file
File 'var/log/apache2/error.log'
PollInterval 1
SavePos True
ReadFromLast True
Recursive True
RenameCheck False
Exec $FileName = file_name(); # Send file name with each message
</Input>
<Output 57dbb277bfcab303ba29c405>
Module om_tcp
Host 10.0.3.211
Port 5044
OutputType GELF_TCP
Exec $short_message = $raw_event; # Avoids truncation of the
short_message field.
Exec $gl2_source_collector = '52703181-5745-47f3-9146-584ecb898383';
Exec $Hostname = hostname_fqdn();
</Output>
<Route route-1>
Path 57dbb2d3bfcab303ba29c467 => 57dbb277bfcab303ba29c405
</Route>
<Route route-2>
Path 57dbb305bfcab303ba29c49d => 57dbb277bfcab303ba29c405
</Route>
I have used multiple ports like 514 513,5044 and 12201 but getting error
like
tailf /var/log/graylog/collector-sidecar/nxlog.log
2016-09-16 08:58:42 ERROR couldn't connect to tcp socket on
10.0.3.211:514;Connection
refused
2016-09-16 08:58:50 INFO connecting to 10.0.3.211:514
2016-09-16 08:58:50 INFO reconnecting in 16 seconds
tailf /var/log/graylog/collector-sidecar/nxlog.log
2016-09-16 09:01:47 INFO nxlog-ce-2.9.1716 started
2016-09-16 09:01:47 INFO connecting to 10.0.3.211:513
tailf /var/log/graylog/collector-sidecar/nxlog.log
2016-09-16 09:07:28 ERROR couldn't connect to tcp socket on
10.0.3.211:5044;Connection
refused
2016-09-16 09:08:32 INFO connecting to 10.0.3.211:5044
2016-09-16 09:08:32 INFO reconnecting in 128 seconds
tailf /var/log/graylog/collector-sidecar/nxlog.log
2016-09-16 09:18:51 INFO nxlog-ce-2.9.1716 started
2016-09-16 09:18:51 INFO connecting to 10.0.3.211:12201
2016-09-16 09:18:51 INFO reconnecting in 1 seconds
Network connection is perfect between to systems.
Thanks for you reply.
On Fri, Sep 16, 2016 at 2:08 PM, Jochen Schalanda <[email protected]>
wrote:
> Hi Surajit,
>
> please share the contents of /etc/graylog/collector-side
> car/generated/nxlog.conf and the configuration for the collector you've
> created in Graylog.
>
> Cheers,
> Jochen
>
>
> On Friday, 16 September 2016 07:54:21 UTC+2, Surajit Roy wrote:
>>
>> /etc/graylog/collector-sidecar/collector_sidecar.yml configuretiaon is
>> below.
>>
>> server_url: http://10.0.3.211:9000/api/
>> update_interval: 30
>> tls_skip_verify: true
>> send_status: true
>> list_log_files: /var/log
>> node_id: graylog-collector-sidecar
>> collector_id: file:/etc/graylog/collector-sidecar/collector-id
>> log_path: /var/log/graylog/collector-sidecar
>> log_rotation_time: 86400
>> log_max_age: 604800
>> tags:
>> - linux
>> - apache
>> backends:
>> - name: nxlog
>> enabled: true
>> binary_path: /usr/bin/nxlog
>> configuration_path: /etc/graylog/collector-sidecar
>> /generated/nxlog.conf
>> ~
>>
>>
>>
>> Below the nxlog .
>>
>> tailf /var/log/graylog/collector-sidecar/nxlog.log
>> 2016-09-16 05:26:16 INFO nxlog-ce-2.9.1716 started
>> 2016-09-16 05:27:25 WARNING no routes defined!
>> 2016-09-16 05:27:25 INFO configuration OK
>> 2016-09-16 05:27:25 INFO reloading configuration and restarting modules
>> 2016-09-16 05:27:25 WARNING no functional input modules!
>> 2016-09-16 05:27:25 WARNING no routes defined!
>> 2016-09-16 05:27:25 INFO configuration reloaded successfully.
>> 2016-09-16 05:27:29 WARNING no functional input modules!
>> 2016-09-16 05:27:29 WARNING no routes defined!
>> 2016-09-16 05:27:29 INFO nxlog-ce-2.9.1716 started
>>
>> root@ip-10-0-3-67:/home/ubuntu# graylog-collector-sidecar -c
>> /etc/graylog/collector-sidecar/collector_sidecar.yml
>> INFO[0000] Using collector-id: 52703181-5745-47f3-9146-584ecb898383
>> INFO[0000] Fetching configurations tagged by: [linux apache]
>> INFO[0000] Starting collector supervisor
>> INFO[0000] [nxlog] Starting
>> ERRO[0000] [nxlog] Collector exits immediately, this should not happen!
>> Please check your collector configuration!
>> ERRO[0000] [nxlog] Backend crashed, trying to restart 1/3
>> INFO[0005] [nxlog] Starting
>> ERRO[0005] [nxlog] Collector exits immediately, this should not happen!
>> Please check your collector configuration!
>> ERRO[0005] [nxlog] Backend crashed, trying to restart 2/3
>> INFO[0010] [nxlog] Starting
>> ERRO[0010] [nxlog] Collector exits immediately, this should not happen!
>> Please check your collector configuration!
>> ERRO[0010] [nxlog] Backend crashed, trying to restart 3/3
>>
>>
>>
>> Please suggest me where I did wrong .
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Graylog Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/graylog2/mHPqEhr1bhk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/graylog2/672749b0-5523-477d-bd52-87d4dfa91ffe%40googlegroups.com
> <https://groups.google.com/d/msgid/graylog2/672749b0-5523-477d-bd52-87d4dfa91ffe%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
Thank & Best Regards
Surajit Roy
7483119839.
--
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/CAK%3DBhURttTzztLAkez%3Du%3DipNV9LRnFZye-8B90rfvck5%2BrPXzQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.