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
|
rev: 22.3.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
- repo: https://github.com/pycqa/isort
|
|
||||||
rev: 5.10.1
|
|
||||||
hooks:
|
|
||||||
- id: isort
|
|
||||||
|
|
|
@ -5,8 +5,15 @@ import logging
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from nagiosplugin import (Check, Context, Metric, Performance, Resource,
|
from nagiosplugin import (
|
||||||
ScalarContext, Summary)
|
Check,
|
||||||
|
Context,
|
||||||
|
Metric,
|
||||||
|
Performance,
|
||||||
|
Resource,
|
||||||
|
ScalarContext,
|
||||||
|
Summary,
|
||||||
|
)
|
||||||
from nagiosplugin.state import Critical, Ok, Unknown, Warn
|
from nagiosplugin.state import Critical, Ok, Unknown, Warn
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -289,6 +296,11 @@ def main():
|
||||||
warning=args.temperature_warning,
|
warning=args.temperature_warning,
|
||||||
critical=args.temperature_critical,
|
critical=args.temperature_critical,
|
||||||
),
|
),
|
||||||
|
ScalarContext(
|
||||||
|
"memory_temperature",
|
||||||
|
warning=args.memory_temperature_warning,
|
||||||
|
critical=args.memory_temperature_critical,
|
||||||
|
),
|
||||||
TrexSummary(),
|
TrexSummary(),
|
||||||
)
|
)
|
||||||
check.main()
|
check.main()
|
||||||
|
|
Loading…
Reference in a new issue