Lightweight log shipper for Windows containers and hosts built for Windows Server LTSC 2019 nodes.
238
Lightweight log shipper for Windows containers and hosts (Filebeat 8.x and 9.x) built for Windows Server LTSC 2019 nodes.
Windows containers must match the host OS family. This image targets Windows Server 2019 (build 17763).
dimuskin/filebeat-windows:8.18.5-ltsc2019 — windows/amd64 (ServerCore 2019)dimuskin/filebeat-windows:9.1.3-ltsc2019 — windows/amd64 (ServerCore 2019)TODO : If you later publish a Windows Server 2022 variant, add
:8.18.5-ltsc2022and extend this README accordingly.
Base: mcr.microsoft.com/windows/nanoserver:ltsc2019
Filebeat 8.18.5 extracted to C:\filebeat
Default entrypoint:
C:\filebeat\filebeat.exe -c C:\etc\filebeat.yml -e
No opinionated config baked in — mount your filebeat.yml.
docker pull dimuskin/filebeat-windows:8.18.5-ltsc2019
docker run --rm -it `
-v C:\path\to\filebeat.yml:C:\etc\filebeat.yml `
-v C:\filebeat-data:C:\filebeat\data `
dimuskin/filebeat-windows:8.18.5-ltsc2019
Common mounts
C:\etc\filebeat.yml – main configC:\filebeat\data – registry/state (persist for continuity)Tips
${VAR}).apiVersion: apps/v1
kind: DaemonSet
metadata:
name: filebeat-windows-2019
namespace: kube-system
spec:
selector:
matchLabels: { app: filebeat, winltc: "2019" }
template:
metadata:
labels: { app: filebeat, winltc: "2019" }
spec:
nodeSelector:
kubernetes.io/os: windows
kubernetes.azure.com/os-sku: Windows2019
tolerations:
- key: "os"
operator: "Equal"
value: "Windows"
effect: "NoSchedule"
containers:
- name: filebeat
image: dimuskin/filebeat-windows:8.18.5-ltsc2019
args: ["-c","filebeat.yml","-e"]
volumeMounts:
- name: cfg
mountPath: C:\etc\filebeat.yml
subPath: filebeat.yml
- name: data
mountPath: C:\filebeat\data
volumes:
- name: cfg
configMap:
name: filebeat-windows-config
- name: data
emptyDir: {}
Create a
ConfigMapnamedfilebeat-windows-configcontaining yourfilebeat.yml.
os-sku: Windows2019).:ltsc2022 image for that, will add it later).ltsc2022 image on WS2022 nodes.filebeat.yml is mounted at C:\etc\filebeat.yml.-e to log to stderr, check container logs, verify inputs/paths and permissions.If you’re building this image yourself, a typical Dockerfile pattern is:
# syntax=docker/dockerfile:1.6
FROM mcr.microsoft.com/windows/servercore:ltsc2019 AS core
ARG FILEBEAT_VERSION=8.18.5
ARG FILEBEAT_SHA512=68d607d1d9ed1a2111905978090ec2a47e24a5e22f6381e693aed081771aae2f674482d78a115dae7dbb2cf4012a517ca11c734a9bbca485e100c15cf26ff89b
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN $url = ('https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-{0}-windows-x86_64.zip' -f $env:FILEBEAT_VERSION); \
Write-Host ('Downloading {0} to filebeat.zip ...' -f $url); \
Invoke-WebRequest -Uri $url -OutFile 'filebeat.zip' -TimeoutSec 300; \
\
$sha512 = $env:FILEBEAT_SHA512; \
Write-Host ('Verifying sha512 ({0}) ...' -f $sha512); \
if ((Get-FileHash filebeat.zip -Algorithm sha512).Hash -ne $sha512) { \
Write-Host 'FAILED!'; \
exit 1; \
}; \
\
New-Item -Path 'c:\' -Name 'filebeat' -ItemType 'directory'; \
Write-Host 'Expanding filebeat.zip ...'; \
Expand-Archive filebeat.zip -DestinationPath C:\filebeat; \
\
Write-Host 'Removing filebeat.zip ...'; \
Remove-Item filebeat.zip -Force; \
\
Write-Host 'Completed installing filebeat.';
FROM mcr.microsoft.com/windows/nanoserver:ltsc2019
ARG FILEBEAT_VERSION=8.18.5
ARG MACHINEGUID=FCKGW-RHQQ2-YXRKT-8TG6W-2B7Q8
COPY --from=core /filebeat/filebeat-${FILEBEAT_VERSION}-windows-x86_64 /filebeat
COPY --from=core /Windows/System32/netapi32.dll /Windows/System32/netapi32.dll
USER ContainerAdministrator
RUN reg add "HKLM\SOFTWARE\Microsoft\Cryptography" /f
RUN reg add "HKLM\SOFTWARE\Microsoft\Cryptography" /v MachineGuid /t REG_SZ /d ${MACHINEGUID} /f
ENTRYPOINT [ "c:\\filebeat\\filebeat.exe", "-c", "c:\\etc\\filebeat.yml", "-e" ]
Filebeat is provided by Elastic under its upstream license. Review the license that applies to your Filebeat version.
Maintained by dimuskin.
GitHub: https://github.com/dimuskin/filebeat-windows-docker
When filing issues, include:
filebeat.yml to reproduceContent type
Image
Digest
sha256:9d6aad316…
Size
152 MB
Last updated
8 months ago
docker pull dimuskin/filebeat-windows:9.2.0-ltsc2019