Re: [Bacula-users] Backup report script...

2024-02-06 Thread Bill Arlofski via Bacula-users
Just re-sending this (without the screenshot) to the list because I got a "Your message to Bacula-users awaits moderator 
approval"email reply when I sent it on the 3rd.



On 2/2/24 09:03, Marco Gaiarin wrote:

Mandi! Bill Arlofski via Bacula-users
   In chel di` si favelave...


I might be able to add this as a feature to my `baculabackupreport.py` Python 
reporting script - possibly quite easily.
The script already has a feature to show jobs that are "always failing" for x 
number of days. This feature you are asking for
is interesting.


I've tested it, cool!


Excellent!  Glad it is working/useful for you. :)


OK, so here's the thing. What I have just completed is a feature that (if it finds anything to report) generates another 
small auxiliary table at the bottom of the jobs report, like the Summary, Pools, Success rates tables.


It currently works like this:

- It internally generates a list of the last time every job name in the catalog 
has r
un successfully.
- Then it checks to see which of these last successful runs was more than 31 
days ago (default setting)
- Then it generates an HTML table listing each Job Id, Job Name, End Time, and 
number of days ago that End Time was.
- It can also be told to skip any Job Names you add the the 
`last_good_run_skip_lst` variable.
- I plan to add one more thing before pushing the changes. Namely I want to add another banner at the top when these jobs are 
found and the table is created. This should just take a few minutes of cut-n-paste-n-edit and should be pushed tonight. :)


See the screenshot of the new auxiliary table.


The new variables at the top of the script (which should not be edited, but 
added/modified in the config file) are these:
8<
# Warn about jobs that have been seen in the catalog, but
# have not had a successful run in `last_good_run_days` days
# --
warn_on_last_good_run = True   
  # Do we warn about jobs that have not run successfully in last_good_run_days days?

last_good_run_days = 31   # Longest amount of days a job can be 
missed from running successfully
last_good_run_skip_lst = ['Job1', 'Job2'] # Jobs to ignore when processing this 
`warn_on_last_good_run` feature
8<


 > Effectively the 'always failing' could suffices, but knowing that failed
 > because the host was not reachable will be better!

Now, there is really no way to represent the reason a job failed into the table as you ask without a few additional pieces in 
place.


- First, there would need to be some specific, clear, always identifiable text 
in the catalog's `Log` table
- Next it would require yet another "costly" text query, and I had tried for the longest time to avoid these as much as 
possible. :)

- Third, the text to report a reason why a job failed just wouldn't fit in the 
HTML table cell and would make a giant mess.

I think the new banner w
arning, and this table will let you know quickly which jobs have not completed is some (configurable) 
number of days. And,  when configured to create an HTML link (gui = True) to the Job log in Baculum, (or BWeb in the 
enterprise version) it will get you to the reason for the continued failures very quickly.




I've been looking for something to work on for a while now. This might be 
perfect. :)


Don't worry: stay warm, drink water and code slowly! ;-)


hehe  Yes, it took a FULL week to be able to function properly since I 
returned, and to get something done on this. :)

Hope this is useful!


Best regards,
Bill

--
Bill Arlofski
w...@protonmail.com



signature.asc
Description: OpenPGP digital signature
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Backup report script...

2024-02-03 Thread Marco Gaiarin
Mandi! Bill Arlofski via Bacula-users
  In chel di` si favelave...

> I might be able to add this as a feature to my `baculabackupreport.py` Python 
> reporting script - possibly quite easily.
> The script already has a feature to show jobs that are "always failing" for x 
> number of days. This feature you are asking for 
> is interesting.

I've tested it, cool!

Efectively the 'always failing' could suffices, but knowing that failed
because the host was not reachable will be better!


> I've been looking for something to work on for a while now. This might be 
> perfect. :)

Don't worry: stay warm, drink water and code slowly! ;-)

-- 
  Solo una sana e consapevole libidine
  salva il giovane dagli SCOUT e dall'Azione Cattolica!
(Zucchero, circa O;-)




___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Backup report script...

2024-01-29 Thread Bill Arlofski via Bacula-users

On 1/29/24 08:44, Marco Gaiarin wrote:


In my Bacula installatin i've many backup types; for some, more ''solid'',
the bacula messages resources is perfect.


But i use bacula also for some more less solid backup: client backup (mostly
windows, mostly medical devices) that are not ''always on''.
So bacula message resources get 'sanitize' andnclient send little or no
feedback on backup.


Still i need some report, at least know that 'client X is out of network by
a month' or something like this.


I've found that a command like:

  *list jobs client=fvg-sv-eeg-fd type=B
  Using Catalog "BaculaLNF"
  
+++-+--+---+--++---+
  | jobid  | name   | starttime   | type | level | jobfiles | 
jobbytes   | jobstatus |
  
+++-+--+---+--++---+
  | 15,486 | FVG-S

V-EEG | 2024-01-05 14:01:12 | B| I |0 |  0 | A  
   |

  | 15,635 | FVG-SV-EEG | 2024-01-09 16:00:51 | B| I |0 |   
   0 | A |
  | 15,677 | FVG-SV-EEG | 2024-01-10 15:31:10 | B| I |0 |   
   0 | A |
  | 15,719 | FVG-SV-EEG | 2024-01-11 12:31:06 | B| I |   34 |  
2,349,575,229 | T |
  | 15,761 | FVG-SV-EEG | 2024-01-12 11:00:32 | B| I |   43 |  
