This discussion is archived
7 Replies Latest reply: Aug 5, 2012 9:24 PM by AdeeshFulay RSS

Plugin tables in the OMS Repository

953139 Newbie
Currently Being Moderated
Hi,

I was wondering that once the extensible third-party plugins are created in the Enterprise Manager, does anyone know how can we get plugin information, values (collected data to the metrics) from OMS Repository (Oracle Database)?
  • 1. Re: Plugin tables in the OMS Repository
    AdeeshFulay Explorer
    Currently Being Moderated
    The data collected by any plug-in - 3rd party or Oracle written - is available via our published repository views.

    Refer to documentation for more details:
    EM 12c: http://docs.oracle.com/cd/E24628_01/doc.121/e25161/views.htm#sthref1237
  • 2. Re: Plugin tables in the OMS Repository
    953139 Newbie
    Currently Being Moderated
    Hi,

    Thanks for the quick response. Are there some specific views I should look at. I have 3 metrics defined out of which I can see only one (Response metric giving if status is up or down).

    Would really appreciate it.

    Thanks
  • 3. Re: Plugin tables in the OMS Repository
    AdeeshFulay Explorer
    Currently Being Moderated
    Generally, you should refer to the section titled 'Monitoring Views' for fetching metric data. We also have some examples towards the beginning and end of the chapter.

    Typically every metric data is automatically aggregated and rolled up by hour and day. So the views that would be helpful to you are mgmt$metric_xxxxx, where xxxxxx = details, current, hourly, and daily.

    Here are some examples from the guide:

    public static final String hour_stmt =

    "SELECT collection_timestamp, value "+
    "FROM mgmt$metric_details " +
    "WHERE target_type = ? and target_name = ? and metric_name = ? and metric_column= ? " +
    "and collection_timestamp > sysdate - 1/24 " +
    "ORDER BY collection_timestamp ";

    public static final String day_stmt =

    "SELECT rollup_timestamp, average "+
    "FROM mgmt$metric_hourly " +
    "WHERE target_type = ? and target_name = ? and metric_name = ? and metric_column= ? " +

    "and rollup_timestamp > sysdate - 1 " +
    "ORDER BY rollup_timestamp";

    public static final String week_stmt =

    "SELECT rollup_timestamp, average "+
    "FROM mgmt$metric_daily " +
    "WHERE target_type = ? and target_name = ? and metric_name = ? and metric_column= ? " +
    "and rollup_timestamp > sysdate - 7 " +
    "ORDER BY rollup_timestamp";

    public static final String month_stmt =

    "SELECT rollup_timestamp, average "+
    "FROM mgmt$metric_daily " +
    "WHERE target_type = ? and target_name = ? and metric_name = ? and metric_column= ? " +
    "and rollup_timestamp > sysdate - 31 " +
    "ORDER BY rollup_timestamp";
  • 4. Re: Plugin tables in the OMS Repository
    953139 Newbie
    Currently Being Moderated
    Hi,

    Thanks again for the help. But I am still stuck with metric names which have 'config' attribute defined as true in the plugin xml definitons.

    In my plugin definition, I have a metric named response which is config = false and returns the status up or down
    and two other metrics with config = true return some data (string) values.

    I see the response metric and its values.. but i did not find any of the config true metrics.
    Would they stored separately?

    Thanks again
  • 5. Re: Plugin tables in the OMS Repository
    AdeeshFulay Explorer
    Currently Being Moderated
    I see, yes the configuration data is handled differently and it is placed in different tables. Which plug-in are you referring to? Also, what do you plan to do with this information - generate reports, run sql scripts, just for verification...?

    The easiest way to get access to this information would be to use configuration search. Once you construct your search in the UI, you can view the sql query for it.

    Config Search Screen cast:
    https://apex.oracle.com/pls/apex/f?p=44785:24:0::NO:24:P24_CONTENT_ID,P24_PREV_PAGE:6047,1

    Documentation:
    http://docs.oracle.com/cd/E24628_01/em.121/e27046/config_mgmt.htm#BABJEADD

    BTW, more screen casts on EM 12 can be found here:
    http://www.oracle.com/technetwork/oem/em12c-screenwatches-512013.html


    Hope this helps.
  • 6. Re: Plugin tables in the OMS Repository
    953139 Newbie
    Currently Being Moderated
    Hi afulay,

    You each response is really helping me.. But again, I tried your suggestion and it does help me with getting the Property values (XML tag <InstanceProperties>). But I don't the metric tables having config=true. The plugin I have is a third party plugin and want to know the repository details to create BI publisher reports.

    Thanks again,

    Anvi
  • 7. Re: Plugin tables in the OMS Repository
    AdeeshFulay Explorer
    Currently Being Moderated
    It would help if you give me the plug-in name, and what sort of data you are trying to fetch? If i have access to the plug-in, i can probably guide you better.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points