diff --git a/deploy/kubernetes/chart/files/logstash/10-stats.conf b/deploy/kubernetes/chart/files/logstash/10-stats.conf index 344f01da..32b72a19 100644 --- a/deploy/kubernetes/chart/files/logstash/10-stats.conf +++ b/deploy/kubernetes/chart/files/logstash/10-stats.conf @@ -12,10 +12,18 @@ filter { if [user_agent] =~ "^kube-probe" { drop { } } + # Drop HEAD requests + if [method] == "HEAD" { + drop { } + } # Only consider file downloads and OPeNDAP accesses if [request] !~ "^/thredds/(fileServer|dodsC)" { drop { } } + # Drop extraneous OPeNDAP requests + if [request] =~ "^/thredds/dodsC/([\?].*)\.(html|nc|dds|das)" { + drop { } + } # Replace the logstash timestamp with the timestamp from the request date { match => ["request_time", "dd/MMM/yyyy:HH:mm:ss Z"] diff --git a/images/logstash/Dockerfile b/images/logstash/Dockerfile index bee82151..9739bc93 100644 --- a/images/logstash/Dockerfile +++ b/images/logstash/Dockerfile @@ -25,7 +25,7 @@ COPY logstash.repo /etc/yum.repos.d/logstash.repo # So SHA1 needs to be enabled to install it. RUN update-crypto-policies --set DEFAULT:SHA1 RUN dnf makecache && \ - dnf install -y logstash-7.10.0 && \ + dnf install -y logstash && \ dnf clean all && \ chown -R $ESGF_UID:$ESGF_GID /usr/share/logstash