1,813,375,650 | T |
  | 15,868 | FVG-SV-EEG | 2024-01-15 12:30:58 | B| F |   14,030 | 
64,277,646,705 | T |
  | 15,913 | FVG-SV-EEG | 2024-01-16 08:30:03 | B| I |0 |   
   0 | A |
  | 15,961 | FVG-SV-EEG | 2024-01-17 08:30:03 | B| I |0 |   
   0 | A |
  | 16,010 | FVG-SV-EEG | 2024-01-18 08:30:02 | B| I |0 |   
   0 | A |
  | 16,056 | FVG-SV-EEG | 2024-01-19 12:30:47 | B| I |  

58 |  5,740,439,597 | T |

  | 16,172 | FVG-SV-EEG | 2024-01-22 12:31:04 | B| F |   14,079 | 
72,084,456,031 | T |
  | 16,218 | FVG-SV-EEG | 2024-01-23 16:01:05 | B| I |0 |   
   0 | A |
  | 16,264 | FVG-SV-EEG | 2024-01-24 10:30:28 | B| I |0 |   
   0 | A |
  | 16,310 | FVG-SV-EEG | 2024-01-25 08:30:03 | B| I |0 |   
   0 | A |
  | 16,357 | FVG-SV-EEG | 2024-01-26 13:02:49 | B| I |   62 |  
6,935,959,574 | T |
  | 16,473 | FVG-SV-EEG | 2024-01-29 12:31:25 | B| F |0 |   
   0 | A |
  
+++-+--+---+--++---+

i can get a report of jobs and do some statistics with a script.


Before starting to code something... there's just a 'report script'
somewhere?! ;-)


Thanks.



Hello Marco,

I might b
e able to add this as a feature to my `baculabackupreport.py` Python reporting 
script - possibly quite easily.

The script already has a feature to show jobs that are "always failing" for x number of days. This feature you are asking for 
is interesting.


I'd need a little time to think about it since I just returned from a Company trip in Morocco and am still fighting whatever 
cold/flu I got while traveling. :)


I've been looking for something to work on for a while now. This might be 
perfect. :)


Best regards,
Bill

--
Bill Arlofski
w...@protonmail.com



signature.asc
Description: OpenPGP digital signature
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Backup report script...

2024-01-29 Thread Marco Gaiarin


In my Bacula installatin i've many backup types; for some, more ''solid'',
the bacula messages resources is perfect.


But i use bacula also for some more less solid backup: client backup (mostly
windows, mostly medical devices) that are not ''always on''.
So bacula message resources get 'sanitize' andnclient send little or no
feedback on backup.


Still i need some report, at least know that 'client X is out of network by
a month' or something like this.


I've found that a command like:

 *list jobs client=fvg-sv-eeg-fd type=B
 Using Catalog "BaculaLNF"
 
+++-+--+---+--++---+
 | jobid  | name   | starttime   | type | level | jobfiles | 
jobbytes   | jobstatus |
 
+++-+--+---+--++---+
 | 15,486 | FVG-SV-EEG | 2024-01-05 14:01:12 | B| I |0 |
  0 | A |
 | 15,635 | FVG-SV-EEG | 2024-01-09 16:00:51 | B| I |0 |
  0 | A |
 | 15,677 | FVG-SV-EEG | 2024-01-10 15:31:10 | B| I |0 |
  0 | A |
 | 15,719 | FVG-SV-EEG | 2024-01-11 12:31:06 | B| I |   34 |  
2,349,575,229 | T |
 | 15,761 | FVG-SV-EEG | 2024-01-12 11:00:32 | B| I |   43 |  
1,813,375,650 | T |
 | 15,868 | FVG-SV-EEG | 2024-01-15 12:30:58 | B| F |   14,030 | 
64,277,646,705 | T |
 | 15,913 | FVG-SV-EEG | 2024-01-16 08:30:03 | B| I |0 |
  0 | A |
 | 15,961 | FVG-SV-EEG | 2024-01-17 08:30:03 | B| I |0 |
  0 | A |
 | 16,010 | FVG-SV-EEG | 2024-01-18 08:30:02 | B| I |0 |
  0 | A |
 | 16,056 | FVG-SV-EEG | 2024-01-19 12:30:47 | B| I |   58 |  
5,740,439,597 | T |
 | 16,172 | FVG-SV-EEG | 2024-01-22 12:31:04 | B| F |   14,079 | 
72,084,456,031 | T |
 | 16,218 | FVG-SV-EEG | 2024-01-23 16:01:05 | B| I |0 |
  0 | A |
 | 16,264 | FVG-SV-EEG | 2024-01-24 10:30:28 | B| I |0 |
  0 | A |
 | 16,310 | FVG-SV-EEG | 2024-01-25 08:30:03 | B| I |0 |
  0 | A |
 | 16,357 | FVG-SV-EEG | 2024-01-26 13:02:49 | B| I |   62 |  
6,935,959,574 | T |
 | 16,473 | FVG-SV-EEG | 2024-01-29 12:31:25 | B| F |0 |
  0 | A |
 
+++-+--+---+--++---+

i can get a report of jobs and do some statistics with a script.


Before starting to code something... there's just a 'report script'
somewhere?! ;-)


Thanks.

-- 
  ...coraggio liberisti, buttate giu' le carte
  tanto ci sara` sempre chi paghera` le spese
  in questo benedetto assurdo bel paese.(F. Guccini)




___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users