Generating Test Events with Hardware Sentry KM for PATROL

How to generate test events of class 11 and 41 with Hardware Sentry KM for PATROL.

Related Topics

Objective

This article explains how to generate events of class 11 and 41 with Hardware Sentry KM for PATROL.

Procedure

To generate test events, a command must be run to modify the value of the required parameter. In the example below, you will modify the value of a Temperature parameter and the value of the Status parameter of a physical disk.

Note: Changing the parameter value does not stop the collection mechanism. The KM will reset the parameter to the real value at the next collect and a class 9 event will be generated. This will often close the class 11 and class 41 events depending on the rules implemented in your environment.

For PATROL Classic Environments

Modifying the Value of a Temperature Parameter

  1. Generate a Hardware Health Report for the Temperature parameter that you wish to modify:

    • Right-click the Temperature instance and select KM Commands > Instant Hardware Health Report. The following report is displayed:
      Generating the Hardware Health Report
    • Look for the PATROL object ID. In the example above, the PATROL object ID is: /MS_HW_TEMPERATURE/MS_HW_NetApphdfNetApp_500a0980038ba592-10
    • Check the alarm ranges. In the example above, an alarm is triggered if the value exceeds 80. We will therefore set the Temperature parameter to 95 to generate an alarm.
  2. Run the required command to set the Temperature parameter to 95:

    • Right-click the Managed System and select System Output Window.

    • In the System Output Window, run one of the following commands, depending on the version of Hardware Sentry KM in use:

      • For version 10.1.01 and below: requires MS_HW_alertactions; swSetParameterValue("<PATROLOBJECTID>/<PARAMETER>","<VALUE>");

      • For version 10.2 and above: requires MS_HW_parameter; swSetParameterValue("<PATROLOBJECTID>/<PARAMETER>","<VALUE>");

    • <PATROLOBJECTID> must be replaced with the object ID. In our example: /MS_HW_TEMPERATURE/MS_HW_NetApphdfNetApp_500a0980038ba592-10. The leading / at the beginning of the object ID is required.
    • <PARAMETER> must be replaced with the parameter name. In our example: Temperature
    • <VALUE> must be replaced with a value that will trigger the alarm. In our example: 95

    For our example, we run the following command:

    requires MS_HW_alertactions; swSetParameterValue("/MS_HW_TEMPERATURE/MS_HW_NetApphdfNetApp_500a0980038ba592-10/Temperature","95");

    The PATROL Agent and Hardware Sentry KM generate two events: a class 11, and a class 41:

    Generating a Class 11 event

    Generating a Class 41 event

Modifying the Value of the Status Parameter of a Physical Disk

  1. Generate a Hardware Health Report for the physical disk for which you wish to modify the Status parameter:

    • Right-click the Physical Disk instance and select KM Commands > Instant Hardware Health Report. The following report is displayed:
      Generating the Hardware Health Report
    • Look for the PATROL object ID. In the example above, the PATROL object ID is: /MS_HW_PHYSICALDISK/MS_HW_NetApphdfNetApp_sparedisk1SHJHU16400000650
  2. Run the required command to set the Status parameter to 2:

    • Right-click the Managed System and select System Output Window.
  • In the System Output Window, run one of the following commands, depending on the version of Hardware Sentry KM in use:

    • For version 10.1.01 and below: requires MS_HW_alertactions; swSetParameterValue("<PATROLOBJECTID>/<PARAMETER>","<VALUE>");

    • For version 10.2 and above: requires MS_HW_parameter; swSetParameterValue("<PATROLOBJECTID>/<PARAMETER>","<VALUE>");

  • <PATROLOBJECTID> must be replaced with the object ID. In our example: /MS_HW_PHYSICALDISK/MS_HW_NetApphdfNetApp_sparedisk1SHJHU16400000650. The leading / at the beginning of the object ID is required.

  • <PARAMETER> must be replaced with the parameter name. In our example: Status

  • <VALUE> must be replaced with a value that will trigger the alarm. In our example: 2

For our example, we run the following command: requires MS_HW_alertactions; swSetParameterValue("/MS_HW_PHYSICALDISK/MS_HW_NetApphdfNetApp_sparedisk1SHJHU16400000650/Status","2");

