Skip to content

Commit 2d568a8

Browse files
committed
Lib: Adding load average logic
1 parent 2030c57 commit 2d568a8

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

config-example.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
"welcome_message_for_public_infos_tasks": "🤖 Linux Monitoring bot started 🤖\nI'll inform you periodically about the Linux server public status."
3737
},
3838
"basic_config": {
39+
"critical_load_average_percent": 90.0,
40+
"warning_load_average_percent": 80.0,
3941
"critical_cpu_percent": 90.0,
4042
"warning_cpu_percent": 80.0,
4143
"critical_ram_percent": 90.0,

discordbotlinuxmonitor/discordbotlinuxmonitor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ async def usage(self, interaction: discord.Interaction) -> None:
446446

447447
if is_private:
448448
out_msg += "\n"
449+
out_msg += self.monitoring.check_load_average(display_only_if_critical=False) + "\n"
449450
out_msg += self.monitoring.check_cpu_usage(display_only_if_critical=False) + "\n"
450451
out_msg += self.monitoring.check_ram_usage(display_only_if_critical=False) + "\n"
451452
out_msg += self.monitoring.check_swap_usage(display_only_if_critical=False) + "\n"

0 commit comments

Comments
 (0)