ramesh9 Acclaimed Contributor.
Acclaimed Contributor.
204 views

Create new PA metric in PA agent 11.x

Jump to solution

Hello All

 

We use PA 11.x on some of our servers and when I run ovcodautil -obj, I am seeing following datasources are created by default,

 

SCOPE

CODA

 

Is it possible to create our own datasource and metrics

 

Datasource             :                       USER

Metric                       :                       LogonTime

Metric                       :                       LogoffTime

 

Please confirm.

0 Likes
1 Solution

Accepted Solutions
Super Contributor.. NioByte Super Contributor..
Super Contributor..

Re: Create new PA metric in PA agent 11.x

Jump to solution

You can do this through a monitoring policy although you will have to embed a Perl script into the monitoring policy (can be an embedded Perl [All OS] or VBScript [Windows only]) . If Perl is used, this will have to reference and use the Operations Agent Perl path (as already defined part of the SI policies).

 

The System Infrastructure Cluster Monitoring policies showcase how this can be done.

 

Some other System Infrastructure policies also demonstrate this. Unfortunately though the embedded Perl script inside opcmona has to be written a certain way in order to work inside a monitoring policy.

 

I have not been able to find adequate documentation on this procedure except a paragraph or so. There was an enhancement request to document how Perl scripts should be written inside monitoring policies. Refer to enhancement request: QCCR1A138957 -> http://support.openview.hp.com/selfsolve/document/KM1361231 & QCCR1A161767 -> http://support.openview.hp.com/selfsolve/document/KM00428554

 

