• No results found

Registering a user-defined log file command

In document BMC ProactiveNet (Page 161-165)

Follow the procedure given below to register a log file command.

To register a user-defined log file command

1 In the Administration Console, select Tools => Diagnostics Wizard => Log File ■ This launches the Create Log File Search Diagnostics window. Available

commands, if any, will be listed on this window. Button Options

Add: Click this to add a new command.

Edit: Click this to modify a previously registered command. —Delete: Click this to remove the command from the system. —Cancel: Click this to exit the Diagnostics Wizard.

2 Click Add. The Add Command window appears.

a In the Name field, enter a unique name for the search and click Add. The Add Log File Search window is displayed.

b Log File - select the file to be searched. ■ Alternatively,

For input = '*', the system reads the most recent file.

For input = '<prefix> + *', the system retrieves all files with names containing <prefix>

For input = '* + <suffix>', the system retrieves all files with names containing <suffix>

c Match on Regular Expression - This pattern is used to sort and retrieve lines from the specified file.

However,

For input = '*', the system retrieves all lines from the file. In this case, advanced filters will not be available.

For input = '<valid pattern>', the system sequentially parses the file content and retrieves matches. Additional filters available in the Advanced section can be applied for more specific search.

d Negative Pattern Match - This acts as an additional sort filter for displaying output.

e Match Case Sensitivity - Select this to enable case-sensitivity for the search. Select this to make the search case-sensitive.

Advanced - The filters below work in tandem to further refine the search.

f Show +/- - The number of lines before and after the match to be considered for output. This value is restricted to a maximum of 1500.

g Limit search to the last “X” lines of the file - This limits the search to the specified number of lines in the file. This value is restricted to a maximum of 50,000.

h Limit output to “X” matches - This limits the search output to the specified maximum. This value is restricted to a maximum of 50,000.

Note

For optimum system performance and output accuracy, enter values

judiciously in the Advanced section. Very large values may result in the action getting timed out (Timeout is set to 5 mins), and the displayed result may not be complete (the system truncates output to 100,000 characters).

i Click Apply. This displays the Add Command window again.

3 Select Configuration Diagnostic option to qualify this Detailed Diagnostic command to be run with every configuration poll of select system monitors (AIX, HPUX, Linux, Solaris, Windows, and X86).

4 In the Timeout field, specify the duration (between 5 and 55 minutes) the system must wait before timing out this command.

5 Choose the agents on which the log files will be searched.

a Select Use Agent on which monitor is running option.

b Alternatively, select a predefined Agent from the list.

6 Click Next.

7 On the window that is displayed, select device types. Use this window to attach the command under a 'Device Type'.

■ Move the device types from the left panel to the right. ■ The left list contains all available Device Types.

■ The right list contains all selected Device Types under which you want to attach this command.

Click >> to move a selected monitor from the left list to the right.Click << to move a selected monitor from the right list to left list.Select All to select all items in the left list.

Select None to not attach any specific monitory type.

8 Click Next.

9 Select Monitor Types.

■ Move the monitor types from the left to the right panel. ■ The left list contains all available Monitor Types.

■ The right list contains all selected Monitor Types under which you want to attach this command.

Click >> to move a selected monitor from the left list to the right.Click << to move a selected monitor from the right list to the left.Select All to select all items in the left list.

Select None to not attach any specific monitory type.

10 Click Next.

■ Select the User Group as specified in the previous screens. Note

The access permissions that are set while defining the User groups takes precedence, that is, if the user group is defined with “All Diagnostics” in the Diagnostics tab, then the newly created diagnostics will be available to those user groups irrespective of whether they are selected/non-selected in the Add to User Group screen in the Add Command module of the Diagnostics wizard.

11 Click Finish.

■ This registers the commands with BMC ProactiveNet Server and opens a 'Test” window if the command type is 'Command'.

12 Test the Command on the Test Your Command window.

■ From the Source Agent list, select the 'Agent' on which you want to test the command.

■ Use Target IP to execute the command on given target IP. If the required Target IP is not available in the drop down list, select Edit Target IP from the list which displays editable Target IP text fields as shown in the Administration Console. This is applicable only if $ip is one of the parameters.

Click Test to invoke a test.

■ The output is displayed in the Output section of the window and the status is displayed at the bottom. Click Ok to close the window and display a list of commands that have been registered. These diagnostic commands will now be available from the Operations Console tools menu, but ONLY to users who have access control privileges to execute commands.

13 Check Event Summary tables.

■ Verify that the command is available on the Tools menu from the Device Matrix, Service Matrix, and All Events tables. If it is present, then the new command is available for use.

Note

From the Service Matrix table you need to drill down to the Show Monitor level to access the Tools menu.

You can now:

—Execute this command manually from the Tools menu, and

—Attach it to an event rule so that it executes automatically when an event is triggered (recommended).

Note

These commands are displayed in the Tools menu against the monitor types where the diagnostic was registered.

14 Attach the script command to an event rule.

■ Once you have registered the Script Command, it is recommended that you attach it to an event rule so that it executes automatically when an event is triggered. Check the thresholds to ensure that the attributes you want are enabled.

a Click Options => Edit Thresholds.

b Modify the default settings, if necessary.

c Select Enabled for the attributes required.

d Click Apply.

15 Create the event rule.

■ After you have checked and edited the thresholds as required, you can create the rule and attach it to an event.

a Click Options => Event Rule Admin.

■ A list of default scripts appears on the Event Rule Administration screen. These are the Preconfigured Commands that come with BMC ProactiveNet.

b Click Add.

■ The Create Event Rule screen appears. Follow the instructions on how to create and attach the event rule to the new command you just registered, which is described in the Adding Event Rules section.

In document BMC ProactiveNet (Page 161-165)

Related documents