AFD Monitor


If there is more then one AFD operational, it might be very helpful to use afd_mon. This is a program that monitors the status of other AFD's and the opportunity to control everything from one interface: mon_ctrl. The process afd_mon starts for each AFD that it needs to monitor a separate process called mon. This process communicates via TCP/IP with the remote AFD to receive status information from it.

The AFD_MON_CONFIG file

For configuring afd_mon you need to create a configuration file $AFD_WORK_DIR/etc/AFD_MON_CONFIG. The AFD_MON_CONFIG file is divided into two sections, the first section is for configuring values for the afd_mon process itself, while the second part is only for configuring the different AFD's that afd_mon needs to connect to.

The syntax to specify the information for an AFD to be monitored is as follows:

Parameter name Description Example
Alias name An alias name not longer then 12 (MAX_AFDNAME_LENGTH) characters, describing the AFD that is to be monitored. Central-AFD
Hostname This will be the hostname or IP number of the AFD that is to be monitored. ducktown
Port The port number where this AFD can be reached. This allows you to monitor more then one AFD on one host. 4444
Interval The interval at which afd_mon will poll the remote AFD for status information. On slow connections a large value should be taken here so that it does generate big overhead. However, the larger this value is the longer it might take for afd_mon to see any status changes. 5
Connect time With this value it is possible to specify how long we should remain connected to the remote AFD. This value will only be used if the next value is also non zero. If one is zero both will default to zero. Setting this value is only useful connection time is the main cost factor, otherwise it is best to set this and the next value to zero. This value must be set to zero when you want to receive log data from the remote AFD. 30
Disconnect time Determines how long it should remain disconnected before it tries to connect again. This value too must be set to zero when remote log data is to be collected. 600
Options Here it is possible to set some additional options. This option is a 32 bitmask where the following bits are used:
Bit Decimal Meaning
1 1 Compression. For ssh compression is being used for the communication with the remote system. Compression is desirable on modem lines and other slow connections, but will only slow down things on fast networks.
2 2 Instead of just enabling X11 forwarding (-X), enable trusted X11 forwarding (-Y).
3 4 Do not specify full path to rafdd_cmd and rafd_cmd_ssh script.
5 16 System Log Data.
6 32 Receive Log Data.
7 64 Transfer Log Data.
8 128 Transfer Debug Log Data.
9 256 Input Log Data.
10 512 Production Log Data.
11 1024 Output Log Data.
12 2048 Delete Log Data.
15 16384 Event Log Data.
16 32768 Distribution Log Data.
24 8388608 No strict SSH host key check.
The options can be combined by adding the decimal values. To set, for example, both compression and trusted X11 forwarding 3 must be specified.
0
Remote cmd The program used to execute commands on the remote system. Only rsh and ssh are supported. rsh
Convert user name This parameter is optional and can be used to fake another user on the remote host. This is useful when you have one central login on the machine which runs afd_mon, say donald. But the remote host does not have this account, but it has the account daisy, then this option can be used to enable donald to call, say afd_ctrl, under the account of daisy. You may specify up to 5 (MAX_CONVERT_USERNAME) users to be converted each pair must be separated by a space. donald->daisy

So a sample entry in the AFD_MON_CONFIG file might look as follows:

   #
   # Configuration file to monitor remote AFD's
   # ==========================================
   #
   # +--------------------------------------------------> Alias
   # |            +-------------------------------------> Hostname
   # |            |       +-----------------------------> Port
   # |            |       |  +--------------------------> Interval
   # |            |       |  |  +-----------------------> Connect time
   # |            |       |  |  |  +--------------------> Disconnect time
   # |            |       |  |  |  |    +---------------> Options
   # |            |       |  |  |  |    |   +-----------> Remote cmd
   # |            |       |  |  |  |    |   |    +------> Convert user name
   # |            |       |  |  |  |    |   |    |
   Central-AFD ducktown 4444 5 30 600 1024 rsh donald->daisy

NOTE: The syntax of AFD_MON_CONFIG must be correct! The process evaluating this file is still very primitive and easily falls over any syntax errors.

Starting and stopping afd_mon

For afd_mon to function properly you need to either set the environment MON_WORK_DIR or AFD_WORK_DIR. Or you can specify the working directory by starting afd_mon with the -w >path< option. To start afd_mon, use mafd -a and mafd -s to shut it down again.


Copyright © 2000 - 2020 by H.Kiehl
Holger.Kiehl@dwd.de
Last updated: 12.09.2020
[red dot]Index [red dot]Home