[PR #159] [MERGED] Update linux_disk_usage.sh #165

Closed
opened 2026-03-02 02:10:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amidaware/community-scripts/pull/159
Author: @SpookOz
Created: 6/7/2023
Status: Merged
Merged: 6/14/2023
Merged by: @silversword411

Base: mainHead: main


📝 Commits (9)

  • 6759f6d Update linux_disk_usage.sh
  • 5d9bcf7 Create linux_check_services.sh
  • 98b959b Create linux_check_processes
  • 12cb0a2 Create linux_load_average.sh
  • 358618a Create linux_docker_run_commands.sh
  • d573472 Create linux_memory_check.sh
  • 7375e3d Rename linux_docker_run_commands.sh to liscripts_wip/nux_docker_run_commands.sh
  • 365ec07 Rename linux_load_average.sh to scripts_wip/linux_load_average.sh
  • b2f3f26 Rename nux_docker_run_commands.sh to linux_docker_run_commands.sh

📊 Changes

6 files changed (+219 additions, -17 deletions)

View changed files

scripts_wip/linux_check_processes (+20 -0)
scripts_wip/linux_check_services.sh (+31 -0)
📝 scripts_wip/linux_disk_usage.sh (+33 -17)
scripts_wip/linux_docker_run_commands.sh (+22 -0)
scripts_wip/linux_load_average.sh (+51 -0)
scripts_wip/linux_memory_check.sh (+62 -0)

📄 Description

This is a cool script! I just made a few changes that I think may improve it:

  1. Added a $WARNINGVALUE (which can be lower than the $ERRORVALUE. If the disk is only at warning stage, it will exit with error code 2 instead of 1. In TRMM, you can set code 2 to be a warning (in automation) so you have time to fix the issue before it gets critical.

  2. Added the option to change the warning and error value with ENV VARs so you don't need to change the code if they don't suit you, or you can customise it for different servers.

  3. Rather than incrementing, I just set $ERROROUTCODE and $WARNINGOUTCODE to 1. I figure as long as there is at least one disk, it doesn't matter how many - it will still give an error or warning.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amidaware/community-scripts/pull/159 **Author:** [@SpookOz](https://github.com/SpookOz) **Created:** 6/7/2023 **Status:** ✅ Merged **Merged:** 6/14/2023 **Merged by:** [@silversword411](https://github.com/silversword411) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (9) - [`6759f6d`](https://github.com/amidaware/community-scripts/commit/6759f6d75a255a61ea5b0b571410a2490ee6180c) Update linux_disk_usage.sh - [`5d9bcf7`](https://github.com/amidaware/community-scripts/commit/5d9bcf7d02ff80c56a8545b845ac260be1363d89) Create linux_check_services.sh - [`98b959b`](https://github.com/amidaware/community-scripts/commit/98b959bb518bcdb014d66311d89f41c77a82c6b5) Create linux_check_processes - [`12cb0a2`](https://github.com/amidaware/community-scripts/commit/12cb0a278a124edbbed1e8f5863cb531ac521e8a) Create linux_load_average.sh - [`358618a`](https://github.com/amidaware/community-scripts/commit/358618a3829ea1074d01bf4fa1e4d2a5ae0d766f) Create linux_docker_run_commands.sh - [`d573472`](https://github.com/amidaware/community-scripts/commit/d5734722fa27775a8269b962baa690c5a22be1db) Create linux_memory_check.sh - [`7375e3d`](https://github.com/amidaware/community-scripts/commit/7375e3d2d757c90a504173f289e0717fac44117d) Rename linux_docker_run_commands.sh to liscripts_wip/nux_docker_run_commands.sh - [`365ec07`](https://github.com/amidaware/community-scripts/commit/365ec07e308463745ce626876a413f974b088264) Rename linux_load_average.sh to scripts_wip/linux_load_average.sh - [`b2f3f26`](https://github.com/amidaware/community-scripts/commit/b2f3f26c0fe97231094896ff5b80dd3f665f874d) Rename nux_docker_run_commands.sh to linux_docker_run_commands.sh ### 📊 Changes **6 files changed** (+219 additions, -17 deletions) <details> <summary>View changed files</summary> ➕ `scripts_wip/linux_check_processes` (+20 -0) ➕ `scripts_wip/linux_check_services.sh` (+31 -0) 📝 `scripts_wip/linux_disk_usage.sh` (+33 -17) ➕ `scripts_wip/linux_docker_run_commands.sh` (+22 -0) ➕ `scripts_wip/linux_load_average.sh` (+51 -0) ➕ `scripts_wip/linux_memory_check.sh` (+62 -0) </details> ### 📄 Description This is a cool script! I just made a few changes that I think may improve it: 1. Added a $WARNINGVALUE (which can be lower than the $ERRORVALUE. If the disk is only at warning stage, it will exit with error code 2 instead of 1. In TRMM, you can set code 2 to be a warning (in automation) so you have time to fix the issue before it gets critical. 2. Added the option to change the warning and error value with ENV VARs so you don't need to change the code if they don't suit you, or you can customise it for different servers. 3. Rather than incrementing, I just set $ERROROUTCODE and $WARNINGOUTCODE to 1. I figure as long as there is at least one disk, it doesn't matter how many - it will still give an error or warning. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 02:10:48 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/community-scripts#165
No description provided.