The PATROL Agent and Hardware Sentry KM generate two events: a class 11 and a class 41:
Generating a Class 11 event

![Generating a Class 41 event](/kb/1119/PATROL06.png)

For TrueSight Environments

Modifying the Value of a Temperature Parameter

  1. In the navigation pane of the TrueSight console, click Configuration and select Managed Devices.

  2. Click a PATROL Agent menu inline and select Query PATROL Agent. The Agent Query Tool opens in a new browser window.

  3. In the Command box, enter the classReport() query: requires MS_HW_q; classReport("classname"); where classname is the class name for which instances should be listed.

    Example:

    Command : requires MS_HW_q; classReport("Temperature");
    Results :
    TEMPERATURE REPORT
    ------------------

    PATH                                                                HOST          LABEL   STATUS   
    ---------------------------------------------------------------------------------------------------
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a0980038ba592-1    netapp9-san   6       OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a0980038ba592-10   netapp9-san   0       OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a0980038ba592-11   netapp9-san   1       OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a0980038ba592-12   netapp9-san   2       OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a0980038ba592-13   netapp9-san   3       OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a0980038ba592-14   netapp9-san   4       OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a0980038ba592-15   netapp9-san   5       OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a0980038ba592-2    netapp9-san   7       OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a0980038ba592-3    netapp9-san   8       OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a0980038ba592-4    netapp9-san   9       OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a0980038ba592-5    netapp9-san   10      OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a0980038ba592-6    netapp9-san   11      OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a0980038ba592-7    netapp9-san   12      OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a0980038ba592-8    netapp9-san   13      OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a0980038ba592-9    netapp9-san   14      OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a098007482941-1    netapp9-san   17      OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a098007482941-10   netapp9-san   15      OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a098007482941-11   netapp9-san   16      OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a098007482941-2    netapp9-san   18      OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a098007482941-3    netapp9-san   19      OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a098007482941-4    netapp9-san   20      OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a098007482941-5    netapp9-san   21      OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a098007482941-6    netapp9-san   22      OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a098007482941-7    netapp9-san   23      OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a098007482941-8    netapp9-san   24      OK       
    /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a098007482941-9    netapp9-san   25      OK   
  1. Click Execute.

  2. In the command output, copy the path of the device on which you want to create an alert.

  3. In the Command box, enter the one of the queries below, depending on the version of Hardware Sentry KM in use:

    • For 10.1.01 and below: requires MS_HW_alertactions; swSetParameterValue("<devicePath>/<parameter>","<value>");
    • For 10.2 and above: requires MS_HW_parameter; swSetParameterValue("<devicePath>/<parameter>","<value>");
  • <devicePath> is the path of the device you want to create the alert on. In our example: /MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a098007482941-10. The leading / at the beginning of the device path is required.

  • <parameter>is the parameter you want to set. In our example, Temperature

  • <value> is the value you want to set to generate an event. In our example, 95

    Example:

  Command: requires MS_HW_alertactions; swSetParameterValue("/MS_HW_TEMPERATURE/MS_HW_NetApphdfnetapp9-san_500a098007482941-10/Temperature","95");
  Results: Executed successfully on the PATROL agent.
The event is generated:

Event generated in TrueSight

