Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
VGSources
Blog

How to Gather Infrastructure Metrics with Packetbeat and ELK (and Why You Still Need Metricbeat)

Packetbeat supplies network and application-transaction telemetry to Elasticsearch and Kibana; Metricbeat supplies host infrastructure metrics. This guide covers architecture, configuration, setup, verification, dashboards, troubleshooting, and rollout.
Length12 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Packetbeat is not a general-purpose host-metrics collector. It passively observes network traffic, decodes supported application protocols, and sends request, response, latency, error, and service-interaction events to Elasticsearch (directly or through Logstash). Kibana then searches and visualizes those events. For CPU utilization, memory, filesystem, process, and similar host measurements, add Metricbeat or Elastic’s current host-metrics integration.

A reliable ELK deployment therefore uses Packetbeat for network and transaction telemetry, Metricbeat for infrastructure resource data, Elasticsearch for storage and search, and Kibana for investigation and dashboards. The workflow is: install Packetbeat where the traffic is visible, configure its output and sniffer, enable the protocols you need, load the assets with packetbeat setup -e, start the service, and verify the resulting packetbeat-* data view in Kibana.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What Packetbeat measures—and what it does not

Elastic describes Packetbeat as “a real-time network packet analyzer that you can use with Elasticsearch to provide an application monitoring and performance analytics system.” Its unit of observation is traffic. Packetbeat captures packets from a network interface, reconstructs conversations, decodes application-layer protocols, and emits structured events for the transactions it can identify.

Telemetry Packetbeat is designed to provide

  • Request and response transactions for enabled protocols.
  • Response time and latency behavior that helps reveal slow services.
  • Protocol-level errors and failed transactions.
  • Client, server, service, and host relationships visible in the captured traffic.
  • Traffic volume and interaction patterns between applications.
  • Optional process and other enrichment fields when configured and supported by the installed release.

Telemetry Packetbeat does not replace

Packetbeat does not, by itself, provide a complete inventory of host CPU, memory, filesystem, process, or operating-system resource utilization. Its internal monitoring counters can show whether Packetbeat is collecting and publishing successfully, but those counters are health data for the collector, not a substitute for host metrics. Use Metricbeat or the current Elastic host-metrics integration alongside Packetbeat when the question is “Is this server out of CPU or memory?”

How the ELK architecture fits together

Think of the deployment as four separate responsibilities. Keeping them distinct prevents a common design mistake: expecting a packet sensor to become a host-monitoring agent.

Component Primary job Typical position Output or input
Packetbeat Network and application-transaction telemetry Installed on a host whose interface can see the traffic of interest Sends events to Elasticsearch or Logstash
Metricbeat or host-metrics integration CPU, memory, filesystem, process, and other infrastructure measurements Installed on the host or deployed through the selected Elastic integration method Sends host events to Elasticsearch or through Logstash
Elasticsearch Stores, indexes, and searches events Self-managed or managed deployment Receives beats directly or from Logstash
Logstash Optional routing, transformation, and buffering layer Between Beats and Elasticsearch when the architecture needs it Receives Packetbeat events and forwards them
Kibana Search, dashboards, visualizations, and operational investigation Connected to the Elasticsearch deployment Reads indexed data and saved objects

Elastic Cloud Hosted is an optional managed route for the Elasticsearch and Kibana portion of the stack. The same Packetbeat decisions still apply: the sensor must be able to see the traffic, authenticate to the destination, and publish through the configured output.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Plan the deployment before installing anything

Choose where Packetbeat can see the traffic

Install Packetbeat on each system whose traffic you want to observe, and select an interface that actually carries that traffic. A sensor on an application server can usually see that server’s local conversations; it will not automatically see traffic on unrelated hosts or network segments. Virtual switches, containers, encrypted links, routing, and interface isolation can all change what is visible.

Write down the observation points first: which services matter, which hosts initiate and receive requests, which interfaces carry those requests, and whether traffic is local to a host or traverses a monitored segment. If the interface cannot see the packets, no protocol setting or Kibana panel can recover the missing data.

