question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[disk] Blacklist certain partitions by default

See original GitHub issue

Continuation of https://github.com/DataDog/datadog-agent/issues/1961 Advanced filtering logic introduced in https://github.com/DataDog/integrations-core/pull/2483

Adding new things to blacklist by default will be a breaking change and will likely require a major Agent release. As such, let’s take the time to compile everything that should be excluded by default.

So far we have:

It should also be noted that since blacklists take precedence over whitelists, ~users would need to update both to re-enable something. Therefore, reducing the occurrence of that should be a goal.~ Implemented a better way: https://github.com/DataDog/integrations-core/pull/7648

cc @DataDog/agent-integrations @DataDog/agent-core @DataDog/container-integrations

cc original participants @techdragon @amineo @coreypobrien @sudermanjr @steinnes @j-vizcaino @nerdinand

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:9
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
sandstromcommented, Apr 4, 2019

I was bitten by this recently. Mine looked something like this:

udev             1977284       0   1977284   0% /dev
tmpfs             397864     744    397120   1% /run
/dev/nvme0n1p1  24329532 7438244  16874904  31% /
tmpfs            1989304       0   1989304   0% /dev/shm
tmpfs               5120       0      5120   0% /run/lock
tmpfs            1989304       0   1989304   0% /sys/fs/cgroup
/dev/loop5         16896   16896         0 100% /snap/amazon-ssm-agent/784
/dev/loop2         18432   18432         0 100% /snap/amazon-ssm-agent/930
…

And the end-result in Datadog was that the value system.disk.in_use would be the average of several devices (some are already filtered by the Datadog agent per default, but not all of them). Since some were at 0%, it would deflate the actual value, so our trigger at 80% usage wouldn’t fire even though the main disk was at ~99% and the system crashed.

For a tool such as DataDog, I don’t think I’m alone in assuming that a monitor with something like warn if disk.in_use > 80 would “do the right thing” out of the box.

Just wanted to share this example.

4reactions
zippolytecommented, Oct 31, 2018

As a user, this behaviour seems a bit awkward: could we make it blacklist first, then whitelist entries after that? That would allow us to blacklist every FS by default, then “punch holes” by whitelisting a small set of FS that provide meaningful stats.

Well if you want just a specific set of FS, you just need to whitelist them, and only the whitelisted ones will be considered, no need to explicitly blacklist the ones you don’t want. The precedence of the blacklist over the whitelist only applies when there is an intersection between whitelisted elements, and blacklisted ones. In this case then the elements that match both the whitelist and the blacklist will be blacklisted. Does that make sense ?

This is the way we have implemented blacklist/whitelist in other integrations as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Partitioning block devices - Linux Filesystems 101 - CodinGame
Type n and press Enter. This will create a new partition. You will be prompted for several pieces of information (partition type, number,...
Read more >
ioctl problem with partition - Unix & Linux Stack Exchange
There is a path to the file, I make a write disk cache request via ioctl - ioctl(fd, SG_IO, &ioHdr) . printk: sending...
Read more >
Partitioning Disks with parted
With GPT, you get up to 128 partitions by default and can choose to have many more. •. Reliability: Only one copy of...
Read more >
Partitioning - ArchWiki - Arch Linux
Primary partitions can be bootable and are limited to four partitions per disk or RAID volume. If the MBR partition table requires more...
Read more >
How To Partition and Format Storage Devices in Linux
Preparing a new disk for use on a Linux system can be quick and easy. ... Formatting the partition with the Ext4 filesystem...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found