惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
P
Palo Alto Networks Blog
Martin Fowler
Martin Fowler
T
Threatpost
D
Docker
S
Schneier on Security
M
MIT News - Artificial intelligence
G
Google Developers Blog
L
LINUX DO - 热门话题
J
Java Code Geeks
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
IT之家
IT之家
博客园 - Franky
C
Cyber Attacks, Cyber Crime and Cyber Security
K
Kaspersky official blog
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
V
Vulnerabilities – Threatpost
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
人人都是产品经理
人人都是产品经理
Spread Privacy
Spread Privacy
T
Tailwind CSS Blog
爱范儿
爱范儿
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
C
CERT Recently Published Vulnerability Notes
The GitHub Blog
The GitHub Blog
Simon Willison's Weblog
Simon Willison's Weblog
NISL@THU
NISL@THU
MongoDB | Blog
MongoDB | Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
H
Heimdal Security Blog
Recorded Future
Recorded Future
云风的 BLOG
云风的 BLOG
SecWiki News
SecWiki News
P
Privacy International News Feed
P
Proofpoint News Feed
O
OpenAI News
B
Blog
腾讯CDC
F
Full Disclosure
Apple Machine Learning Research
Apple Machine Learning Research
T
Tor Project blog
H
Hacker News: Front Page
Project Zero
Project Zero
Hugging Face - Blog
Hugging Face - Blog
C
Cisco Blogs
S
Security Affairs

Datadog | The Monitor blog

Introducing our open source AI-native SAST Instrument and monitor Boomi integration flows with OpenTelemetry and Datadog Not all index scans are equal: How we cut query latency by over 99% Platform engineering metrics: What to measure and what to ignore Integrate Recorded Future threat intelligence with Datadog Cloud SIEM CI/CD security: threat modeling using a MITRE-style threat matrix CI/CD security: How to secure your GitHub ecosystem Ingress NGINX is EOL: A practical guide for migrating to Kubernetes Gateway API Operating agentic AI with Amazon Bedrock AgentCore and Datadog LLM Observability: Lessons from NTT DATA Introducing the Datadog Code Security MCP Capture and analyze custom heatmaps in Session Replay Understand session replays faster with AI summaries and smart chapters Monitor ClickHouse query performance with Datadog Database Monitoring How we designed empathetic alert sounds for on-call engineers Search and act across Datadog to resolve issues faster with Bits Assistant Measure the business impact of every product change with Datadog Experiments Analyzing round trip query latency Configuring JavaScript caches for better performance Introducing Bits AI Dev Agent for Code Security Datadog achieves ISO 42001 certification for responsible AI Monitor Nutanix clusters, hosts, and VMs with Datadog Monitor Juniper Mist in Datadog A new Host Map for modern infrastructure Annotate traces to improve LLM quality with Datadog LLM Observability What’s new in Cloud SIEM: AI-powered investigations, enhanced threat intelligence, and scalable security operations Explore Kubernetes with native OpenTelemetry data Monitor Oracle Fusion Cloud Applications with Datadog Announcing the Datadog Terraform provider v4.0.0 Scaling Kubernetes workloads on custom metrics How to design cloud environments for AI-powered threat analysis Monitor Aruba Central in Datadog How we centralize and remediate risks with Datadog Case Management Accelerate incident response with Datadog and ServiceNow Monitor your application and network load balancer logs Understanding Karpenter architecture for Kubernetes autoscaling Monitor Karpenter with Datadog What your product data is actually saying Key metrics for monitoring Karpenter Securing Datadog’s platform in the AI age: The role of observability data Four ways engineering teams use the Datadog MCP Server to power AI agents Approaching your observability migration with the right mindset Meet the new Bits AI SRE: Deeper reasoning, twice as fast Key learnings from the 2026 State of DevSecOps study Use plain English to query your multi-cloud infrastructure in Resource Catalog Simplifying troubleshooting across the user journey with Datadog Synthetic Monitoring Protect your OCI resources with Datadog Cloud Security This Month in Datadog - February 2026 Amazon EC2 security: How misconfigured and public AMIs expand your cloud attack surface Enable end-to-end visibility into your Java apps with a single command Measure and improve mobile app startup performance with Datadog RUM Evaluating our AI Guard application to improve quality and control cost Identify untested code across every level of your codebase Make use of guardrail metrics and stop babysitting your releases Monitor Versa Networks SD-WAN performance in Datadog Improve performance and reliability with APM Recommendations Remediate transitive vulnerabilities faster with Datadog Software Composition Analysis Generate audit-ready vulnerability and compliance reports with Datadog Sheets Monitor Fortinet FortiManager performance in Datadog Improve test coverage across codebases with Datadog Code Coverage Move fast, don’t break things: Consistent testing standards at scale Enrich logs with ServiceNow CMDB context before routing to any SIEM or logging tool Monitor Lustre with Datadog Make faster, better product decisions with Datadog Product Analytics Surface and remediate runtime posture issues with Workload Protection Findings Protect agentic AI applications with Datadog AI Guard How to optimize JavaScript code with CSS Trace Google Pub/Sub workloads in Cloud Run with Datadog Detect human names in logs with ML in Sensitive Data Scanner How we cut our NLQ agent debugging time from hours to minutes with LLM Observability Debug PostgreSQL query latency faster with EXPLAIN ANALYZE in Datadog Database Monitoring Datadog acquires Propolis Unify and correlate frontend and backend data with retention filters Scale compliance across global frameworks with Datadog Cloud Security Monitor Arista VeloCloud SD-WAN performance with Datadog Building reliable dashboard agents with Datadog LLM Observability Simplify log collection and aggregation for MSSPs with Datadog Observability Pipelines Mitigation for Node.js denial-of-service vulnerability affecting Datadog APM Automate flaky test fixes with the Bits AI Dev Agent and Test Optimization How we built an AI SRE agent that investigates like a team of engineers Datadog integrations 2025 recap: Observability for AI, security, and hybrid cloud Design effective executive dashboards with Datadog Implement dbt data quality checks with dbt-expectations Bring faster visibility into AWS Lambda functions with remote instrumentation Troubleshoot faster with the GitLab Source Code integration in Datadog How Cambia Health Solutions saved $30,000 monthly with Cloud Cost Management and the Datadog Resource Catalog Normalize any logs for Cloud SIEM with Datadog's OCSF processor Optimizing Datadog at scale: Cost-efficient observability at Zendesk Detect, diagnose, and resolve network issues easily with CNM Network Health Securing customer logins with breach intelligence Connect engineering errors to user impact in early-stage products Cilium configuration for Kubernetes operations at scale Designing feedback loops for progressive delivery Ship features faster and safer with Datadog Feature Flags Choosing the right OpenTelemetry Collector distribution Route your monitor alerts with Datadog monitor notification rules Automate Cloud SIEM investigations with Bits AI Security Analyst Cloud threat detection: How to identify risky activity across control and data planes Collecting Kafka performance metrics Monitoring Kafka with Datadog Monitoring Kafka performance metrics
Tools for collecting metrics and logs from Karpenter
David Lentz · 2026-03-11 · via Datadog | The Monitor blog

