logfire-infrastructure
Skill by pydantic
Monitor hosts, Docker containers, Kubernetes clusters, database, queue and cache servers, and cloud metrics with Pydantic Logfire. It needs no application code changes and is set up through the OpenTelemetry Collector.
Install logfire-infrastructure
Built from the published package, never by AI.
git clone --depth 1 https://github.com/pydantic/logfire /tmp/logfire && mkdir -p ~/.claude/skills && cp -r /tmp/logfire/logfire-sdk/logfire/.agents/skills/logfire-infrastructure ~/.claude/skills/logfire-infrastructureRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/pydantic/logfire /tmp/logfire && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/logfire/logfire-sdk/logfire/.agents/skills/logfire-infrastructure ~/.gemini/antigravity-cli/skills/logfire-infrastructureAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install logfire-infrastructure in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
The logfire-infrastructure skill sets up infrastructure monitoring in Pydantic Logfire without changing application code. It uses the OpenTelemetry Collector to send host, Docker, Kubernetes, database, queue, cache, and cloud-provider metrics to Logfire. The skill guides the assistant through detecting what is running, configuring the Collector, validating the config file, and checking that the data arrives.
The skill covers infrastructure only. Application traces, logs, and AI or agent spans belong to the separate logfire-instrumentation skill, and the two can be used together. It is aimed at developers and operators who want to watch their servers, containers, clusters, or cloud resources in Logfire.
Written from the project's SKILL.md and checked against it.
What it can do
- Host monitoringSets up Collector metrics for CPU, memory, disk, network, and load on a host or VM.
- Docker monitoringReads Docker configuration files and configures the Collector for running containers.
- Kubernetes monitoringUses manifests, kubeconfig, or kubectl context to configure cluster metrics.
- Database, queue and cache metricsConfigures receivers for Postgres, MySQL, Redis, MongoDB, Kafka, RabbitMQ, and others.
- Cloud provider metricsConfigures collection of GCP and AWS metrics, including IAM permission caveats.
- Collector config validationValidates the Collector config file before the Collector is started or restarted.
- Data arrival verificationChecks that data for the exact host, container, or cluster reached Logfire after restart.
What you need
- A Pydantic Logfire account and project
- OpenTelemetry Collector (otelcol-contrib or otelcol)
- Docker, if monitoring containers
- Kubernetes access, if monitoring a cluster
- Cloud IAM permissions, for AWS or GCP metrics
Try asking
- Monitor my host and send its CPU and memory metrics to Logfire
- Set up Logfire monitoring for my Docker containers
- Send my Postgres and Redis metrics to Logfire using the Collector
Good to know
- Intended as an advanced, optional tool; app-only tracing can use the SDKs alone.
- Docker setups may need socket permissions adjusted.
- Cloud metrics require the correct IAM permissions.
- Collector config must be validated before restarting; the skill asks for approval on deployment changes.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: logfire-sdk/logfire/.agents/skills/logfire-infrastructure/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md7 KB -
references/collector/host-and-infra-metrics.md15 KB
Alternatives to logfire-infrastructure
All alternatives →Runs the full Next.js deployment test suite for an internal vercel/next.js pull request. It validates the commit's preview package, then dispatches the test_e2e_deploy_release.yml workflow. Meant for maintainers who explicitly ask for the entire suite.
Instruments Python AI applications with DeepEval's native tracing so their execution appears span by span in Confident AI's Observatory. It is for developers building LLM apps, agents, RAG pipelines and chatbots.
Manages Azure Container Registry through the az acr Azure CLI command group. It covers registries, images, cloud builds, ACR Tasks, tokens, geo-replication and networking. Built for developers and operators who work with ACR in Azure.
Opens, runs, and shows apps on a temporary Crabbox machine, including native desktops and web previews. It is for OpenClaw users who want an app running and visible in their chat side panel.
Runs batch and HPC workloads on GKE using job queues and parallel processing. Aimed at teams running batch pipelines, HPC simulations, or ML training jobs on Google Kubernetes Engine.
Answers questions about GKE cluster and workload costs using BigQuery billing exports and live cluster metrics. Built for platform engineers and cloud teams who need to analyze and diagnose GKE spend.
Compare with deploy-release-test, deepeval-tracing or azure-container-registry-cli
logfire-infrastructure: common questions
Does this skill require changes to application code?
No. The source says infrastructure metrics are sent by the OpenTelemetry Collector with no application code changes.
How is the Collector config checked before it runs?
The skill runs otelcol-contrib validate, or otelcol validate for the core distribution, on the config file before starting or restarting the Collector.
How does the skill confirm that metrics reached Logfire?
It queries for the exact host, container, or cluster identifier after a restart, or checks the Hosts, Docker, Kubernetes, or Metrics pages for a recent sample.
How do I install logfire-infrastructure?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is logfire-infrastructure free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is logfire-infrastructure safe to use?
It scores 90 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to logfire-infrastructure?
Similar skills: deploy-release-test, deepeval-tracing, azure-container-registry-cli, crabbox-apps.
