This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,685 Users
  • 2,269,776 Discussions


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



  • Hozefa Palitanawala-Oracle
    Hozefa Palitanawala-Oracle Member Posts: 181 Employee

    Value for the Lifecycle Status and Line of Business is available in MGMT$TARGET_PROPERTIES.

    Below query lists all the targets and these property value:

    SELECT target_name, target_type, property_name, property_value


    WHERE property_name in ('orcl_gtp_lifecycle_status','orcl_gtp_line_of_bus')

  • Sigbjorn
    Sigbjorn Member Posts: 14 Blue Ribbon

    I do know how to find the lifecycle properties, but thanks for the update.

    OK, so I have to make custom Grafana Dashboards. There will not be any samples with use of Lifecycle poperties?

  • We don't necessarily provide "Out of the Box" Dashboards to meet the needs of various use-cases. At this point, as pointed out by Hozefa, you need to write custom SQL query to utilize the specific Lifecycle related MGMT $ Views to pull necessary information pertaining to your targets.

  • Sigbjorn
    Sigbjorn Member Posts: 14 Blue Ribbon

    I understand that you can not show every use case. I did however figure out a way to use it in a panel:

    select t.target_name "Target Name", gtp_ls.property_value "LifeCycle Status", gtp_lb.property_value "Line of Business"

    from sysman.mgmt$target t,

    (select p.target_guid, p.property_value from sysman.mgmt$target_properties p where p.property_name = 'orcl_gtp_lifecycle_status') gtp_ls,

    (select p.target_guid, p.property_value from sysman.mgmt$target_properties p where p.property_name = 'orcl_gtp_line_of_bus' ) gtp_lb


    t.target_guid = gtp_ls.target_guid and

    gtp_ls.target_guid = gtp_lb.target_guid and

    gtp_lb.target_guid IN (select t.target_guid from sysman.mgmt$target t where t.target_name IN ( $oem_gf_target_name )) ;

    What I was hoping for was a way to use lifecycle parameters as variables in dropdown boxes :)

  • Sigbjorn
    Sigbjorn Member Posts: 14 Blue Ribbon

    I see from the documentation that you have provided some template variables to use in the samples, but are there any documentation on how to create own Grafana variables and specifically the query variable type as it seems to only take "metric name or tags query" ?

    Lets say I wanted to populate a dropdown box similar to the one you have in your samples for database targets:

    { "type":"target" ,"targettype":"$oem_gf_target_type" , "emsite" : "$oem_gf_emsite" }

    Where is the documentation for this? It does not seem to like me run a sql here, so I guess it only takes tags ?

  • User_AP51T
    User_AP51T Member Posts: 1 Blue Ribbon


    I have installed grafana plugin as well as enabled oracle-emcc-app. Setup datasource but cannot see data in dahsboard. It says "template initi failed". Please find attached. Any idea?

  • Can you clarify the version of OEM App for Grafana, Grafana Server and Enterprise Manager versions?

  • raphi
    raphi Member Posts: 28 Bronze Badge

    That is exactly what I'm looking for too. I'd like to add a dropdown for selecting the lifecycle status and the variables seem to be the way to go but there is no documentation I could find for how to query the datasource. Does anyone have a link or knows how to do this?

  • Sigbjorn
    Sigbjorn Member Posts: 14 Blue Ribbon

    I have only got this to work with SQL-query panel. What I did was just to make custom variables and fixed Values seperated by comma, that I then used in the query:

    oem_gf_targettype : oracle_database, oracle_listener,oracle_emd,host

    oem_gf_lifecycle_status : Produksjon : 'Production', Referanse : 'Stage', Test : 'Test', Utvikling : 'Development'

    and in the where clause of the SQL-query I used:

    t.target_type = '$oem_gf_targettype' and

    gtp_ls.property_value = $oem_gf_lifecycle_status

    So the values you choose in the dropdown box is used in the SQL-query.

    But this will not populate the dropdown box from a query like the built-in does:

    { "type":"target" ,"targettype":"$oem_gf_target_type" , "emsite" : "$oem_gf_emsite" }

  • raphi
    raphi Member Posts: 28 Bronze Badge

    I've also specified a targettype variable but this means it will only show data in some panels and in others not. Let's say I have a panel for PGA Usage of the database and one for Listener Connections per minute. When I set targettype to "oracle_database" I see only data in the PGA panel and when I set it to listener, only the listener panel has data, which is why I don't see the benefit of choosing the target type yet. But this is not a huge issue, I'm fine with creating several dashboards, one per target type.

    But being able to choose the lifecycle would really help alot. What we need is a list of the keywords we can use in the variable query, like "targettype" and "emsite" and if there is a keyword for lifecycle, eg. something like this:

    { "type":"target" ,"targettype":"$oem_gf_target_type" , "emsite" : "$oem_gf_emsite", "targetlifecycle":"$oem_gf_lifecycle_status" }

    Is there such a keyword?