Forum Stats

  • 3,837,492 Users
  • 2,262,264 Discussions
  • 7,900,302 Comments

Discussions

Tell us about your experience with the "Oracle Enterprise Manager App for Grafana ”

1356718

Answers

  • Murtaza Husain-Oracle
    Murtaza Husain-Oracle Posts: 44 Employee
    edited Jul 2, 2020 2:35PM

    Hi Balaji,

    Couple of follow-up questions:

    • What version of EM are you using? Is it EM13.4 RU3?
    • Moreover, are you running EM on OCI?

    Thanks,

    Murtaza

  • user13399581
    user13399581 Member Posts: 5 Blue Ribbon
    edited Jul 2, 2020 2:59PM

    yes, database performance report is working fine. None of the other sample or template is working. do i have to put my own queries on it?

    I thought the sample -Database configuration report should work but it is not showing data as well. I am just saving the template in a different folder and trying to populate with last 5 days of data.

    The other templates don't have any panels visible.

  • User_PVTD9
    User_PVTD9 Member Posts: 4 Red Ribbon
    edited Jul 2, 2020 3:02PM

    Thank you very much for your response @Murtaza Husain-Oracle.

    Yes, it is RU 3, i have applied the latest patch: 31299359.

    No, this is not running on OCI, a normal virtualised server.

    I have enabled the REST API as per the document and I am able to query the OMR repository using REST call. I tried it out using "post-master" successfully.
    However, it fails from Grafana. I have tried in the grafana versions: 6.6.2 and 6.7.1

    My OMS-promethius App version: oracle-emcc-app-1.0.2

    Warm Regards,

    balaji R

    P.S: We are very excited about this feature. Thanks again.

  • Murtaza Husain-Oracle
    Murtaza Husain-Oracle Posts: 44 Employee
    edited Jul 2, 2020 5:13PM

    The two OOB dashboards as listed below should work "as-is" with the default setup you have i.e.

    • Sample-Database Configuration Report (Non-Time Series)
    • Sample-Database Performance Report (Time Series)

    I would suggest just try using the "Sample-Database Configuration Report" as-is for now and see if the data populates. Don't save it in a different folder for now.

    As far as using "Pre-Defined Templates" are concerned, please follow the instructions listed on the EM App for Grafana guide i.e. https://docs.oracle.com/en/enterprise-manager/cloud-control/enterprise-manager-cloud-control/13.4/emgrf/create-dashboard…

    Essentially, you need to write a query to populate the necessary data in the template.

  • user13399581
    user13399581 Member Posts: 5 Blue Ribbon
    edited Jul 2, 2020 7:34PM

    Seems like 'DB configuration report' is trying to pull data from the OEM repository database directly instead of using the OEM API.

    This is the query under one of the panels -

    select o.name as "Option_Name", o.selected as "Configured"

                     from sysman.mgmt$db_options o

                    where o.target_guid = (select target_guid from  sysman.mgmt$target where target_name= $oem_gf_target_name )

                      order by name

    I thought the OEM repository credentials are optional and was needed only for pre 13.4 OMR.  is that not the case?

  • Murtaza Husain-Oracle
    Murtaza Husain-Oracle Posts: 44 Employee
    edited Jul 3, 2020 12:34AM

    Yes, essentially the custom SQL query gets executed via OEM API to the OEM repository DB. The credentials are not required since the datasource is already configured in Grafana with EM credentials.

  • Murtaza Husain-Oracle
    Murtaza Husain-Oracle Posts: 44 Employee
    edited Jul 3, 2020 12:38AM

    Can you specify as to which REST API call are you using to query the OMR repository data?

  • User_PVTD9
    User_PVTD9 Member Posts: 4 Red Ribbon
    edited Jul 3, 2020 1:31AM

    Hello @Murtaza Husain-Oracle,

    I am able to query the OMR repository using the below API:

    ENDPOINT:

    https://<hostname>:<port>/em/websvcs/restful/emws/oracle.sysman.db/executesql/repository/query/v1https://stg-mon-oms102z.stg.jp.local:7803/em/websvcs/restful/emws/oracle.sysman.db/executesql/repository/query/v1

    Payload:

    { "sqlStatement": "select o.database_name Database_Name, o.characterset Database_Character_Set, o.instance_name Instance_Name, o.national_characterset National_DB_Character_Set, o.global_name Global_Name, o.log_mode Archive_Log_Mode, o.banner Version, o.default_temp_tablespace Default_Temporary_Tablespace from sysman.mgmt$db_dbninstanceinfo o ", "maxRowLimit": 10, "maxColumnLimit": 4 } 

    Response:

    "Result": [

            {

                "DATABASE_NAME": "DMDB2",

                "DATABASE_CHARACTER_SET": "AL32UTF8",

                "INSTANCE_NAME": "dmdb2",

                "NATIONAL_DB_CHARACTER_SET": "AL16UTF16"

            }

    ]

    HTTP response code: 200 OK

    However, when i try using the grafana APIs,

    ENDPOINT:

    https://<hostname>:<port>/em/websvcs/restful/grafana/v1/enablestatus

    Payload:

    { } 

    Cookies:

    grafana_session

    Response:

    {

       "refId": "A",

       "message": "For userid:value there is no throttle rate limiter configured."

    }

    HTTP RESPONSE CODE: 400 Bad request

  • User_PVTD9
    User_PVTD9 Member Posts: 4 Red Ribbon
    edited Jul 3, 2020 3:55AM

    Sorry @Murtaza Husain-Oracle. I was my mistake. The Ru3 was not applied properly. Hence, some configurations were incorrect.

    After rollback and re-apply of RU, the issues are fixed. The performance dashboard is populated with data now.

    Murtaza Husain-Oracle
  • ganessub-Oracle
    ganessub-Oracle Member Posts: 38 Employee
    edited Jul 3, 2020 6:46AM

    In the 'DB Configuration report' , some of the Panel uses Custom query to showcase the flexibility of how you can come up with your own SQL query to pull data from OMR. This plugin offers "built-in" query and Custom query options. If you don't want to write any query you can use the built-in query options found under SeriesType(Timeseries) , Raw/Weekly/Timely and in case you have more complex need then you can come up with your own query tusing Custom Query(Repository) option.

    Regardless of which option you choose (built-in or custom), OEM API will take care of establishing connection with OMR to pull data.

    The sample dashboards provided by the plugin are just to showcase , how we used different options which are available in the Grafana plugin. You can follow similar stuff to come up with your own dashboards as per your requirements.

    Murtaza Husain-Oracle