SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
How to get notified about non-fatal errors
Author Message
Post How to get notified about non-fatal errors 
Hi

Looking through the docs and searching the mailing list, I haven't found
a solution to my problem yet:

A windows backup job is terminating normally, sometimes with a non-fatal
error:

Error: Read error on file d:/Backup/backup_201112190102.bak. ERR=Nicht
gen\374gend Systemressourcen, um den angeforderten Dienst auszuf\374hren

(FYI: I haven't found the cause for this yet, but it doesn't really
matter with regard to Bacula, see below)

I get a notification mail about this job because of a Messages resource:

mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\"
-s \"Bacula: %t %e of %n %l\" %r"

The problem is that the subject line for this says:

Bacula: Backup OK of reha11-dbbak-job Full

Buried in the body of the mail there is the error mentioned above and in
the summary:

Non-fatal FD errors: 2
SD Errors: 0
FD termination status: OK
SD termination status: OK
Termination: Backup OK -- with warnings

How do I get this termination code (or some other form of warning) in
the subject line of the mail? Or how do I get the job to fail? I need
the file from the non-fatal error be backuped or at least be loudly
warned if it isn't fully backuped...

Thanks


Mario

------------------------------------------------------------------------------
Learn Windows Azure Live! Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for
developers. It will provide a great way to learn Windows Azure and what it
provides. You can attend the event by watching it streamed LIVE online.
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Post How to get notified about non-fatal errors 
Hi

Looking through the docs and searching the mailing list, I haven't
found a solution to my problem yet:

A windows backup job is terminating normally, sometimes with a
non-fatal error:

Error: Read error on file d:/Backup/backup_201112190102.bak.
ERR=Nicht gen\374gend Systemressourcen, um den angeforderten Dienst
auszuf\374hren

(FYI: I haven't found the cause for this yet, but it doesn't really
matter with regard to Bacula, see below)

I get a notification mail about this job because of a Messages
resource:

mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\)
%r\" -s \"Bacula: %t %e of %n %l\" %r"

The problem is that the subject line for this says:

Bacula: Backup OK of reha11-dbbak-job Full

Buried in the body of the mail there is the error mentioned above and
in the summary:

Non-fatal FD errors: 2
SD Errors: 0
FD termination status: OK
SD termination status: OK
Termination: Backup OK -- with warnings

How do I get this termination code (or some other form of warning) in
the subject line of the mail? Or how do I get the job to fail? I need
the file from the non-fatal error be backuped or at least be loudly
warned if it isn't fully backuped...

Thanks


Mario

------------------------------------------------------------------------------
Learn Windows Azure Live! Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for
developers. It will provide a great way to learn Windows Azure and
what it provides. You can attend the event by watching it streamed
LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Hi,

I had the same problem but with mysqldump. The Backup was always OK but
the dump was not. I tried different approaches but in the end I wrote a
small script which greps the log file.

For example
grep $jobid /var/log/bacula/log | grep -i> 'error:'> /tmp/$jobid.log
and then an email if there are errors.

The script is executed as "Command after job" on the server.

Would be nice to have the possibility to alter the subject of the
status mail depending on the result of a script. That way it would be
easier to catch such errors with bweb, webacula, or just by filtering
the mails from the bacula server.

Greetings,

Oliver













------------------------------------------------------------------------------
Learn Windows Azure Live! Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for
developers. It will provide a great way to learn Windows Azure and what it
provides. You can attend the event by watching it streamed LIVE online.
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Post How to get notified about non-fatal errors 
On Monday 19 December 2011 12:01:59 Mario Moder wrote:
Hi

Looking through the docs and searching the mailing list, I haven't found
a solution to my problem yet:

A windows backup job is terminating normally, sometimes with a non-fatal
error:

Error: Read error on file d:/Backup/backup_201112190102.bak. ERR=Nicht
gen\374gend Systemressourcen, um den angeforderten Dienst auszuf\374hren

(FYI: I haven't found the cause for this yet, but it doesn't really
matter with regard to Bacula, see below)

I get a notification mail about this job because of a Messages resource:

mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\"
-s \"Bacula: %t %e of %n %l\" %r"

The problem is that the subject line for this says:

Bacula: Backup OK of reha11-dbbak-job Full

Buried in the body of the mail there is the error mentioned above and in
the summary:

Non-fatal FD errors: 2
SD Errors: 0
FD termination status: OK
SD termination status: OK
Termination: Backup OK -- with warnings

How do I get this termination code (or some other form of warning) in
the subject line of the mail? Or how do I get the job to fail? I need
the file from the non-fatal error be backuped or at least be loudly
warned if it isn't fully backuped...


Hi Mario,

I use Procmail for this myself, it works perfectly, only mailing me relevant messages. Bacula sends the messages to bacula < at > localhost then forward any error/warning messages. I am
using Postfix as a mail server.

- Configure the bacula messages

/etc/bacula/bacula-dir.conf

...
Messages {
Name = Standard
console = all, !skipped, !saved
append = "/var/log/bacula/bacula.log" = all, !skipped
mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"
mail = bacula < at > localhost = all
catalog = all
}
...

- Create a .forward for the bacula user

/var/lib/bacula/.forward

...
"|exec /usr/bin/procmail -t"
...

- Create a .procmailrc for the bacula user

/var/lib/bacula/.procmailrc

...
SHELL=/bin/sh
DEFAULT=/dev/null/
LOGFILE=/var/log/bacula/procmail.log
MAILDIR=/dev/null/
##LOGABSTRACT=all
VERBOSE=on
:0 B
* ! ^ Termination: Backup OK$
! bacula < at > example.com
:0
/dev/null
...

--
Machiel.

------------------------------------------------------------------------------
Learn Windows Azure Live! Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for
developers. It will provide a great way to learn Windows Azure and what it
provides. You can attend the event by watching it streamed LIVE online.
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Post How to get notified about non-fatal errors 
Am 19.12.2011 15:10, schrieb Oliver Hoffmann:

I had the same problem but with mysqldump. The Backup was always OK but
the dump was not. I tried different approaches but in the end I wrote a
small script which greps the log file.

For example
grep $jobid /var/log/bacula/log | grep -i> 'error:'> /tmp/$jobid.log
and then an email if there are errors.

The script is executed as "Command after job" on the server.

Hi Oliver

Thanks a lot, I didn't realize that you can also run a command on the
server after (or before) the job (I only used the Client Run etc.
scripts until now).

Would be nice to have the possibility to alter the subject of the
status mail depending on the result of a script. That way it would be
easier to catch such errors with bweb, webacula, or just by filtering
the mails from the bacula server.

Reading through the docs I found that there is also a %e substitution in
the RunScript resource, which seems to be more fine-grained than the one
in the Messages resource.

But I also think that this belongs somehow into the Messages resource
(Warnings into the subject), do you know of a feature request for that
already on the list?


Mario


------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Post How to get notified about non-fatal errors 
Am 19.12.2011 15:33, schrieb Machiel van Veen:


I use Procmail for this myself, it works perfectly, only mailing me relevant messages. Bacula sends the messages to bacula < at > localhost then forward any error/warning messages. I am
using Postfix as a mail server.


Hi Machiel

Thank you very much! Procmail... Nice solution.

Although I wrote in another mail to Oliver that I think that
warnings/non-fatal errors should be "configureable" in the messages
resource, your solution solves another problem for me:

Have all mail-logs in a mailbox on the backup server (for reference) and
send mail to my daily mailbox only in some situations. Works totally
independent from Bacula Wink

I somehow feel the power of modularity again!


Mario


------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB