Home

Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Performance Tab in OC Java console

  1. #1
    sys1kmt NNTP User

    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


  2. #2
    ebomitali NNTP User

    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


  3. #3
    tisenberg NNTP User

    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


  4. #4
    sys1kmt NNTP User

    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


  5. #5
    sys1kmt NNTP User

    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


  6. #6
    tisenberg NNTP User

    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


  7. #7
    tisenberg NNTP User

    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


  8. #8
    sys1kmt NNTP User

    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


  9. #9
    tisenberg NNTP User

    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
    &gt;= ''{query.from,date,yyyy-MM-dd-HH.mm.ss.000000}'' and time
    &lt;= ''{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


  10. #10
    sys1kmt NNTP User

    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


Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •