ServerAlert.py - server volume alert

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
Post Reply
hugbug
Developer & Admin
Posts: 6746
Joined: 09 Sep 2008, 11:58
Location: Germany (NRW)

ServerAlert.py - server volume alert

Post by hugbug » 12 Apr 2017, 18:45

This script monitors downloaded volumes per news server and when it reaches a certain mark (configurable for each server) the script performs an alert action, which can be any or a combination of:
  • send an E-mail;
  • deactivate that news server;
  • pause downloading.
The script requires at least nzbget v19.0-r1940.
ServerAlert.py
ServerAlert v1.0
(12.08 KiB) Downloaded 24 times
How to use:
  • download the script and put it into ScriptDir;
  • reload NZBGet;
  • choose script in option Extensions;
  • select section NEWS SERVERS on settings page;
  • for each news server you want to monitor by the script click on button "Volume Statistics";
    Volume-Buttons.png
    Volume button
  • look at the info field "Custom: xx GB" at the right bottom corner of the dialog;
    Downloaded volumes.png
    Downloaded volumes
  • that is the custom volume counter monitored by the script, you can reset it to "0" if you want;
  • now put the maximum volume allowed for the server in option "ServerX.Notes" in a special format, recognised by the script, which is a number of gigabytes in square braces, for example: ServerX.Notes=[150];
    Server notes.png
    ServerX.Notes
  • save nzbget settings and reload nzbget;
  • the script starts automatically on nzbget start and keeps executing in background controlling the server volumes;
  • on startup the script prints info messages for each server it monitors;
    Monitoring message.png
    Monitoring message
  • if the downloaded volume for custom counter reaches the defined limit the script issues an alert as defined in its options (pause downloading, deactivate news server or send e-mail);
    Alert messages.png
    Alert messages
  • after an alert the script stops monitoring of this news server. It will be monitored again on nzbget restart.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest