AFD actions


In $AFD_WORK_DIR/etc/action it is possible to define what AFD should do when for example some remote host is not reachable. It is possible to then execute some script or binary program. There are five possible actions, each have their own subdiretory in $AFD_WORK_DIR/etc/action, defined as follows:

Directory Description
$AFD_WORK_DIR/etc/action/source/info When info time for the given directory alias has been reached, the script/program with the directory alias as filename will be executed with the parameter 'start'. When the warn situation is no longer valid the script/program is called again with the parameter 'stop'.
$AFD_WORK_DIR/etc/action/source/warn When warn time for the given directory alias has been reached, the script/program with the directory alias as filename will be executed with the parameter 'start'. When the warn situation is no longer valid the script/program is called again with the parameter 'stop'. In addition there will be warnings in the log.
$AFD_WORK_DIR/etc/action/source/error If the source directory is not accessible a script/program with the directory alias as filename will be executed with the parameter 'start'. As soon as the directory is accessible again, the script/program is called again with the parameter 'stop'.
$AFD_WORK_DIR/etc/action/target/success If a script/program with the host alias as filename exists and is executable, this will be executed each time a file is send to this target.
$AFD_WORK_DIR/etc/action/target/info When warn time seconds have elapsed with no data being send to this host, the script/program in $AFD_WORK_DIR/etc/action/target/info/ with the host alias as filename will be executed with the parameter 'start'. As soon as data has been send successful the script/program is called again with the parameter 'stop'.
$AFD_WORK_DIR/etc/action/target/warn When warn time seconds have elapsed with no data being send to this host, the script/program in $AFD_WORK_DIR/etc/action/target/warn/ with the host alias as filename will be executed with the parameter 'start'. As soon as data has been send successful the script/program is called again with the parameter 'stop'. In addition there will be warnings in the log.
$AFD_WORK_DIR/etc/action/target/error If the error counter for a given host has reached max errors (edit_hc), then the script/program with the host alias as filename will be executed with the parameter As soon as the error counter is below max errors the script/program is called again with the parameter 'stop'.

Instead of having a action file for each source/target it is also possible to put into the directory a script/program with the name 'all.default'. Then the action will be done for all source/target entities. It is also possible to use both method, then if a separate script/program s found, this will be taken and not 'all.default'. If the 'all.default' script/program is called, it is always called with the alias name (of the host or directory ) as a second parameter.


Copyright © 2008 - 2012 by H.Kiehl
Holger.Kiehl@dwd.de
Last updated: 03.06.2012
[red dot]Index [red dot]Home