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 item in the main menu of the Control Center. 2.In the opened window, select the 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: •—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. •—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: •—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: —drop-down list for adding an element to the hooks tree: —add a new user hook. —add a new user group for placing hooks in it. —remove user hook or hooks group which is selected in the hook tree. —the same action is performed in the hooks editor if you set the flag. See also Hooks activating. —the same action is performed in the hooks editor if you clear the flag. See also Hooks activating. Hooks Groups Managing To create a new group 1.On the toolbar, select → . 2.In the opened window, specify the following parameters: •Set the flag to activate hooks which will be included into this group. See also Hooks activating. •In the field, specify an arbitrary name for the creating group. 3.Click . 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 drop-down list, select the group into which you want to move the hook. 3.Click . Hooks Managing To create a new hook 1.On the toolbar, select → . 2.In the opened window, specify the following parameters: •Set the Enable flag to activate the creating hook. See also Hooks activating. •In the 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 drop-down list, select the hook type. The hook type defines an action for which the hook will be called. •In the field, enter the Lua script which will be executed when the hook called. 3.Click . 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 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 . 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 flag if it is cleared. Click . 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.
|