Modifying the Value of the Status Parameter of a Physical Disk

  1. In the navigation pane of the TrueSight console, click Configuration and select Managed Devices.

  2. Click a PATROL Agent menu inline and select Query PATROL Agent. The Agent Query Tool opens in a new browser window.

  3. In the Command box, enter the classReport() query: requires MS_HW_q; classReport("classname"); where classname is the class name for which instances should be listed.

    Example:

    Command :	requires MS_HW_q; classReport("MS_HW_PHYSICALDISK");
      Results : 	

      PHYSICAL DISK REPORT
      --------------------

      PATH                                                                          HOST          LABEL                                          STATUS   
      ----------------------------------------------------------------------------------------------------------------------------------------------------
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_UnassignedDisks0               netapp9-san   Unassigned Disks: 0                            OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_shareddisk1SHFHU16510006550    netapp9-san   /0/0 (NETAPP X342_STBTE1T2A10 SAS - 1.2 TB)    OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_shareddisk1SHFHU16510006551    netapp9-san   /0/1 (NETAPP X342_STBTE1T2A10 SAS - 1.2 TB)    OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_shareddisk1SHFHU165100065510   netapp9-san   /0/10 (NETAPP X342_STBTE1T2A10 SAS - 1.2 TB)   OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_shareddisk1SHFHU165100065511   netapp9-san   /0/11 (NETAPP X342_STBTE1T2A10 SAS - 1.2 TB)   OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_shareddisk1SHFHU16510006552    netapp9-san   /0/2 (NETAPP X342_STBTE1T2A10 SAS - 1.2 TB)    OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_shareddisk1SHFHU16510006553    netapp9-san   /0/3 (NETAPP X342_STBTE1T2A10 SAS - 1.2 TB)    OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_shareddisk1SHFHU16510006554    netapp9-san   /0/4 (NETAPP X342_STBTE1T2A10 SAS - 1.2 TB)    OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_shareddisk1SHFHU16510006555    netapp9-san   /0/5 (NETAPP X342_STBTE1T2A10 SAS - 1.2 TB)    OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_shareddisk1SHFHU16510006556    netapp9-san   /0/6 (NETAPP X342_STBTE1T2A10 SAS - 1.2 TB)    OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_shareddisk1SHFHU16510006557    netapp9-san   /0/7 (NETAPP X342_STBTE1T2A10 SAS - 1.2 TB)    OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_shareddisk1SHJHU164000006510   netapp9-san   /0/10 (NETAPP X374_S163A960ATE SSD - 960 GB)   OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_shareddisk1SHJHU16400000652    netapp9-san   /0/2 (NETAPP X374_S163A960ATE SSD - 960 GB)    OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_shareddisk1SHJHU16400000653    netapp9-san   /0/3 (NETAPP X374_S163A960ATE SSD - 960 GB)    OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_sparedisk1SHJHU16400000650     netapp9-san   /0/0 (NETAPP X336_HAKPE04TA07 FSAS - 4.0 TB)   OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_sparedisk1SHJHU16400000651     netapp9-san   /0/1 (NETAPP X336_HAKPE04TA07 FSAS - 4.0 TB)   OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_sparedisk1SHJHU164000006511    netapp9-san   /0/11 (NETAPP X374_S163A960ATE SSD - 960 GB)   OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_sparedisk1SHJHU16400000654     netapp9-san   /0/4 (NETAPP X336_HAKPE04TA07 FSAS - 4.0 TB)   OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_sparedisk1SHJHU16400000655     netapp9-san   /0/5 (NETAPP X336_HAKPE04TA07 FSAS - 4.0 TB)   OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_sparedisk1SHJHU16400000656     netapp9-san   /0/6 (NETAPP X374_S163A960ATE SSD - 960 GB)    OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_sparedisk1SHJHU16400000658     netapp9-san   /0/8 (NETAPP X336_HAKPE04TA07 FSAS - 4.0 TB)   OK       
      /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_sparedisk1SHJHU16400000659     netapp9-san   /0/9 (NETAPP X336_HAKPE04TA07 FSAS - 4.0 TB)   OK       
  1. Click Execute.
  2. In the command output, copy the path of the device on which you want to create an alert.
  3. In the Command box, enter the one of the queries below, depending on the version of Hardware Sentry KM in use:
  • For 10.1.01 and below: requires MS_HW_alertactions; swSetParameterValue("<devicePath>/<parameter>","<value>");

  • For 10.2 and above: requires MS_HW_parameter; swSetParameterValue("<devicePath>/<parameter>","<value>");

  • <devicePath> is the path of the device you want to create the alert on. In our example: /MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_shareddisk1SHFHU16510006550. The leading / at the beginning of the device path is required.

  • <parameter>is the parameter you want to set. In our example, Status

  • <value> is the value you want to set to generate an event. In our example, 2

Example:

  Command: requires MS_HW_alertactions; swSetParameterValue("/MS_HW_PHYSICALDISK/MS_HW_NetApphdfnetapp9-san_shareddisk1SHFHU16510006550/Status","2");
  Results: Executed successfully on the PATROL agent.

The event is generated:

Event generated in TrueSight