In the first two parts of this series, we explored how Karpenter’s architecture enables just-in-time provisioning and active node consolidation, and we identified the key Karpenter metrics you should track to keep your cluster performant and cost-efficient. In this post, we’ll look at vendor-agnostic tools you can use to capture these signals. We’ll show you how to:

  • Audit Karpenter’s current state by using native Kubernetes commands

  • Collect and visualize Karpenter metrics by using Prometheus and Grafana to track provisioning latency and consolidation trends

  • Monitor logs to audit Karpenter’s activity and understand its scheduling and disruption decisions

Before implementing a comprehensive observability pipeline, it can be helpful to use Kubernetes’ built-in tooling to do a quick, real-time check of what Karpenter is doing. These spot checks are especially handy when pods are pending and you’re quickly trying to understand why they haven’t been scheduled. A good first step is to use kubectl to look at the resources Karpenter creates and manages. Karpenter adds (and replaces) cluster capacity by creating NodeClaim Kubernetes objects that represent the compute it wants the cloud provider to provision. The following command can give you a high-level inventory of what Karpenter has created: kubectl get nodeclaims

You’ll see a compact view of recent and active NodeClaims, including the cloud instance type, zone, associated Kubernetes node name (if it has registered), and whether the NodeClaim (and, by association, the node) is ready.

Here’s an example of what that output can look like:

NAME TYPE ZONE NODE READY AGE

default-t5k2p c5.large us-east-1a ip-10-0-12-192.ec2.internal True 12m

default-8g4n1 m5.2xlarge us-east-1b ip-10-0-45-21.ec2.internal True 4m

When you need more than a snapshot—especially if you’re investigating a specific scaling event—kubectl describe can show you the full state of a single NodeClaim. The following command illustrates how to describe a NodeClaim to see its status and events, which are often the most valuable pieces of troubleshooting data.

kubectl describe nodeclaim <nodeclaim-name>