Decide whether to send directly or through Logstash

Packetbeat supports output to Elasticsearch and to Logstash. Direct output is simpler and removes a hop. Logstash is useful when the team needs centralized routing, transformation, or a common ingestion path for several shippers. Whichever route you choose, configure the destination, credentials, TLS settings, and permissions before starting the service.

Set an evidence window and ownership model

Define the services and time ranges that matter to the team, who owns each monitored host, and which Kibana views will be maintained. Packetbeat’s bundled dashboards are examples, not a finished service-level-observability model; Elastic recommends customizing them for your needs.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Prerequisites and access requirements

  • An Elasticsearch and Kibana deployment, or an Elastic Cloud Hosted deployment, reachable from the Packetbeat host.
  • A Packetbeat package installed on every host whose visible traffic is in scope.
  • Permission to inspect the selected network interface. The exact privilege mechanism depends on the operating system and sniffer type.
  • Credentials with enough permission to publish events and, when using the setup command, load the index template and Kibana assets.
  • Network access from Packetbeat to Elasticsearch or Logstash, including any required TLS trust material.
  • A protocol list matching the applications actually running in the environment.
  • A plan for host metrics if CPU, memory, disk, or process utilization is required; Packetbeat alone is not that collector.

Install and configure Packetbeat

Install the Packetbeat package appropriate for each monitored operating system, then edit packetbeat.yml. Keep the configuration under version control, protect credentials, and treat the file as environment-specific: an interface name, destination address, enabled protocol, or TLS trust path that is correct on one host may be wrong on another.

1. Configure the event output

Choose one output path and configure its endpoint, authentication, and TLS behavior. A direct Elasticsearch configuration conceptually contains the Elasticsearch hosts and credentials; a Logstash configuration contains the Logstash hosts and any required transport settings. Use Packetbeat’s secrets keystore for sensitive values where possible instead of placing passwords directly in the YAML file.

# Illustrative structure; use the keys and syntax shipped with your Packetbeat release
output.elasticsearch:
  hosts: ["https://elasticsearch.example.internal:9200"]
  username: "packetbeat_writer"
  # Store the password in the Packetbeat secrets keystore

# Or use output.logstash for a Logstash-based route
# output.logstash:
#   hosts: ["logstash.example.internal:5044"]

The example is intentionally a structure rather than a copy-and-paste credential recipe. Verify option names against the configuration generated by your installed release, especially when upgrading across major Elastic versions.

2. Select a sniffer and network device

Packetbeat’s sniffer determines how packets are captured. Elastic’s examples use pcap. On Linux, af_packet is documented as a faster option that does not require a kernel module. The special any device captures all messages visible on the host, but it is not supported on macOS.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Choice When it fits Important qualification
pcap A broadly documented capture method and a useful starting point for a controlled interface Requires the permissions and platform support expected by the capture library
af_packet Linux deployments where capture speed matters Elastic documents it as faster than the example approach and not dependent on a kernel module
any Linux hosts where all host-visible interfaces need to be included Captures all messages on the host and is not supported on macOS; broad capture can increase noise and overhead

Set the device explicitly when possible. An interface such as eth0, ens160, or a platform-specific name is only an example; use the name that exists on the target host. Confirm that the interface carries the service traffic before interpreting an empty dashboard as an application problem.

# Illustrative capture section
packetbeat.interfaces.type: af_packet
packetbeat.interfaces.device: eth0

3. Enable the protocols that matter

Enable analyzers for the application protocols in scope and configure their ports or protocol-specific options as required by the installed release. A protocol that is not enabled, a port that differs from the configured value, or traffic that is encrypted before Packetbeat can decode it will produce fewer transaction events than expected.

Start with a narrow protocol set tied to real services. This makes verification easier and avoids collecting traffic that no dashboard or investigation will use. Expand the set after confirming that the first services are decoded correctly.

4. Add flows, enrichment, processors, and TLS settings deliberately

