feat: Add memory temperature checks
Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
16c0f33b9e
commit
4943442135
2 changed files with 14 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue