Linux RedHat - NXLog

Hey Guys,

Please take a look on my nxlog.conf on my Linux Redhat VM.

########################################
# Global directives                    #
########################################
User nxlog
Group nxlog

LogFile /var/log/nxlog/nxlog.log
LogLevel INFO

########################################
# Modules                              #
########################################
<Extension gelf>
    Module      xm_gelf
</Extension>

<Input in>
        Module  im_file
        File    "/var/log/messages"
</Input>

<Output out>
    Module      om_tcp
    Host        172.20.42.15
    Port        12201
    OutputType  GELF_TCP
</Output>

########################################
# Routes                               #
########################################
<Route 1>
    Path        in => out
</Route>

I am trying to push log messages to my logserver via GELF_TCP. In my Input nothing is shown…
Thanks for you help.

Is the user “nxlog” or the group “nxlog” allowed to read from /var/log/messages?
Is there a GELF TCP input running in Graylog?
Is 172.20.42.15 the correct IP address and is 12201 the correct port of said GELF TCP input?

And last but not least, why use NXLOG and not the system’s syslog daemon to forward messages to Graylog?

Hello Jochen,

thanks for your reply.
Can I also use my own user?
Yes I do also habe a TCP_GELF Input!
IP and Port also correct!

Can the syslog deamon send messages to var/log/messages and to my graylog server? Or is it either or?

Thanks

You can do whatever you want on your systems. :wink:

You let the syslog daemon write log messages to both destinations.

1 Like

I have another Question.
I tried to install the rpm packed but It always tells me missing dependencies:

image

How can I finish my installation? What can I do?

You have to install the missing package(s) or use a statically linked version of NXLOG.

Where can I find the right ones, their are so many different!? Sorry but I am new to Linux and to Graylog.

How exactly have you tried installing NXLOG on your system?

Also take a look at the Collector Sidecar, which helps you setting up and configuring various third party log shippers (such as NXLOG or Filebeat).
http://docs.graylog.org/en/2.4/pages/collector_sidecar.html

Hello Jochen,

thanks for your help, now the NXLog is up and running. It is sending log messages to my graylog server! :wink:

I was asking myself how i can read a hole line of my “message.log” with nxlog to my graylog server! Where can I configure all the parameters and how do the grok pattern work with all that topic?!

I don´t see the connections between nxlog parsing and the graylog recieving message.

Thanks

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