Our vBulletin migration is complete.
Welcome vBulletin users! All content and user information from the Micro Focus Forums (vBulletin) site has been migrated to this site. READ MORE.
Anonymous_User Absent Member.
Absent Member.
538 views

Performance Tab in OC Java console


We have built custom data integrator adapters that map out our
environment from our custom CMDB for all of our systems and
applications. We also have a custom data warehouse with all of our
system performance data. Is it possible to build a custom performance
adapter that will read all our performance data and expose it in the
performance tab for each element? If yes, can someone point me to the
documentation that describes how to do this? Or maybe, it's better to
ask how is the performance tab used and populated in the NOC?


--
sys1kmt
------------------------------------------------------------------------
sys1kmt's Profile: https://forums.netiq.com/member.php?userid=1569
View this thread: https://forums.netiq.com/showthread.php?t=3006

Labels (1)
0 Likes
12 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Performance Tab in OC Java console


Hi, I did not have the time to test it yet so I cannot share any
experience but I came across a way to attach performance chart to an
element through an sql query (page 314 of Adapter and Integration
guide). Please eventually share our experience on that.


--
ebomitali
------------------------------------------------------------------------
ebomitali's Profile: https://forums.netiq.com/member.php?userid=1132
View this thread: https://forums.netiq.com/showthread.php?t=3006

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Performance Tab in OC Java console


If you are using a Hierarchy File based integration (IE: BDI does), you
can leverage the performance tag feature of the Hierarchy File. This
will allow you to associate performance metric queries to elements
WITHOUT having to bring the actual performance data into Operations
Center. You can provide this cusotmization directly in the BDI editor
in the "Hierarchy XML" setting. In the Adapter Integration
documentation, section 10.5.1 covers the <param> tag. It's a bit
advanced to set up, but the idea is...

1) Specify the jdbc driver to use (IE: what/where is the database that
contains the external performance metrics).
2) Specify the connection details for the jdbc/database
3) Set up the title/name of performance metric
4) Specify the query to execute. The query typically will require some
type of macro replacement to ensure the query is for the specific
element and the specific date/time range.

The other option is to set up "Profiles" in Operations Center to
capture element/alarm properties and store it off as metric data that
can be charted.


--
tisenberg
------------------------------------------------------------------------
tisenberg's Profile: https://forums.netiq.com/member.php?userid=1851
View this thread: https://forums.netiq.com/showthread.php?t=3006

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Performance Tab in OC Java console


Thanks, we figured it out. Next question though, does the NOC 5.0
support getting the data from stored procedures?


--
sys1kmt
------------------------------------------------------------------------
sys1kmt's Profile: https://forums.netiq.com/member.php?userid=1569
View this thread: https://forums.netiq.com/showthread.php?t=3006

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Performance Tab in OC Java console


We also ran into a problem with our inital test where we tried to define
3 metrics and bring back data for each. It appears to only process the
data for the 1st metric and use it for the other 3 we tried to define.

- <generator field="TargetType" class="gen_folder" hold="yes"
affected="yes">
- <generator field="Target" class_from_field="TargetClassName"
hold="yes" affected="yes">
<param name="Performance.Label" value="Average Maintenance Duration
for {element.name}" />
<param name="Performance.Metrics" value="ALD;AMMLD;ANMMLD" />
<param name="Performance.Database"
value="jdbc:jtds:sqlserver://sqlss-xxxxx.xxx.xxx.com:28303/ConsoleOperationsTools"
/>
<param name="Performance.User" value="xxxxxxx" />
<param name="Performance.Password" value="xxxxxxxx" />
<param name="Performance.Query" value="SELECT DATEADD(s, time1,
GETUTCDATE()) as [time], Metric, ALD , AMMLD , ANMMLD FROM ( SELECT
LOG_STT_TS, [LOG_STT_TS]-DATEDIFF(s, ''1/1/1970'',
GETUTCDATE())-DATEDIFF(s, GETDATE(), GETUTCDATE()) AS time1, 0 [Metric],
LOG_DUR*60 AS [ALD], 0 AS [AMMLD], 0 AS [ANMMLD] FROM
[dbo].[CONOPS_VIEW_MNT_LOGS] WHERE TRG_ID = {alarm.TargetId} UNION ALL
SELECT LOG_STT_TS, [LOG_STT_TS]-DATEDIFF(s, ''1/1/1970'',
GETUTCDATE())-DATEDIFF(s, GETDATE(), GETUTCDATE()) AS time1, 1 [Metric],
0 AS [ALD], LOG_DUR*60 AS [AMMLD], 0 AS [ANMMLD] FROM
[dbo].[CONOPS_VIEW_MNT_LOGS] WHERE USE_MNT_MDE = 1 AND TRG_ID =
{alarm.TargetId} UNION ALL SELECT LOG_STT_TS, [LOG_STT_TS]-DATEDIFF(s,
''1/1/1970'', GETUTCDATE())-DATEDIFF(s, GETDATE(), GETUTCDATE()) AS
time1, 2 [Metric], 0 AS [ALD], 0 AS [AMMLD], LOG_DUR*60 AS [ANMMLD] FROM
[dbo].[CONOPS_VIEW_MNT_LOGS] WHERE USE_MNT_MDE = 0 AND TRG_ID =
{alarm.TargetId} ) A WHERE DATEADD(s, time1, GETUTCDATE()) BETWEEN
''{query.from,date,yyyy-MM-dd HH:mm:ss}'' and
''{query.to,date,yyyy-MM-dd HH:mm:ss}'' order by time1" />
</generator>
</generator>


