- Timestamp:
- Feb 21, 2008, 10:55:14 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bnchelp.html
r696 r697 411 411 <p><a name="advscript"><h4>3.8.4 Advisory Script - optional </h4></p> 412 412 <p> 413 As mentioned previously, BNC can trigger a shell script or a batch file to be executed when one of the events described are reported. This script can be used to email an advisory note to network operator or stream providers. To enable this feature, specify the full path to the script or batch file in the 'Script' field. The affected mountpoint and type of event reported ('Begin_Outage', 'End_Outage', 'Begin_Corrupted' or 'End_Corrupted') will then be passed on to the script as command line parameters (\%1 and \%2 on Windows systems or \$1 and \$2 on Unix/Linux systems). 414 </p> 415 <p> 416 Leave this field empty if you do not wish to use this option. An invalid path will also disable this option. 417 </p> 418 <p> 413 As mentioned previously, BNC can trigger a shell script or a batch file to be executed when one of the events described are reported. This script can be used to email an advisory note to network operator or stream providers. To enable this feature, specify the full path to the script or batch file in the 'Script' field. The affected mountpoint and type of event reported ('Begin_Outage', 'End_Outage', 'Begin_Corrupted' or 'End_Corrupted') will then be passed on to the script as command line parameters (%1 and %2 on Windows systems or $1 and $2 on Unix/Linux systems) together with date and time information. 414 </p> 415 <p> 416 Leave the 'Script' field empty if you do not wish to use this option. An invalid path will also disable this option. 417 </p> 418 <p> 419 Examples for command line parameter strings passed on to the advisory 'Script' are: 420 <pre> 421 FFMJ0 Begin_Outage 21-02-08 09:25:59 422 FFMJ0 End_Outage 21-02-08 11:36:02 Begin was 21-02-08 09:25:59 423 </pre> 419 424 Sample script for Unix/Linux systems: 420 </p>421 425 <pre> 422 426 #!/bin/bash … … 429 433 ! 430 434 </pre> 435 </p> 431 436 <p> 432 437 Note the sleep command in this script which causes the system to wait for a random period of up to 60 seconds before sending the email. This should avoids overloading your mail server in case of a simultaneous failure of many streams.
Note:
See TracChangeset
for help on using the changeset viewer.