[New Feature] Download health monitoring

Discuss newly added features or request new features.
hugbug
Developer & Admin
Posts: 7514
Joined: 09 Sep 2008, 11:58
Location: Germany

[New Feature] Download health monitoring

Post by hugbug » 08 Aug 2013, 21:31

Added download health monitoring (r779):
  • health indicates download status, whether the file is damaged and how much;
  • 100% health means no download errors occurred; 0% means all articles failed;
  • during download the current health of nzb-file is constantly updated;
  • there is also a critical health which is calculated for each nzb-file based on number and size of par-files;
  • if during download the health goes down below 100% a health badge appears near download name indicating the necessity of par-repair;
  • the indicator is orange first but may become red if the health goes down below critical health;
  • downloads with health less than critical health cannot be repaired;
  • new option "HealthCheck" to define what to do with unhealthy (unrepairable) downloads (pause, delete, none);
  • health and critical health are displayed in download-edit-dialog;
  • health is displayed in history dialog;
  • if download was aborted (HealthCheck=delete) this is indicated in history dialog;
  • health allows to determine download status for downloads which have unpack and/or par-check disabled;
  • for such downloads the status in history is shown based on health: success (health=100%), damaged (health > critical) or failure (health < critical);
  • par-check is now automatically started for downloads having health below 100%; this works independently of unpack (even if unpack is disabled);
  • for downloads having health less than critical health no par-check is performed (it would fail); Instead the par-check status is set to "failure" automatically saving time of actual par-check;
  • BTW, downloads manually deleted from queue are shown with status "deleted" in the history (instead of "unknown");
  • new fields "Health" and "CriticalHealth" are returned by RPC-Method "listgroups";
  • new fields "Health", "CriticalHealth", "Deleted" and "HealthDeleted" are returned by RPC-Method "history";
  • new parameters "NZBPP_HEALTH" and "NZBPP_CRITICALHEALTH" are passed to pp-scripts.

prinz2311
Posts: 464
Joined: 08 Dec 2012, 00:03

Re: [New Feature] Download health monitoring

Post by prinz2311 » 08 Aug 2013, 21:36

Compile Error:

Code: Select all

NZBFile.cpp: In member function 'void NZBFile::ProcessFilenames()':
NZBFile.cpp:378:56: error: 'tolower' was not declared in this scope
I had to add:

Code: Select all

#include <ctype.h>

hugbug
Developer & Admin
Posts: 7514
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [New Feature] Download health monitoring

Post by hugbug » 08 Aug 2013, 21:48

Previously each time you reported such error I could reproduce an issue on my linux machine but not this time, strange.

Added missing include anyway.

Good thing you know how to fix this ;)

naan
Posts: 17
Joined: 11 Jun 2013, 14:21

Re: [New Feature] Download health monitoring

Post by naan » 09 Aug 2013, 19:41

Nice feature ! This is not in a "testing-release state" yet ?

prinz2311
Posts: 464
Joined: 08 Dec 2012, 00:03

Re: [New Feature] Download health monitoring

Post by prinz2311 » 09 Aug 2013, 23:22

For existing Download Entries (from old nzbget versions) the critical Health isn't calculated.

Code: Select all

Health (current/critical)	100% / 100%
I don't know if this is just a cosmetic "bug" or if for these old entries the Feature doesn't work correctly if the Download is damaged....

hugbug
Developer & Admin
Posts: 7514
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [New Feature] Download health monitoring

Post by hugbug » 10 Aug 2013, 08:39

Critical health is calculated when a file is added to queue. For older files it is not available and this indeed can be a problem. Since these files have critical health 100% any failed article would cause nzbget to think that download is unrepairable. And if HealthCheck is set to Delete, it will be deleted.

I'll fix this by forcing recalculation of critical health when an older queue is loaded from disk.

hugbug
Developer & Admin
Posts: 7514
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [New Feature] Download health monitoring

Post by hugbug » 10 Aug 2013, 20:03

Fixed in r784.

prinz2311
Posts: 464
Joined: 08 Dec 2012, 00:03

Re: [New Feature] Download health monitoring

Post by prinz2311 » 11 Aug 2013, 12:42

A few thoughts about this:

1. Is critical health calculated after duplicated are removed?
2. What happens if a user removes files (par2) or adds (merges) from/to a collection?
3. What happens when a user splits a collection? (I tested it with splitting all par2 out, didn't change the critical health)
4. What about nzb's that have multiple collections in them? Example a complete Season, but Episodes as individual sets(files/pars)?

hugbug
Developer & Admin
Posts: 7514
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [New Feature] Download health monitoring

Post by hugbug » 11 Aug 2013, 13:01

prinz2311 wrote:Is critical health calculated after duplicated are removed?
Yes.
What happens if a user removes files (par2) or adds (merges) from/to a collection?
Critical health must be recalculated.
What happens when a user splits a collection? (I tested it with splitting all par2 out, didn't change the critical health)
Critical health must be recalculated.
I've just tested split, then merge. All was OK. Were you testing with r785?
What about nzb's that have multiple collections in them? Example a complete Season, but Episodes as individual sets(files/pars)?
There is no special par set handling. This may cause collection to be treated as non repairable even if some episodes would be repairable. Anyway even previous versions did not handle this and the collection was marked as failure.

prinz2311
Posts: 464
Joined: 08 Dec 2012, 00:03

Re: [New Feature] Download health monitoring

Post by prinz2311 » 11 Aug 2013, 13:08

hugbug wrote:
What happens when a user splits a collection? (I tested it with splitting all par2 out, didn't change the critical health)
Critical health must be recalculated.
I've just tested split, then merge. All was OK. Were you testing with r785?
Yes r785, but after split the old collection has critical health not changed. Since i splited all par2 in a new collection the old collection should have a critial health of 100% but still has the old value.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests