User Hooks |
![]() ![]() ![]() |
User hooks, implemented as a lua-scripts, are meant for automation of the administrator work enabling quicker performance of certain tasks of Dr.Web Server.
To configure user hooks execution 1.Select the Administration item in the main menu of the Control Center. 2.In the opened window, select the User hooks item in the control menu. User hooks settings window will be opened. Hooks Tree Hooks hierarchical list displays the tree view, nodes of which are hook groups and user hooks included into them. Initially, hooks tree contains the following pre-installed groups: •Examples of the hooks—contains templates of all available user hooks. On the base of these templates you can create your own user hooks. You cannot edit or execute the hook templates. •IBM Syslog—contains templates of user hooks used in integration with IBM Tivoli system. Events corresponding to the enabled hooks, are written in the Syslog format. All events are written into one file on the following path: ▫for Windows OS: ▫for FreeBSD OS: ▫for Linux OS: •IBM W7Log—contains templates of user hooks used in integration with IBM Tivoli system. Events corresponding to the enabled hooks, are written in the IBM W7Log XML format. For each event, the separate file is created on the following path: ▫for Windows OS: ▫for FreeBSD OS: ▫for Linux OS: The icon of the tree element depends on the type and status of this element (see table below). Icons of elements in the hooks tree
Hooks Tree Managing To manage objects in the hooks tree, use the following elements of the toolbar:
Hooks Groups Managing To create a new group 1.On the toolbar, select 2.In the opened window, specify the following parameters: •Set the Enable hook execution flag to activate hooks which will be included into this group. See also Hooks activating. •In the Group name field, specify an arbitrary name for the creating group. 3.Click Save. To change the order of groups using 1.In the hooks tree, drag and drop the hooks group and place it in the necessary order relative to the other groups. 2.The order of hooks usage is automatically changed after changing groups order: the first will be performed the hooks from the groups that are placed higher in the hooks tree. To move a hook to the other group 1.In the hooks tree, select a hook you want to move. 2.On the opened properties pane, in the Parent group drop-down list, select the group into which you want to move the hook. 3.Click Save. Hooks Managing To create a new hook 1.On the toolbar, select 2.In the opened window, specify the following parameters: •Set the Enable hook execution flag to activate the creating hook. See also Hooks activating. •In the Parent group drop-down list, select the group into which you want to place the creating hook. Further, you can move the hook into other group—see above. •In the Hook drop-down list, select the hook type. The hook type defines an action for which the hook will be called. •In the Hook text field, enter the lua script which will be executed when the hook called. 3.Click Save. To edit a hook 1.In the hooks tree, select a hook you want to edit. 2.In the right part of the window, the properties pane for this procedure automatically opens. You can edit all parameters which are specified on creating the hook except the Hook parameter. This parameter defines an action for which the hook will be called, and cannot be edited after the hook has been created. 3.Click Save. Activation of hooks and hooks groups defines whether the hooks will be executed on corresponding event or not. To activate a hook or a group of hooks 1.In the hooks tree, select a hook or a hooks group you want to activate. 2.Perform one of the following actions: •On the toolbar, click •In the right part of the window on the properties pane of the selected object, set the Enable hook execution flag if it is cleared. Click Save. Hooks activation features To execute a hook on corresponding event, the following is necessary: a)the hook itself must be activated; b)the group that contains the hook must be activated.
|