The following sample output shows the detailed history of the NodeClaim named default-t5k2p. The Events section at the bottom is particularly useful for verifying that Karpenter successfully launched the instance and that it registered with the cluster.

Name: default-t5k2p

Labels: karpenter.sh/nodepool=default

karpenter.sh/capacity-type=on-demand

Status:

Conditions:

Type Status

---- ------

Launched True

Registered True

Initialized True

Node Name: ip-10-0-12-192.ec2.internal

Events:

Type Reason Age From Message

---- ------ ---- ---- -------

Normal Launched 12m controller.nodeclaim.lifecycle Launched instance: i-0abcdef1234567890

Normal Registered 11m controller.nodeclaim.lifecycle Registered node: ip-10-0-12-192.ec2.internal

Collect and visualize Karpenter metrics

Karpenter exposes metrics in Prometheus format. To store them for long-term storage and analysis, you can send the metrics to a Prometheus server running in your cluster or to any other compatible backend. In this section, we’ll show you how to use a Prometheus server to scrape and store Karpenter metrics and then visualize them in Grafana to track disruption, batching efficiency, and provisioning latency.

Scrape the Karpenter /metrics endpoint

Karpenter exposes metrics at the /metrics endpoint, which is on port 8080 by default. Note that this is distinct from the health probe port, which defaults to 8081 and serves Kubernetes liveness checks. If you inadvertently configure Karpenter to scrape the health port, you may see a status of 200 OK but no metric values. You can learn more about the distinct roles and behavior of the metrics endpoint versus the health endpoint in the documentation for Karpenter and for Kubebuilder—the framework that Karpenter is built on.

Store Karpenter metrics with a Prometheus server

In Kubernetes, Prometheus typically runs as a dedicated monitoring workload in your cluster. It can automatically discover targets (such as Karpenter’s /metrics endpoint), scrape them on an interval you define (which defaults to 60 seconds), and store the resulting timeseries so you can query and analyze them later.

Prometheus’s built-in timeseries database enables you to retain Karpenter metrics long term so you can visualize, analyze, and alert on them. Karpenter automatically enriches these metrics with labels for attributes like NodePool names, instance types, and capacity types, keeping dashboards and alerts manageable as your environment grows.

A common way to run Prometheus on Kubernetes is via the Prometheus Operator, which enables you to launch and manage Prometheus by using Kubernetes-native objects. With the Operator, you define scrape targets declaratively by using ServiceMonitor and PodMonitor custom resource definitions (CRDs), and the Operator automatically generates and keeps Prometheus’s scrape configuration in sync. The Operator also manages the Prometheus instance life cycle (for example, updates, scaling, and persistence), which makes Prometheus easier to operate over time.

To configure the Prometheus Operator to scrape Karpenter, you can apply a ServiceMonitor like the one shown here. This configuration assumes Karpenter is running in the karpenter namespace and tells Prometheus to scrape the service labeled app.kubernetes.io/name: karpenter:

apiVersion: monitoring.coreos.com/v1

kind: ServiceMonitor

metadata:

name: karpenter-monitor

namespace: monitoring # This varies with your Operator's config

labels:

release: prometheus # This varies with your Operator's config

spec:

namespaceSelector:

matchNames:

- karpenter

selector:

matchLabels:

app.kubernetes.io/name: karpenter

endpoints:

- path: /metrics

port: http-metrics # Matches Karpenter's Service port name

interval: 60s

For more detail on how Prometheus is commonly installed and managed on Kubernetes, see the Prometheus Operator installation guide.

Grafana is a convenient next step once you’re scraping and storing Karpenter metrics. Grafana enables you to visualize your metrics, explore trends by writing custom queries in the PromQL language, and set alerts on the signals you care about. You can get started quickly by using Grafana’s community dashboards. You can then customize them to optimize your visibility, for example, by tracking telemetry data from your environment alongside three critical areas of Karpenter metrics: disruption behavior, batching behavior, and provisioning latency.

  • Disruption behavior: The karpenter_voluntary_disruption_eligible_nodes metric counts the nodes Karpenter considers eligible for voluntary disruption. If this number stays high, Karpenter may be identifying optimization opportunities but getting blocked by constraints like PodDisruptionBudgets (PDBs), which limit how many replicas can be voluntarily evicted at once.

  • Batching behavior: The karpenter_cloudprovider_batcher_batch_size metric illustrates how efficiently Karpenter is interacting with your cloud provider during scaling events. Healthy batching typically means requests are grouped, and small batch sizes can be a sign that scaling activity is fragmented and less efficient.

  • Provisioning latency: Karpenter is known for fast scale-out, and you should see that reflected in karpenter_scheduler_scheduling_duration_seconds, which tracks the duration of Karpenter’s scheduling simulations. A sustained increase here can indicate Karpenter is spending more time evaluating scheduling requirements before it can act. If your pods are pending too long but this metric stays flat, check cloud provider metrics. The metrics karpenter_cloudprovider_duration_seconds and karpenter_cloudprovider_errors_total can help you spot API latency, throttling, or quota-related failures.

