4
responses
responses
Hi
I downloaded and install nxlog-ce-3.0.2272_rhel8.x86_64.rpm on Centos 8 server
I it is my first installation on centos 8. I used before only Centos 7 with nxlog.
I copied input configuration from other server . and sending data to graylog
But field FileName now unknown instead name of file . Rest of fields work excellent
---------------------------
<Input log>
Module im_file
File "/var/log/*"
SavePos TRUE
ReadFromLast TRUE
Exec $Message = $raw_event;
Exec $FileName = file_name();
</Input>
Comments (4)
Hi Vadim,
Do you mind attaching the agent log and the full configuration...
Regards,
Jeffron
Same here.
This is my configuration:
########################################
# Global directives #
########################################
User nxlog
Group nxlog
include /etc/nxlog/nxlog.d/*.conf
LogFile /var/log/nxlog/nxlog.log
LogLevel DEBUG
########################################
# Modules #
########################################
<Extension _syslog>
Module xm_syslog
</Extension>
<Extension charconv>
Module xm_charconv
AutodetectCharsets utf-8, utf-16, utf-32, iso8859-2, ISO-8859-1
</Extension>
<Extension fileop>
Module xm_fileop
</Extension>
<Extension json>
Module xm_json
</Extension>
##########
# Input #
##########
<Input LOGS>
Module im_file
File "/opt/LOGS/*log"
Recursive True
Exec $Dirname=file_dirname(file_name());
Exec $Dirname =~ s/\/opt\/LOGS\///;
Exec $Message = $raw_event;
Exec $Hostname = hostname();
Exec $Entorno = "-DES";
Exec $Filename=file_basename(file_name());
Exec convert_fields("ISO-8859-1", "utf-8");
Exec to_json();
</Input>
##########
# Output #
##########
<Output nxlog_server>
Module om_tcp
Host nxlog.server.local
Port 1514
OutputType Binary
</Output>
##########
# Routes #
##########
<Route Servidor>
Path LOGS => nxlog_server
</Route>
the same thing pls help
Same here. Probably it is a defect of this version, as I have not experienced it before.