--
sys1kmt
------------------------------------------------------------------------
sys1kmt's Profile: https://forums.netiq.com/member.php?userid=1569
View this thread: https://forums.netiq.com/showthread.php?t=3006

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Performance Tab in OC Java console


sys1kmt;201972 Wrote:
> Thanks, we figured it out. Next question though, does the NOC 5.0
> support getting the data from stored procedures?


I think it should work with the hierarchy tag. I think if you are able
to pass the required parms (ie: date/time range) and it returns the
results like a "select"' statement would, it probably would work.


--
tisenberg
------------------------------------------------------------------------
tisenberg's Profile: https://forums.netiq.com/member.php?userid=1851
View this thread: https://forums.netiq.com/showthread.php?t=3006

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Performance Tab in OC Java console


Have you tested this query recently with hard coded parms to see the
results. If the query is returning three unique metrics and the
performance tab is using the first for all metrics in the chart, I
recommend submitting a bug with Support.


--
tisenberg
------------------------------------------------------------------------
tisenberg's Profile: https://forums.netiq.com/member.php?userid=1851
View this thread: https://forums.netiq.com/showthread.php?t=3006

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Performance Tab in OC Java console


tisenberg;202298 Wrote:
> I think it should work with the hierarchy tag. I think if you are able
> to pass the required parms (ie: date/time range) and it returns the
> results like a "select"' statement would, it probably would work.


OK. they supplied a fix for my first post.

Trying to find a easier way to do this though without the complex SQL
like my first post. Using the hierachy tag, how would you break out the
following to work, as this currently doesn't work properly either?

EXAMPLE: Stacking by using multiple Performance.Metrics definitions:

<hierarchy>

<generator field="TargetType" class="gen_folder" hold="yes"
affected="yes">


<generator field="Target" class_from_field="TargetClassName"
hold="yes" affected="yes">

<param name="Performance.Metrics" value="disk.usage.average" />
<param name="Performance.Label" value="Average Maintenance
Duration for {element.name}" />


<param name="Performance.Query" value="
DECLARE @SQL NVARCHAR(2048), @HOST NVARCHAR(255), @METRIC
NVARCHAR(255), @START_TIME DATETIME, @END_TIME DATETIME;
SET @HOST = N''{element.name}'';
SET @METRIC = N''disk.usage.average'';
SET @START_TIME = CAST(''{query.from,date,yyyy-MM-dd HH:mm:ss}'' AS
DATETIME);
SET @END_TIME = CAST(''{query.to,date,yyyy-MM-dd HH:mm:ss}''
AS DATETIME);
SELECT @SQL = ''DECLARE @tempRemoteStat TABLE(NAME VARCHAR(255),
SAMPLE_TIME datetime, Instance varchar(255), METRIC varchar(255),
STAT_VALUE float);INSERT INTO @tempRemoteStat(SAMPLE_TIME, NAME, METRIC,
Instance, STAT_VALUE) EXEC CapacityV2.dbo.GET_PFM_DATA_P '''''' +
REPLACE(@HOST, '''''''', '''''''''''') + '''''', '''''' +
REPLACE(@METRIC, '''''''', '''''''''''') + '''''', '''''' +
CONVERT(NVARCHAR(255), @START_TIME) + '''''', '''''' +
CONVERT(NVARCHAR(255), @END_TIME) + ''''''; SELECT SAMPLE_TIME,
STAT_VALUE AS ['' + REPLACE(@METRIC, '']'', ''[]]'') + ''] FROM
@tempRemoteStat;'';
EXEC(@SQL);
" />


<param name="Performance.Metrics" value="net.usage.average" />

<param name="Performance.Label" value="net.usage.average for
{element.name}" />


