Monday, July 28, 2014

PATROL Agent 9.5 - Part 4: How to include annotated data as part of the event?

The information included in this post actually applies to all versions of PATROL agent, not just version 9.5.  

Many PATROL KMs save important information to an annotated data point when changing a parameter status to ALARM or WARNING.  By default, this annotated data is not included in the event sent to BPPM cell.  What if you want to include annotated data in the event sent to BPPM cell so that it will be included in the notification email and incident ticket?

To achieve that, you will need to write a recovery action at PATROL agent.  Although PATROL Event Management KM is no longer required for PATROL agent v 9.5 from architecture point of view, to avoid modifying the original KM code, I still suggest to use PATROL Event Management KM so that you can add a recovery action by simply deploying some pconfig variable settings.

Here is an example of recovery action to include annotated data.  In this example, MS_HW_ENCLOSURE KM is used but you can apply the same concept to other KMs.  MS_HW_ENCLOSURE KM has a parameter named 'Status'.  When a blade goes down, this parameter's status becomes ALARM and an annotated data point is generated.


PATROL_CONFIG
"/AS/EVENTSPRING/MS_HW_ENCLOSURE/__ANYINST__/Status/arsAction" = { REPLACE = "6" },
"/AS/EVENTSPRING/MS_HW_ENCLOSURE/__ANYINST__/Status/arsCmdType" = { REPLACE = "PSL"},
"/AS/EVENTSPRING/MS_HW_ENCLOSURE/__ANYINST__/Status/arsCommand" = { REPLACE = "C:\\BMC\\Patrol3\\lib\\psl\\Annotate_Recovery.psl" }


Then write a PSL script C:\BMC\Patrol3\lib\psl\Annotate_Recovery.psl as follows:
sleep(1);
status = get("/MS_HW_ENCLOSURE/".__instance__."/Status/status");
txt = annotate_get("/MS_HW_ENCLOSURE/".__instance__."/Status");
txt = nthargf(txt, "2-", "\\");
origin = "MS_HW_ENCLOSURE.".__instance__.".Status_Annotate";
event_trigger2(origin, "STD", "41", status, "4", txt);

A few things to notice:
1) PATROL notification server is not required to run the above recovery action. 
2) The sleep(1) in the first line is to include a delay so that the KM has enough time to finish writing to annotated data before annotate_get() is called.
3) The nthgargf() call at the 4th line is to filter out the leading %Text %Infobox string included in every annotated data. 
4) I put 'Status_Annotate' as the last part in event origin so that this event's mc_parameter slot would become 'Status_Annotate' in the cell.  You can use any string you like.
5) The annotated data will be displayed in the event's mc_parameter_value slot.

Monday, July 21, 2014

PATROL Agent 9.5 - Part 3: Do I still need PATROL console with BPPM 9.5?

In BPPM 9.5, many features in PATROL console have been added to BPPM operations console.  I have heard this question over and over again: Do I still need PATROL console?

The answer is that you should still install PATROL console but you may not need to use it all the time and on all PATROL agents.

Let's take a look on what you use PATROL console for.

1) To develop PATROL custom knowledge modules:

Since there is no other way to develop a PATROL custom knowledge modules in BPPM 9.5, you still need to use PATROL classical console.

2) To configure PATROL knowledge modules:

With the newly available menu commands and CMA (Central Monitoring Administration) options, you can configure many PATROL knowledge modules in BPPM 9.5 operations console and CMA.  However for some PATROL knowledge modules, trying to configure them using BPPM 9.5 operations console is still very difficult or impossible.  Some features available in PATROL Central console, such as disabling parameter data collection, are still not available in BPPM operations console except by directly typing the pconfig variable values in CMA.

To avoid frustration, it is recommended to configure non-trivial PATROL knowledge modules using either PATROL Central console or PATROL classical console.  But you only need to configure one PATROL agent for each different configuration.  Carefully save all the related pconfig variables after each different configuration for each PATROL KM.  You may need to import some of them into either PCM (PATROL Configuration Manager) or CMA depending on which one you are using for mass configuration deployment. 

3) To view collected data:

You should be able to view data collected by all PATROL agents on BPPM 9.5 operations console.  For data that you configured as streamed data, you should see them displayed in real-time in BPPM 9.5 operations console as they are stored in BPPM database.  For data that you configured as non-streamed data, you should still be able to see them as BPPM 9.5 operations console retrieves them from PATROL agents on demand.  However non-streamed data may be displayed in BPPM 9.5 operations console with a delay.

4) Trouble shooting:

In theory, you should be able to perform most of the trouble shooting by using BPPM 9.5 operations console.  However due to possible delay of non-streamed data and the fact that PATROL Central console Windows edition is many times faster than BPPM 9.5 operations console (a web GUI), you would most likely prefer to use PATROL console for trouble shooting.  If you need to verify/change some complicated KM configuration, you would have to use PATROL console.

In summary, with BPPM 9.5, you would most likely use your PATROL classical console as developer console, your PATROL Central console as admin console, and your BPPM console as operations console.