Configure network-flow collection, process enrichment, processors, and SSL/TLS options only when they answer a defined operational question. Flow data can add traffic context; process enrichment can connect a transaction to a local process when the platform and permissions permit it; processors can normalize or drop fields; TLS settings protect the connection to Elasticsearch or Logstash. Every added option should be checked against the version installed on the host.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not confuse transport TLS with application-payload visibility. TLS can secure Packetbeat’s connection to its output while the application traffic it observes may still be encrypted and therefore unavailable for protocol decoding. Treat decoded-field availability as a property of the observed traffic and the enabled analyzer.

Load Elasticsearch and Kibana assets

Before starting the long-running service, run:

packetbeat setup -e

This loads the recommended index template and the sample Kibana dashboards. The command must be able to reach the configured destination and authenticate with permissions sufficient for setup. If setup fails, fix connectivity, credentials, TLS trust, or permissions before troubleshooting the capture interface; otherwise the service may publish correctly but leave Kibana without the expected data view or dashboards.

The supplied dashboards are examples. Replace broad, generic panels with views that match the services, hosts, protocols, and service-level objectives your team actually operates.

Start Packetbeat and confirm that it is publishing

Start Packetbeat using the service manager and package conventions of the operating system, or run it in the foreground while testing. A foreground run is useful because configuration and permission errors appear immediately in the terminal. Once the configuration is validated, use the platform service so Packetbeat starts consistently after a reboot and is supervised like the rest of the host agents.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Validate the YAML and output settings using the validation option provided by your installed package before putting the service into production.
  2. Start Packetbeat in the foreground for an initial capture test, or start its platform service after validation.
  3. Generate a small amount of known traffic to an enabled service so you have a timestamped transaction to find.
  4. Watch Packetbeat’s logs and internal monitoring counters for capture, decode, queue, and publish errors.
  5. Check Elasticsearch for newly indexed Packetbeat events before building custom visualizations.

Find the events in Kibana

Select the correct data view

In Kibana Discover, select the predefined packetbeat-* data view. If Discover is empty, first verify that this data view is selected rather than a host-metrics or log view.

Widen the time range

Kibana commonly opens on a last-15-minutes window. Widen the time filter when testing, especially if the monitored service generated traffic earlier or your clocks are not synchronized. A correct data view with an overly narrow time range can look exactly like a failed collector.

Filter from broad to specific

Begin with the host, then narrow by protocol, client, server, service, or transaction outcome. Use a known request time and a known endpoint to prove that the selected interface and analyzer are working before investigating aggregate charts.

Turn transaction events into useful operational measurements

Packetbeat events become useful metrics when they are grouped around a question. The same event stream can support different views without changing the collector.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Latency and slow requests

Use response-time fields to examine distributions and outliers rather than relying on a single average. Break the view down by service, server, client, protocol, and time period. A rise isolated to one server suggests a local issue; a rise across clients and servers suggests a shared dependency or network path.

Errors and failed transactions

Filter for protocol errors and unsuccessful responses, then compare their rate with request volume. A rising error count with flat traffic is a different incident from a rising error count caused solely by a traffic surge.

Service dependencies

Group client-server interactions to see which services call one another and where response time accumulates. This is especially useful when host CPU appears normal but an application still feels slow: the delay may be in a downstream service visible in the transaction path.

Traffic patterns

Trend transaction counts and flow information over time, then compare them with deployments, scheduled jobs, or user-facing incidents. Packetbeat shows what crossed the observed interface; it does not infer traffic that the interface never received.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Packetbeat and Metricbeat: choosing the right combination

Elastic’s quick-start mapping separates the Beats by telemetry domain:

Question Best-fit component
What network or application transactions crossed the monitored interface? Packetbeat
How much CPU, memory, filesystem, or process capacity is the host using? Metricbeat or the current Elastic host-metrics integration
What did the application write to its logs? Filebeat or the applicable log integration
Is an endpoint reachable or responding? Heartbeat
What is the application’s instrumented performance data? APM