<param name="Performance.Query" value="
DECLARE @SQL NVARCHAR(2048), @HOST NVARCHAR(255), @METRIC
NVARCHAR(255), @START_TIME DATETIME, @END_TIME DATETIME;
SET @HOST = N''{element.name}'';
SET @METRIC = N''net.usage.average'';
SET @START_TIME = CAST(''{query.from,date,yyyy-MM-dd HH:mm:ss}'' AS
DATETIME);
SET @END_TIME = CAST(''{query.to,date,yyyy-MM-dd HH:mm:ss}''
AS DATETIME);
SELECT @SQL = ''DECLARE @tempRemoteStat TABLE(NAME VARCHAR(255),
SAMPLE_TIME datetime, Instance varchar(255), METRIC varchar(255),
STAT_VALUE float);INSERT INTO @tempRemoteStat(SAMPLE_TIME, NAME, METRIC,
Instance, STAT_VALUE) EXEC CapacityV2.dbo.GET_PFM_DATA_P '''''' +
REPLACE(@HOST, '''''''', '''''''''''') + '''''', '''''' +
REPLACE(@METRIC, '''''''', '''''''''''') + '''''', '''''' +
CONVERT(NVARCHAR(255), @START_TIME) + '''''', '''''' +
CONVERT(NVARCHAR(255), @END_TIME) + ''''''; SELECT SAMPLE_TIME,
STAT_VALUE AS ['' + REPLACE(@METRIC, '']'', ''[]]'') + ''] FROM
@tempRemoteStat;'';
EXEC(@SQL);
" />

</generator>

</generator>

<group name="Sources" class="gen_folder" >
<generator field="Source" class_from_field="TargetClassName"
hold="yes" affected="no">
</generator>
</group>
<param name="LinkDef.Count" value="1" />
<param name="LinkDef.0.Source.Path" value="Sources" />
<param name="LinkDef.0.Source.Property" value="elementName" />
<param name="LinkDef.0.Target.Path" value="Logs" />
<param name="LinkDef.0.Target.Property" value="elementName" />
<param name="LinkDef.0.Alarm.Source.Property" value="Source" />
<param name="LinkDef.0.Alarm.Target.Property" value="Target" />
<param name="LinkDef.0.Name" value="Sources" />


</hierarchy>


--
sys1kmt
------------------------------------------------------------------------
sys1kmt's Profile: https://forums.netiq.com/member.php?userid=1569
View this thread: https://forums.netiq.com/showthread.php?t=3006

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Performance Tab in OC Java console


You have a pretty complex sql statement and I'm not sure where to begin
other than...

1) Verify the xml tag syntax, not sure why you have "<param
name="Link..." at the bottom by them selves.

2) I would use a very basic sql statement (even if it is not returning
the right results) to get it working first, then go for the full sql
statement required

3) I'm not sure I see the database connection details either.

The adapters and Integration guide has an example (copy/pasted below):

<generator field="hostname">
<param name="Performance.Label" value="Average Performance for
{element.name}" />
<param name="Performance.Metrics" value="Avg. Response Time (ms);Avg.
Number
of Transactions to {element.name}" />
<param name="Performance.Database" value="jdbc:db2:ewm" />
<param name="Performance.User" value="admin" />
<param name="Performance.Password" value="sesame" />
<param name="Performance.Query" value="select time,value*1000 ''Avg.
Response Time (ms)'',trans ''Avg. Number of Transactions to
{element.name}''
from samples where host=''{alarm.hostname}'' and
metric=''{alarm.source}'' and
time
>= ''{query.from,date,yyyy-MM-dd-HH.mm.ss.000000}'' and time
<= ''{query.to,date,yyyy-MM-dd-HH.mm.ss.000000}'' order by time" />
</generator>

As you can see above, it starts with a generator, then the param stuff
is inside of the generator. The example above also provides the
database connection details.

I suggest using a simpler sql statement, use the above as guideance,
then test from there. Feel free to provide any error messages.


--
tisenberg
------------------------------------------------------------------------
tisenberg's Profile: https://forums.netiq.com/member.php?userid=1851
View this thread: https://forums.netiq.com/showthread.php?t=3006

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Performance Tab in OC Java console


This is an example of one of our single metrics (disk.usage.average)
that works fine for us defined by itself. We have approx 40 other
metrics besides this one (cpu.usagemhz.average, mem.consumed.average,
etc..) that we want to use. We cannot figure out the proper syntax to
"stack" all these metrics in the single XML hierarchy to make them work.
Maybe there's and additional way to configure all of them that we don't
understand, but this is what we are struggling with.

<generator field="TargetType" class="gen_folder" hold="yes"
affected="yes">
<generator field="Target" class_from_field="TargetClassName" hold="yes"
affected="yes">
<param name="Performance.Metrics" value="disk.usage.average" />
<param name="Performance.Label" value="Average Maintenance Duration
for {element.name}" />
<param name="Performance.Database"
value="jdbc:jtds:sqlserver://xxxxx-xxxx.xx.xxx.com:29227/CapacityV2" />

