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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

Datadog | The Monitor blog

How to audit and clean up monitors effectively How we made a SQL query optimization agent 59% more accurate using autoresearch and LLM Observability Reduce CVE noise with OpenVEX assessments in Datadog Diagnose slow PostgreSQL queries faster with explain plan correlation Explore Datadog metrics with Natural Language Queries Attribute AI costs across providers with Datadog Cloud Cost Management Simplify micro-frontend observability with Datadog RUM Toto 2.0: Time series forecasting enters the scaling era Diagnose and resolve database performance issues faster with Database Investigator Datadog for Government achieves FedRAMP® High certification Analyze cloud costs with flexible spreadsheets in Datadog Sheets Inside Datadog’s AI Research Lab: Meet two PhD candidates behind Toto Connect triage and investigation in a single workflow with Datadog Cloud SIEM This Month in Datadog - April 2026 Monitor and optimize Supabase query performance with Datadog Database Monitoring Add dynamically updating context to logs with Reference Tables and Observability Pipelines Introducing ARFBench: A time series question-answering benchmark based on real incidents Test network paths with TCP, UDP, and ICMP in Datadog The product signal latency gap slowing your growth How to investigate cloud credential compromise with Bits AI Security Analyst Evaluate, optimize, and secure your Google Cloud AI stack with Datadog Turn developer feedback into operational insight with Datadog Forms and Sheets Identify and fix code issues faster with Datadog’s Azure DevOps Source Code integration Steganography at scale: Embedding share URLs in Datadog widget screenshots Bringing observability data hosting to the UK on AWS Centralize observability management with Datadog Governance Console Every team should be A/B testing Manage service tracing across hosts with Single Step Instrumentation rules Route OTel data from AI apps to ClickHouse and Datadog using Observability Pipelines Spotting CI/CD misconfigurations before the bots do: Securing GitHub Actions with Datadog IaC Security Detect runtime threats in Python Lambda functions with Datadog AAP Offline evaluation for AI agents: Best practices 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 How we built a real-world evaluation platform for autonomous SRE agents at scale 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 When upserts don't update but still write: Debugging Postgres performance at scale 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 Closing the verification loop: Observability-driven harnesses for building with agents Closing the verification loop, Part 2: Fully autonomous optimization When an AI agent came knocking: Catching malicious contributions in Datadog’s open source repos 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 Designing MCP tools for agents: Lessons from building Datadog's MCP server 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 Fine-tune Toto for turbocharged forecasts 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 How we reduced the size of our Agent Go binaries by up to 77% 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
Tools for collecting metrics and logs from Karpenter
2026-03-11 · via Datadog | The Monitor blog
David Lentz

David Lentz

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:

Use Kubernetes-native tools to spot-check Karpenter status

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.