Skip to content
Snippets Groups Projects
Commit 2583eea2 authored by student's avatar student
Browse files

add warning from glances

parent aaef3433
No related branches found
No related tags found
No related merge requests found
Pipeline #115305 failed
...@@ -44,6 +44,7 @@ disable=False ...@@ -44,6 +44,7 @@ disable=False
user_careful=50 user_careful=50
user_warning=70 user_warning=70
user_critical=90 user_critical=90
user_critical_action=warning.sh
#user_log=False #user_log=False
system_careful=50 system_careful=50
system_warning=70 system_warning=70
......
from datetime import datetime
# current date and time
now = datetime.now()
timestamp = datetime.timestamp(now)
f = open("warning.txt", "a")
f.write(str(timestamp) + ": Warning user cpu usage over 90%\n")
#!/bin/bash
python3 warning.py
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment