mirror of
https://github.com/acedanger/shell.git
synced 2025-12-06 05:40:11 -08:00
Add monitoring dashboard for Plex backup system
- Created a new script `monitor-plex-backup.sh` for real-time status and health monitoring of the Plex backup system. - Implemented features to check system status, backup status, performance metrics, recent activity, scheduling status, and health recommendations. - Added command line options for watch mode and refresh interval. - Enhanced logging with color-coded output for better visibility. Update recent additions script to include more metadata - Modified `plex-recent-additions.sh` to retrieve additional metadata fields such as year and library section type from the Plex database. - Improved SQL query to join with library_sections for better context on added items. Introduce comprehensive test suite for Plex backup system - Added `test-plex-backup.sh` to provide automated testing for all backup-related functionality. - Implemented unit tests for JSON log initialization, performance tracking, notification system, checksum caching, backup verification, and more. - Included setup and cleanup functions for a mock test environment. - Added performance benchmarks for checksum calculation and compression. - Generated detailed test reports in JSON format for better tracking of test results.
This commit is contained in:
@@ -14,10 +14,16 @@ sqlite3 "$PLEX_DB" <<EOF
|
||||
.headers on
|
||||
.mode column
|
||||
SELECT
|
||||
datetime(added_at, 'unixepoch', 'localtime') AS "Added On",
|
||||
title AS "Title",
|
||||
(SELECT name FROM library_sections WHERE library_sections.id = library_section_id) AS "Library"
|
||||
FROM metadata_items
|
||||
WHERE added_at >= strftime('%s', 'now', '-7 days')
|
||||
ORDER BY added_at DESC;
|
||||
datetime(meta.added_at, 'unixepoch', 'localtime') AS "added_at"
|
||||
, meta.title
|
||||
, meta.year
|
||||
, lib.section_type AS "library_section_type"
|
||||
, lib.name as "library_name"
|
||||
FROM
|
||||
metadata_items meta
|
||||
left join library_sections lib on meta.library_section_id = lib.id
|
||||
WHERE
|
||||
meta.added_at >= strftime('%s', 'now', '-7 days')
|
||||
|
||||
ORDER BY meta.added_at DESC;
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user