Hi, 07.11.2007 23:10,, Eric Böse-Wolf wrote:: > Hello Arno, > >> There will be some reason why your tapealert command output isn't >> matched by grep. You'll ony see what happens behind the scenes if you >> try the tapealert command Bacula runs and look at the output, not >> piped through grep. > > This is a misunderstanding or maybe I didn't tell you. I did what > you suggested. Here it is without tape in drive: > > Product Type: Tape Drive > Vendor ID: 'SEAGATE ' > Product ID: 'DAT DAT72-052' > Revision: 'A060' > Attached Changer: No > SerialNumber: xxxx # you don't need to know this. > MinBlock:1 > MaxBlock:16777215 > SCSI ID: 0 > SCSI LUN: 0 > Ready: no
Ok, so the command itself works as it should. > Here it is with tape in drive: > ... > So no 'TapeAlert' line present at the moment, but the drive is capable > of TapeAlert, as I read TapeAlert: -stuff- need cleaning -stuff- a few > days ago. Good. > So it is possible to have no 'TapeAlert' in tapeinfo output. I was just > wondering that nobody else had similar problems. That might be because everybody else uses the sample config, which includes a pipe through cat :-) > To solve this I wrote a script that executes the command, gives > the desired output and exits with 0 if grep exits with 0 or 1 and > it exits with 1 if grep exits with 2. Another possibility... using the Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" line as in the sample configuration should work, too ;-) > Actually my Subject line is not precise. Well, now I understand your problem, at least... Arno > Your sincerely, > > Eric > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > -- Arno Lehmann IT-Service Lehmann www.its-lehmann.de ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users