mirror of
https://github.com/amidaware/community-scripts.git
synced 2026-04-28 07:25:49 +03:00
[PR #159] [MERGED] Update linux_disk_usage.sh #474
Labels
No labels
enhancement
good first issue
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/community-scripts#474
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
main← Head:main📝 Commits (9)
6759f6dUpdate linux_disk_usage.sh5d9bcf7Create linux_check_services.sh98b959bCreate linux_check_processes12cb0a2Create linux_load_average.sh358618aCreate linux_docker_run_commands.shd573472Create linux_memory_check.sh7375e3dRename linux_docker_run_commands.sh to liscripts_wip/nux_docker_run_commands.sh365ec07Rename linux_load_average.sh to scripts_wip/linux_load_average.shb2f3f26Rename 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:
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.
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.
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.