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

推荐订阅源

G
Google Developers Blog
阮一峰的网络日志
阮一峰的网络日志
A
About on SuperTechFans
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
V
Visual Studio Blog
Martin Fowler
Martin Fowler
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 叶小钗
I
InfoQ
B
Blog RSS Feed
aimingoo的专栏
aimingoo的专栏
Y
Y Combinator Blog
Blog — PlanetScale
Blog — PlanetScale
IT之家
IT之家
P
Proofpoint News Feed
WordPress大学
WordPress大学
小众软件
小众软件
B
Blog
MongoDB | Blog
MongoDB | Blog
人人都是产品经理
人人都是产品经理
量子位
Hugging Face - Blog
Hugging Face - Blog
月光博客
月光博客

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
Inspeqtor Process Monitoring with Datadog
2014-12-18 · via Datadog | The Monitor blog

Mike Perham @mperham is the CEO of Contributed Systems and runs his own blog, mikeperham.com.

A year ago, I had a serious problem. I was the Director of Engineering at an eCommerce company running a Ruby on Rails website. Our Rails app was quite stable except for one part: our background worker processes kept increasing in memory over the course of a day from 300MB up to many gigabytes. Eventually this would cause our machines to run out of memory and we’d have to restart the service manually to regain that memory.

Of course we were monitoring everything with Datadog. We could see the memory increasing and we could receive an email alert about the problem, but we couldn’t automate the restart. Inspeqtor to the rescue!

Inspeqtor process monitoring

Inspeqtor is Linux-based software which monitors your critical application infrastructure on the local machine: processes like MySQL or PostgreSQL, Memcached, Redis, Java VM processes, custom daemons, etc. You define simple rules, and Inspeqtor will verify proper behavior and take action if a rule is broken.

To get started with Inspeqtor, first install it on each machine:

# For Ubuntu 12.04 and 14.04 LTS

curl -L https://bit.ly/InspeqtorDEB | sudo bash

sudo apt-get install inspeqtor

and then write rules about your services running on that machine:

check service background_worker

if memory:rss > 1g then restart, alert

if cpu:user > 95% for 4 cycles then alert

Here, you can see I’m using Inspeqtor to automate the restart of our background worker service. Inspeqtor will scan the worker process every 15 seconds. If it is using more than one GB of memory, Inspeqtor will immediately restart it. I’ve also added a rule to alert me if the process uses an entire CPU for 4 cycles (or 60 seconds).

It seems too simple to work, right? The trick is that Inspeqtor queries any installed init systems — upstart, systemd, runit or init.d — to find a service with that name and any associated processes so it can collect metrics.

Inspeqtor process monitoring

Inspeqtor is open source and free; I also offer Inspeqtor Pro with more features, including Statsd integration. With just a single line of code, you can send all metrics collected by Inspeqtor Pro to the Datadog Agent for visualization:

set statsd_location localhost:8125

Within seconds your data should appear in the Datadog system. Here you can see Inspeqtor Pro collecting the total memory used by the Apache 2.x service on my website:

Inspeqtor process monitoring

Using Inspeqtor Pro and Datadog together works great in my experience. Datadog provides a rich, flexible UI for seeing historical data and finding problems while Inspeqtor allows you to take action to solve those problems with rules that are incredibly easy to write. Take a look through Inspeqtor’s documentation or the Getting Started screencast if you want to learn more.