You can create Grafana alerts to notify you proactively of any metrics that signal a problem with Karpenter’s performance. If any key metrics trend outside your expected ranges, you’ll get notified early. For example, you might alert on a sustained rise in scheduling latency or on the number of consolidation-eligible nodes staying elevated for an extended period.

Monitor Karpenter logs

Karpenter’s metrics can illustrate its health, but logs can explain Karpenter’s specific decisions that shape the performance of your Kubernetes-based applications. If you need to troubleshoot Karpenter performance problems such as sudden scheduling delays, unexpected node churn, or failed consolidation, logs are often the quickest way to gain the detail necessary to understand what went wrong.

An overview of Karpenter logs

Karpenter emits structured JSON logs that include a log level, a logger name (which identifies the component that produced the entry), and a message describing the event. The logger field is especially useful because it naturally groups logs by category. In practice, you’ll frequently see entries from the provisioner controller and the NodeClaim life cycle controller. For example, when Karpenter identifies pods that it can provision capacity for, it will log an event like this:

{"level":"INFO","time":"2024-06-22T02:24:16.114Z","logger":"controller.provisioner","message":"found provisionable pod(s)","Pods":"default/inflate-...","duration":"10.5ms"}

This line tells you the provisioner controller (controller.provisioner) found unscheduled pods it can handle. This can be a helpful starting point if you’re investigating why pods are pending. Once a provisionable pod is identified, the NodeClaim life cycle controller (controller.nodeclaim.lifecycle) narrates what happens as Karpenter creates and brings up capacity. You’ll typically see a sequence like this:

{"level":"INFO","time":"2024-06-22T02:24:19.028Z","logger":"controller.nodeclaim.lifecycle","message":"launched nodeclaim","NodeClaim":{"name":"default-sfpsl"},"provider-id":"aws:///us-west-2b/i-01234567adb205c7e","instance-type":"c5.2xlarge","zone":"us-west-2b","capacity-type":"spot","allocatable":{"cpu":"8","memory":"16Gi"}}

{"level":"INFO","time":"2024-06-22T02:26:19.028Z","logger":"controller.nodeclaim.lifecycle","message":"registered nodeclaim","NodeClaim":{"name":"default-sfpsl"},"Node":{"name":"ip-10-0-12-34.us-west-2.compute.internal"}}

{"level":"INFO","time":"2024-06-22T02:26:52.642Z","logger":"controller.nodeclaim.lifecycle","message":"initialized nodeclaim","NodeClaim":{"name":"default-sfpsl"},"Node":{"name":"ip-10-0-12-34.us-west-2.compute.internal"}}

The launched nodeclaim message confirms that Karpenter requested capacity and shows details like instance type, zone, and capacity type. The next message—registered nodeclaim—confirms that the node joined the cluster, and the initialized nodeclaim message indicates that the node is ready for use.

Collecting Karpenter logs

You can access Karpenter logs the same way you access any Kubernetes workload logs. Because Karpenter pods may have random suffixes, it’s best practice to use label selectors rather than targeting a specific pod name. The following command tails logs from all pods in the karpenter namespace that are labeled app.kubernetes.io/name=karpenter label:

kubectl logs -n karpenter -l app.kubernetes.io/name=karpenter -f

Streaming Karpenter logs via kubectl makes it easy to gain context around an active incident or validate changes to your NodePools, disruption settings, or workload scheduling behavior. See the Karpenter documentation for detailed information about using logs for troubleshooting.

Get deeper visibility into Karpenter behavior

Karpenter is a powerful tool for optimizing Kubernetes clusters, but maintaining efficiency and availability requires deep visibility into its decision-making process. By collecting metrics and logs, you can help keep Karpenter provisioning nodes rapidly, batching requests efficiently, and respecting your disruption budgets. While Prometheus and Grafana provide a solid foundation for monitoring Karpenter, managing a self-hosted observability stack can become complex at scale. In the next part of this series, we’ll look at how to send these metrics to Datadog for a fully managed view of your cluster’s scaling performance.