Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aditional Disks not shown in disk array (VirtIO) #43

Open
Flexusma opened this issue Jan 29, 2025 · 2 comments
Open

Aditional Disks not shown in disk array (VirtIO) #43

Flexusma opened this issue Jan 29, 2025 · 2 comments
Labels
bug Something isn't working platform:linux Linux Platforms
Milestone

Comments

@Flexusma
Copy link

Flexusma commented Jan 29, 2025

Hi,
we recently started using checkmate to monitor some of our infrastructure (vms using virtIO Block disks).

We have a node with the following disk configuration (df-h):

root@xxx:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        27G  2.8G   24G  11% /
/dev/vda16      881M  112M  708M  14% /boot
/dev/vda15      105M  6.1M   99M   6% /boot/efi
/dev/vdb         49G   44K   47G   1% /data

the metrics endpoint is returning the following disk data:

    "disk": [
      {
        "device": "/dev/vda1",
        "total_bytes": 28523593728,
        "free_bytes": 25510543360,
        "usage_percent": 0.1051
      }
    ],

Is there currently a way to set the disks to monitor? Or a way to get all physical disks (sdx/vdx)?

We are interested in monitoring the 2nd disk (vdb) instead of vda (or both disks if possible).
I'm not that familiar with go, but if this is not currently implemented, I'd try and implement it myself

@mertssmnoglu mertssmnoglu added this to the v1.1 milestone Jan 30, 2025
@mertssmnoglu mertssmnoglu added bug Something isn't working platform:linux Linux Platforms labels Jan 31, 2025
@mertssmnoglu
Copy link
Member

Hello @Flexusma
Thank you for mentioning this. Since virtual machines can be very diverse, cases like this may be difficult to identify. Since we have applied 2 different filters to the partitions, you may have encountered this problem.

Second custom filter can cover the first one, so we can disable the first filter and this will solve your problem.

// Set all flag to "false" to get only necessary partitions
// Avoiding unnecessary partitions like /run/user/1000, /run/credentials
partitions, partErr := disk.Partitions(false)

if slices.Contains(checkedSlice, p.Device) || !strings.HasPrefix(p.Device, "/dev") || strings.HasPrefix(p.Device, "/dev/loop") {
continue
}

If you have a chance to build and test the Capture locally, can you tell us if there is still a problem after the changes.

@mertssmnoglu
Copy link
Member

Hi @Flexusma

Capture v1.0.1 has been released and contains a fix for your issue.
If you still can't see all your virtual disks, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform:linux Linux Platforms
Projects
None yet
Development

No branches or pull requests

2 participants