Skip to content

Proxmox ve plugin additions #785

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

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
085f41c
Added improvements for proxmox_ve plugin
fdriessler Feb 4, 2025
358c1bd
Changed Results Samples, Changed Uptime Results to follow CheckMK def…
fdriessler Feb 4, 2025
364fabc
Removed unnecessary Imports
fdriessler Feb 4, 2025
0831bdf
Sort Imports Alphabetically
fdriessler Feb 4, 2025
4b30de9
Sort Imports Alphabetically
fdriessler Feb 4, 2025
82dab9c
Fix Import Formatting
fdriessler Feb 4, 2025
8aea36b
Fix Import Formatting
fdriessler Feb 4, 2025
a26116d
Fix Code Format, Change Unit of Levels: MB/s -> MiB/s for disk/networ…
fdriessler Feb 4, 2025
b5924fe
Fix Code Format
fdriessler Feb 4, 2025
4cd57fa
Fix Code Format
fdriessler Feb 4, 2025
7911cc0
Fix Code Format, Added missing Comma
fdriessler Feb 4, 2025
31e952f
Fix type assignment error
fdriessler Feb 4, 2025
b48d76f
Fixed duplicate Metric/Graph Name assignments
fdriessler Feb 4, 2025
3c3311d
Removed 3 Unit Tests that were impossible due requirement of value st…
fdriessler Feb 4, 2025
3e9b6b3
Compress 3 Results to follow formatting rules
fdriessler Feb 4, 2025
5bbc4df
Removed Unit Test for vm_info, as non-static Results were added.
fdriessler Feb 5, 2025
c9045f1
Removed Optional_keys entry in proxmox_ve_cpu_util_params, as a requi…
fdriessler Feb 6, 2025
d25aa53
Merge branch 'Checkmk:master' into proxmox-ve-extension
fdriessler Apr 25, 2025
d2fca62
change(proxmox_ve): Updated rulespec API for the plugin
fdriessler Apr 25, 2025
a857875
fix(proxmox_ve): Fix ruff linting errors
fdriessler Apr 25, 2025
657ccb9
fix(proxmox_ve): Fix ruff formating errors
fdriessler Apr 25, 2025
d20ff71
fix(proxmox_ve): Fix Typing errors
fdriessler Apr 25, 2025
02e6bf3
fix(proxmox_ve): Tuple -> tuple
fdriessler Apr 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

48 changes: 0 additions & 48 deletions cmk/gui/plugins/wato/check_parameters/proxmox_ve_snapshot_age.py

This file was deleted.

This file was deleted.

44 changes: 0 additions & 44 deletions cmk/gui/plugins/wato/check_parameters/proxmox_ve_vm_info_params.py

This file was deleted.

30 changes: 18 additions & 12 deletions cmk/plugins/proxmox_ve/agent_based/proxmox_ve_backup_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import json
from collections.abc import Mapping
from datetime import datetime, UTC
from typing import Any, TypedDict
from typing import Any, cast, TypedDict

from cmk.agent_based.v1 import check_levels as check_levels_v1
from cmk.agent_based.v2 import (
Expand Down Expand Up @@ -100,7 +100,7 @@ def check_proxmox_ve_vm_backup_status(
levels and define result status accordingly
>>> for result in check_proxmox_ve_vm_backup_status(
... datetime.strptime("2020-12-07 21:28:02+01:00", '%Y-%m-%d %H:%M:%S%z'),
... {'age_levels_upper': (93600, 180000)},
... {'age_levels_upper': (93600.0, 180000.0)},
... parse_proxmox_ve_vm_backup_status([[
... ' {"last_backup": {'
... ' "started_time": "2020-12-06 21:28:02+0000",'
Expand All @@ -121,17 +121,23 @@ def check_proxmox_ve_vm_backup_status(
Result(state=<State.OK: 0>, summary='Bandwidth: 91.6 MB/s')
Metric('backup_avgspeed', 91625968.975, boundaries=(0.0, None))
"""
age_levels_upper = params.get("age_levels_upper")
duration_levels_upper = params.get("duration_levels_upper")
bandwidth_levels_lower_bytes = params.get("bandwidth_levels_lower")
bandwidth_levels_lower = (
(
bandwidth_levels_lower_bytes[0] * 1000 * 1000,
bandwidth_levels_lower_bytes[1] * 1000 * 1000,
)
if bandwidth_levels_lower_bytes
else None

age_levels_upper = (
int(cast(tuple, params.get("age_levels_upper"))[0]),
int(cast(tuple, params.get("age_levels_upper"))[1]),
)
duration_levels_upper = None
if params.get("duration_levels_upper") is not None:
duration_levels_upper = (
int(cast(tuple, params.get("duration_levels_upper"))[0]),
int(cast(tuple, params.get("duration_levels_upper"))[1]),
)
bandwidth_levels_lower = None
if params.get("bandwidth_levels_lower") is not None:
bandwidth_levels_lower = (
cast(tuple, params.get("bandwidth_levels_lower"))[0] * 1000 * 1000,
cast(tuple, params.get("bandwidth_levels_lower"))[1] * 1000 * 1000,
)
last_backup = section.get("last_backup")
if not last_backup:
yield (
Expand Down
Loading