feat: Add memory temperature checks

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2022-05-14 01:29:54 +02:00
parent 16c0f33b9e
commit 4943442135
No known key found for this signature in database
GPG key ID: FF42D23B580C89F7
2 changed files with 14 additions and 6 deletions

View file

@ -14,7 +14,3 @@ repos:
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort

View file

@ -5,8 +5,15 @@ import logging
import sys
import requests
from nagiosplugin import (Check, Context, Metric, Performance, Resource,
ScalarContext, Summary)
from nagiosplugin import (
Check,
Context,
Metric,
Performance,
Resource,
ScalarContext,
Summary,
)
from nagiosplugin.state import Critical, Ok, Unknown, Warn
logger = logging.getLogger(__name__)
@ -289,6 +296,11 @@ def main():
warning=args.temperature_warning,
critical=args.temperature_critical,
),
ScalarContext(
"memory_temperature",
warning=args.memory_temperature_warning,
critical=args.memory_temperature_critical,
),
TrexSummary(),
)
check.main()