Updoot secure system monitor with service management #3

Closed
hax wants to merge 0 commits from hax/lainmonitor:dev into dev
Contributor

Key Improvements:

Error Handling:
Used try-except blocks to catch errors from subprocesses and file operations, logging issues.

Thread Safety:
Introduced queue.Queue for thread-safe operations when handling ping results.

Subprocess Optimizations:
Used subprocess.run() for cleaner, more modern handling of subprocesses.
Avoided shell=True for security reasons unless absolutely necessary.

Service Management:
Improved service status checking by using systemctl is-active and using exit statuses for reliability.

User Authorization:
Checked user authorization in relevant commands like /restart, /reboot, and /ping.

Logging:
Introduced logging for all major operations to track activity and errors.

Polling Timeout:
Added timeouts and error handling to prevent the bot from hanging during long polling.

This updoot is bring more security, robustness, and scalability, ready to handle various edge cases that might occur in our system monitoring.

Signed-off-by: hax hax@lainlounge.xyz

Key Improvements: Error Handling: Used try-except blocks to catch errors from subprocesses and file operations, logging issues. Thread Safety: Introduced queue.Queue for thread-safe operations when handling ping results. Subprocess Optimizations: Used subprocess.run() for cleaner, more modern handling of subprocesses. Avoided shell=True for security reasons unless absolutely necessary. Service Management: Improved service status checking by using systemctl is-active and using exit statuses for reliability. User Authorization: Checked user authorization in relevant commands like /restart, /reboot, and /ping. Logging: Introduced logging for all major operations to track activity and errors. Polling Timeout: Added timeouts and error handling to prevent the bot from hanging during long polling. This updoot is bring more security, robustness, and scalability, ready to handle various edge cases that might occur in our system monitoring. Signed-off-by: hax <hax@lainlounge.xyz>
hax added 1 commit 2024-10-25 00:45:14 +00:00
Key Improvements:

Error Handling:
Used try-except blocks to catch errors from subprocesses and file operations, logging issues.

Thread Safety:
Introduced queue.Queue for thread-safe operations when handling ping results.

Subprocess Optimizations:
Used subprocess.run() for cleaner, more modern handling of subprocesses.
Avoided shell=True for security reasons unless absolutely necessary.

Service Management:
Improved service status checking by using systemctl is-active and using exit statuses for reliability.

User Authorization:
Checked user authorization in relevant commands like /restart, /reboot, and /ping.

Logging:
Introduced logging for all major operations to track activity and errors.

Polling Timeout:
Added timeouts and error handling to prevent the bot from hanging during long polling.

This updoot is bring more security, robustness, and scalability, ready to handle various edge cases that might occur in our system monitoring.

Signed-off-by: hax <hax@lainlounge.xyz>
hax changed title from Updoot secure system monitor with service management to WIP: Updoot secure system monitor with service management 2024-10-25 00:45:42 +00:00
requested review from hornet 2024-10-25 00:45:48 +00:00
hax changed title from WIP: Updoot secure system monitor with service management to Updoot secure system monitor with service management 2024-10-25 00:47:17 +00:00
hornet approved these changes 2024-10-25 13:07:56 +00:00
Dismissed
hornet approved these changes 2024-10-25 13:16:16 +00:00
Owner

merged, closing(how tf this works lmao)

merged, closing(how tf this works lmao)
hornet closed this pull request 2024-10-25 13:21:23 +00:00
hax reopened this pull request 2024-10-25 14:53:34 +00:00
hax closed this pull request 2025-01-01 13:10:26 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
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: hornet/lainmonitor#3
No description provided.