The request for how to write these scripts in detail has been closed (QCCR1A132736😞 http://support.openview.hp.com/selfsolve/document/KM1302238

 

It seems as what Roland has suggested. Is the same as what has been suggested in the following knowledge document (KM851591):

http://support.openview.hp.com/selfsolve/document/KM851591

 

Question:

Where to find more information or documentation  which can be used to write Perl script to do threshold monitoring in OMW ?
    
Solution:

To obtain further information please consult the OMW online help for ‘policy objects examples’ .

Also if more specific code samples is required then please have a look at the Infrastructure SPI once it uses advance monitoring with embedded Perl scripting extensively.

 


Unfortunately, these are the only examples I have seen of how this can be done as well. The way it is performed, will require multiple embedded scripts in order to be achieved (one for collection, one for metric registration, then others for threshold checks [reset, breached/crossed/exceeded/excluded/supression], etc).

 

It may be possible to copy one of the system infrastructure policies that does the metric registration, collection and threshold checks and modify it to your needs. As the appropriate syntax would already be defined. That would be my approach.

 

I had briefly looked into this a while ago. It seems leveraging on one of the existing System Infrastructure policies that has custom metrics collected, copying and modifying it would be the best approach.

5 Replies
Absent Member.. Roland_Weering Absent Member..
Absent Member..

Re: Create new PA metric in PA agent 11.x

Jump to solution

Hello,

 

Yes you can.  I am not sure how you want to use it but for example check the following policy:

 

SI-MSWindowsLastLogonsCollector from the Infrastructure management spi.

 

You will see the following statement:

 

Policy.StoreCollection "CODA\\SISPI\\LOGINS\\SECONDS_SINCE_LASTLOGIN\\gauge",Sourceobj

 


The explanation is in the manual for operation for windows ( Page 960 in the HP Operations Manager for Windows Online help pdf) The unix manual does not contain the needed information.

 

Another policy example is"CI-ClusterDataCollector"

 

Another way is compiling your own datasource. See the Operations Agent Users guide from the latest agent version and look for the part Data Source Integration.

 

 

Best regards,

 

Roland

 

 

 

 

 

 

ramesh9 Acclaimed Contributor.
Acclaimed Contributor.

Re: Create new PA metric in PA agent 11.x

Jump to solution

Thanks Roland

 

But we have Operations Manager for Unix and can we create our own metric through policy.

 

I remember in Measurement Threshold policy if you select either External, MIB, Real Time performance Management, Program, WMI we can create new metric and store the value collected in that metric.

 

If we select <Program> in Measurement Threshold policy ( Monitor Policy ) and execute the Program, how does it store the value in newly created metric.

 

Thanks

Ramesh

0 Likes
Super Contributor.. NioByte Super Contributor..
Super Contributor..

Re: Create new PA metric in PA agent 11.x

Jump to solution

You can do this through a monitoring policy although you will have to embed a Perl script into the monitoring policy (can be an embedded Perl [All OS] or VBScript [Windows only]) . If Perl is used, this will have to reference and use the Operations Agent Perl path (as already defined part of the SI policies).

 

The System Infrastructure Cluster Monitoring policies showcase how this can be done.

 

Some other System Infrastructure policies also demonstrate this. Unfortunately though the embedded Perl script inside opcmona has to be written a certain way in order to work inside a monitoring policy.

 

I have not been able to find adequate documentation on this procedure except a paragraph or so. There was an enhancement request to document how Perl scripts should be written inside monitoring policies. Refer to enhancement request: QCCR1A138957 -> http://support.openview.hp.com/selfsolve/document/KM1361231 & QCCR1A161767 -> http://support.openview.hp.com/selfsolve/document/KM00428554

 

The request for how to write these scripts in detail has been closed (QCCR1A132736😞 http://support.openview.hp.com/selfsolve/document/KM1302238

 

It seems as what Roland has suggested. Is the same as what has been suggested in the following knowledge document (KM851591):

http://support.openview.hp.com/selfsolve/document/KM851591

 

Question:

Where to find more information or documentation  which can be used to write Perl script to do threshold monitoring in OMW ?
    
Solution:

To obtain further information please consult the OMW online help for ‘policy objects examples’ .

Also if more specific code samples is required then please have a look at the Infrastructure SPI once it uses advance monitoring with embedded Perl scripting extensively.

 


Unfortunately, these are the only examples I have seen of how this can be done as well. The way it is performed, will require multiple embedded scripts in order to be achieved (one for collection, one for metric registration, then others for threshold checks [reset, breached/crossed/exceeded/excluded/supression], etc).

 

It may be possible to copy one of the system infrastructure policies that does the metric registration, collection and threshold checks and modify it to your needs. As the appropriate syntax would already be defined. That would be my approach.

 

I had briefly looked into this a while ago. It seems leveraging on one of the existing System Infrastructure policies that has custom metrics collected, copying and modifying it would be the best approach.

Highlighted
ramesh9 Acclaimed Contributor.
Acclaimed Contributor.

Re: Create new PA metric in PA agent 11.x

Jump to solution

Thanks I created my own datasource and my own metric.

 

However while running ovcodautil -dumpds DATASOURCE, it lists only last instance value collected.

 

Is there any possibility of listing all instance data using ovcodautil -dumpds command or through any other ways.

 

I also noticed that scopeux, midaemon is not running on the node where new Datasource and metric has been created.

 

Agent version is 11.11.025

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Create new PA metric in PA agent 11.x

Jump to solution

Hello ,

 

Is this stored in CODA or SCOPE?

ovcodautil -showds

ovcodautil -obj

 

Do you mean that you need to view the archived values that were stored over a period of time?

Depending on where it is stored (CODA or SCOPE), you may extract this data.

 

>>>I also noticed that scopeux, midaemon is not running on the node where new Datasource and metric has been created.


That could be a problem with PA on the node side or a mere lack of license

ovpa -status

 

11.0x -- all licenses were activated by default during OA installation.

11.1x -- a manual license activation is required for OA, PA, RTM during OA installation

 

Please do the following:

# oalicense -set -type PERMANENT "HP Operations OS Inst Adv SW LTU"

# oalicense -set -type PERMANENT "HP Ops OS Inst to Realtime Inst LTU"

 

After that, please restart the agent.

 

 

 

 

Micro Focus Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
If you liked it I would appreciate KUDOs. Thanks
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.