Filebeat Error: 'Non-zero metrics in the last 30s' — Cause, Fix, and Troubleshooting Guide
Understand Filebeat 'Non-zero metrics in the last 30s': read the periodic metrics line to spot stalled harvesters, output failures, and dropped events.
- #filebeat
- #logging
- #troubleshooting
- #errors
Stuck on this Filebeat error? Get the free incident triage checklist
A one-page PDF — the exact steps to isolate, fix, and verify a production error like this one. No spam, unsubscribe anytime.
What this error means
This is not an error — it is Filebeat’s periodic internal metrics snapshot, logged every 30 seconds whenever counters changed:
Non-zero metrics in the last 30s {"monitoring": {"metrics": {"filebeat":{"harvester":{"open_files":12,"running":12}},"libbeat":{"output":{"events":{"acked":0,"failed":2048,"total":2048}},"pipeline":{"events":{"published":2048,"retry":2048}}}}}
People search for it because it shows up constantly and they assume it signals trouble. It does not by itself — but it is the single most useful diagnostic line in the log. The counters tell you whether events are being read (harvester), queued (pipeline), and acknowledged by the output (libbeat.output.events.acked). A healthy pipeline shows acked climbing; a broken one shows failed/retry climbing while acked stays at zero.
How the agent reports it
- The
Non-zero metrics in the last 30sline repeats every 30s in the log. - Interpreted alone it looks alarming, but it is expected output at the default log level.
- Real trouble shows as
output.events.failedorpipeline.events.retryrising whileackedis flat. - If the line stops appearing entirely, Filebeat is idle (nothing changed) or wedged.
Checking the agent configuration
Tail the metrics line and watch acked vs failed:
journalctl -u filebeat -f | grep -i 'Non-zero metrics'
Query the live metrics endpoint instead of parsing the log (enable HTTP first):
# filebeat.yml
http.enabled: true
http.host: localhost
http.port: 5066
curl -s localhost:5066/stats | \
jq '.libbeat.output.events, .filebeat.harvester, .libbeat.pipeline.events'
Agent configuration causes
This message is informational; the reason it worries you is usually one of:
- Output failing —
acked: 0withfailed/retryclimbing means Elasticsearch/Logstash rejects or drops events. - No harvesters —
harvester.running: 0means no files match your inputs. - Backpressure —
pipeline.events.activepinned at the queue max means the output cannot keep up. - Dropped events —
output.events.droppedincrementing means non-retryable failures (bad mapping, 400s).
Step-by-step resolution
If acked is stuck at 0, the problem is the output, not this line — test it directly:
filebeat test output
If harvester.running is 0, no files match; verify your paths resolve:
ls -l /var/log/app/*.log
filebeat -e -d "harvester,input"
To quiet noisy healthy metrics, raise the interval or narrow the selectors rather than suppressing them:
logging.metrics.period: 60s # default is 30s
Safer agent defaults
- Do not silence metrics entirely — they are your primary signal when ingestion stalls.
ackedis the number that matters;totalandpublishedcount attempts, not successes.- A sudden absence of the line can mean Filebeat is blocked, not that all is well.
- Prefer the
:5066/statsHTTP endpoint for dashboards over scraping the log text.
Related agent errors
- Filebeat Error Guide: ‘temporary bulk send failure’
- Filebeat Error Guide: ‘429 Too Many Requests’
- Filebeat Error Guide: ‘connection refused’
Fixed it? Get 500 Filebeat & DevOps AI prompts — free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.
Did this fix your issue?
Trending errors this week
The error guides other engineers are actually reading right now.
- 1mount: wrong fs type, bad option, bad superblock
- 2Docker 'failed to set up container networking': Fix the Bridge and IP Pool
- 3Docker 'failed to create shim task': How to Fix the containerd Runtime Error
- 4modprobe: FATAL: Module not found
- 5mount: wrong fs type, bad option, bad superblock
- 6Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Get 500 Battle-Tested DevOps AI Prompts — Free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.