<param name="Performance.User" value="XXX_XXX_USER" />
<param name="Performance.Password" value="xxxxxxxx" />
<param name="Performance.Query" value="DECLARE @SQL NVARCHAR(2048),
@HOST NVARCHAR(255), @METRIC NVARCHAR(255), @START_TIME DATETIME,
@END_TIME DATETIME; SET @HOST = N''{element.name}''; SET @METRIC =
N''disk.usage.average''; SET @START_TIME =
CAST(''{query.from,date,yyyy-MM-dd HH:mm:ss}'' AS DATETIME); SET
@END_TIME = CAST(''{query.to,date,yyyy-MM-dd HH:mm:ss}'' AS DATETIME);
SELECT @SQL = ''DECLARE @tempRemoteStat TABLE(NAME VARCHAR(255),
SAMPLE_TIME datetime, Instance varchar(255), METRIC varchar(255),
STAT_VALUE float);INSERT INTO @tempRemoteStat(SAMPLE_TIME, NAME, METRIC,
Instance, STAT_VALUE) EXEC CapacityV2.dbo.GET_PFM_DATA_P '''''' +
REPLACE(@HOST, '''''''', '''''''''''') + '''''', '''''' +
REPLACE(@METRIC, '''''''', '''''''''''') + '''''', '''''' +
CONVERT(NVARCHAR(255), @START_TIME) + '''''', '''''' +
CONVERT(NVARCHAR(255), @END_TIME) + ''''''; SELECT SAMPLE_TIME,
STAT_VALUE AS ['' + REPLACE(@METRIC, '']'', ''[]]'') + ''] FROM
@tempRemoteStat;''; EXEC(@SQL);" />
</generator>
</generator>


--
sys1kmt
------------------------------------------------------------------------
sys1kmt's Profile: https://forums.netiq.com/member.php?userid=1569
View this thread: https://forums.netiq.com/showthread.php?t=3006

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Performance Tab in OC Java console


You need to add more Performance Metrics with a semi-colon delimiter,
ie: Avg. Response Time (ms);Avg. Number

Then update the sql statement to pull all the metrics
ie: select time, avgResp, avgNum from ....


--
tisenberg
------------------------------------------------------------------------
tisenberg's Profile: https://forums.netiq.com/member.php?userid=1851
View this thread: https://forums.netiq.com/showthread.php?t=3006

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Performance Tab in OC Java console


We currently have access to the performance metrics coming from 2 tools.
Both tools track each metric's value at timestamp as an individual row
in a table.
We have a stored procedure that accesses the databases for these tools
via OpenDataSource queries in SQL server.
It accepts the
* server name
* metric
* start date
* end date

This returns a table of the metric data points within that time period
(with the time stamp as the second or third column).

I believe from the documentation and what we have discussed here, it is
extremely difficult to get all the metrics in one short for a server as
we will have to write a query that identifies each metric we want to
return, populate a temp table by querying the stored proc for each
metric we want to retrieve, and return the table after sorting it and
filtering it. I was hoping to find a easier way achieve this.

Is it your opinion I would need to open an enhancement request for what
we are trying to perform?


--
sys1kmt
------------------------------------------------------------------------
sys1kmt's Profile: https://forums.netiq.com/member.php?userid=1569
View this thread: https://forums.netiq.com/showthread.php?t=3006

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Performance Tab in OC Java console


Off the top of my head I don't have a solution. I guess I would try to
have more than one Performance tags under the generator, one for each
type of metric and see if NOC can handle that... I've never tried it.
You may need to change your stored procedure, I *think* the column
order (IE: date/time) is important/required.

Assuming a single performance tag is working, assuming you are unable to
compound all of the metrics into a single query (which I understand will
be very hard to do and probably tough to read on a chart), assuming
putting multiple performance tags under a single generator doesn't work,
either an enhancement, or a painful BSCM job.

Essentially, you would need to (on the the adapter), create an branch
for each type of performance metric

ie:

Code:
--------------------
adapter
- CPU (group/folder/gen_folder)
- server1
- performance tag just for CPU - no alarms, no element properties, just a basic element
- NIC (group/folder/gen_folder)
- server1
- performance tag just for NIC - no alarms, no element properties, just a basic element
--------------------


Then with a BSCM job, create a list of all your servers. Next correlate
all metrics onto those servers. This new server1 element should be able
to individually chart each metric (or combination of any/all of them).
A bit of work to set up, many more elements created, but it might
provide you a solution for now... this also assumes if this is your only
option, you should open an enhancement request to make this easier in a
future release.

Let me know your test results. I'm pretty confident that the multiple
elements, tags and BSCM will work, I'm hoping the multiple tags under a
generator will work before having to go this route.


--
tisenberg
------------------------------------------------------------------------
tisenberg's Profile: https://forums.netiq.com/member.php?userid=1851
View this thread: https://forums.netiq.com/showthread.php?t=3006

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.