Hello,
I'm use Logstash
v7.3.2-1
on Centos 7. When started the service from systemctl run fine but not load the /etc/logstash/conf.d/
directory . My filter work fine with the "manual" command:
/usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/apache.conf
ie:
{
"archivename" => "Audiencias/xxxx-0-1230",
"action" => "MKCOL",
"clientip" => "10.94.10.41",
"host" => "oc-web-01.example.com",
"username" => "JG1230-02",
"message" => "10.94.10.41 - - [16/Sep/2019:18:36:17 -0300] \"MKCOL /remote.php/dav/files/JG1230-02/Audiencias/xxxx-0-1230 HTTP/1.1\" 201 - \"-\" \"Mozilla/5.0 (Windows) mirall/2.3.3 (build 1) (Nextcloud)\"",
"@version" => "1",
"@timestamp" => 2019-09-16T21:36:17.000Z,
"response" => "201",
"path" => "/var/log/httpd/access_log"
I edit the /etc/systemd/system/logstash.service
and add "-f" "/etc/logstash/conf.d/apache.conf"
but not load file .
[Unit]
Description=logstash
[Service]
Type=simple
User=logstash
Group=logstash
# Load env vars from /etc/default/ and /etc/sysconfig/ if they exist.
# Prefixing the path with '-' makes it try to load, but if the file doesn't
# exist, it continues onward.
EnvironmentFile=-/etc/default/logstash
EnvironmentFile=-/etc/sysconfig/logstash
ExecStart=/usr/share/logstash/bin/logstash "--path.settings" "/etc/logstash" "-f" "/etc/logstash/conf.d/apache.conf"
Restart=always
WorkingDirectory=/
Nice=19
LimitNOFILE=16384
[Install]
WantedBy=multi-user.target
what's wrong ?
Thanks.