Use Packetbeat and Metricbeat together when diagnosing infrastructure incidents. Packetbeat can show that requests became slow or failed; Metricbeat can show whether the host was CPU-bound, short on memory, or constrained by another resource. Neither stream alone explains every incident.

Troubleshoot an empty or incomplete dataset

Symptom Likely checks Corrective action
Discover shows no events Wrong data view, last-15-minutes filter, service not generating traffic Select packetbeat-*, widen the time range, and create known test traffic
Packetbeat runs but sees no transactions Selected interface does not carry the traffic, insufficient capture permission, wrong sniffer, unsupported or disabled protocol Verify the interface, permissions, sniffer type, protocol, and port settings on the host
Events exist but fields are missing Analyzer not enabled, traffic encrypted before decoding, protocol variant outside the configured coverage Check protocol configuration and the installed release’s analyzer coverage; do not assume every encrypted payload is decodable
Setup command fails Elasticsearch or Logstash unreachable, invalid credentials, TLS trust failure, insufficient setup permissions Resolve destination, authentication, certificate, and privilege errors, then rerun packetbeat setup -e
Events are delayed or absent at the destination Output connectivity, queue or publish errors, Logstash routing, index or permission problems Inspect Packetbeat’s internal monitoring and logs, then trace the path from the agent to the destination
Dashboards look misleading Sample panels do not match the team’s services or SLOs Customize filters, fields, thresholds, and time windows instead of treating the examples as production policy

Operate Packetbeat safely at scale

Limit collection to a useful scope

Capture only the interfaces and protocols that support an operational objective. Broad capture, especially through an all-interface device, can increase event volume and make investigations noisier. Start with a representative host and expand after measuring ingest rate and storage behavior.

Protect credentials and traffic

Use the secrets keystore for sensitive output values where possible. Configure TLS for the output path according to the security requirements of the Elasticsearch or Logstash deployment, and grant the agent only the permissions it needs to publish and perform setup.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep versions aligned

Packetbeat’s field names, protocol options, setup assets, and compatibility expectations can change between Elastic releases. Check the documentation shipped for the installed version before copying configuration from another environment. Validate upgrades in a test host, rerun setup when the release requires updated templates or dashboards, and inspect the resulting data view before changing production panels.

Monitor the monitor

Use Packetbeat’s internal monitoring metrics and logs to detect capture failures, decode problems, queue pressure, and publishing errors. These signals answer whether the collector is healthy. Pair them with Metricbeat host data and Kibana alerts so an agent failure is not mistaken for a quiet application.

A practical rollout sequence

  1. List the services, hosts, protocols, and operational questions in scope.
  2. Install Packetbeat on one representative host with the necessary interface visibility and permissions.
  3. Configure the output and credentials, storing secrets in the keystore where possible.
  4. Select the sniffer and device, beginning with a specific interface rather than an unnecessarily broad capture.
  5. Enable only the protocols needed for the first validation.
  6. Run packetbeat setup -e to load the index template and sample Kibana dashboards.
  7. Start Packetbeat, generate known traffic, and confirm events in the packetbeat-* data view.
  8. Customize dashboards around latency, errors, dependencies, and traffic patterns.
  9. Add Metricbeat or the current host-metrics integration for CPU, memory, filesystem, and process context.
  10. Expand to additional hosts and protocols only after the first deployment has a verified capture path and an owner.

Deployment checklist

  • Every monitored host has the correct Packetbeat package and a version-appropriate configuration.
  • The selected interface can actually see the traffic being investigated.
  • The sniffer type is supported on the operating system and has the required permissions.
  • Enabled protocol analyzers match the services and ports in use.
  • Elasticsearch or Logstash connectivity, credentials, TLS, and publishing permissions have been tested.
  • packetbeat setup -e completed successfully before the service was relied upon.
  • Kibana Discover uses the packetbeat-* data view and an appropriate time range.
  • Dashboards are customized for the team’s services and SLOs rather than treated as finished templates.
  • Metricbeat or a host-metrics integration is deployed wherever infrastructure resource data is required.
  • Packetbeat’s own health signals are monitored separately from application and host telemetry.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.