Forum Stats

  • 3,872,915 Users
  • 2,266,490 Discussions
  • 7,911,382 Comments

Discussions

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

145791019

Answers

  • User_O96FN
    User_O96FN Member Posts: 3 Red Ribbon

    Hello Hussain,


    Thank for your answer.

    Please ensure your OMS is successfully upgraded with Oracle Enterprise Manager Cloud Control 13c Release 4.

    => this is in production for a long time, so the problem don't come from this side I think

    Moreover, verify the patch deploy log to ensure there were no runtime errors.

    => where I can find the deploy.log?


    I can see when I'm going through the simple database configuration report on the data/log/grafana.log this log:

    t=2020-10-20T09:38:03+0200 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=POST path=/api/datasources/proxy/1/em/websvcs/restful/grafana/v1/query status=500 remote_addr=193.XX.XX.XX time_ms=1715 size=15 referer="h t t p : / / YYYYYYY: 3000/d/RgIl4w5Mk/sample-database-configuration-report?orgId=1"

    t=2020-10-20T09:38:03+0200 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=POST path=/api/datasources/proxy/1/em/websvcs/restful/grafana/v1/query status=500 remote_addr=193.XX.XX.XX time_ms=1907 size=15 referer="h t t p : / / YYYYYYY : 3000/d/RgIl4w5Mk/sample-database-configuration-report?orgId=1"



    Any idea?

  • ganessub-Oracle
    ganessub-Oracle Member Posts: 39 Employee

    Hello User_096FN,

    Error messages in emoms.log messages which you have posted earlier tells me that you have not upgraded your OMS of EM with latest patch. Kindly download and upgrade your EM with latest patch available.


    Also run the below 2 commands and post the result please.

    1.OMS Patch: Issue this command to find the effective PSU level of the EM 13c OMS:

    <OMS Oracle Home>/OPatch/opatch lsinventory | grep -i 'EMBP Patch Set Update'

    2.Plugin patch: Issue the following:

    <OMS Oracle Home>/OPatch/opatch lsinventory | grep -i 'Plugin Bundle Patch'


    Thanks,

    Ganesh

    Ankit G-Oracle
  • User_O96FN
    User_O96FN Member Posts: 3 Red Ribbon
    edited Nov 12, 2020 9:55AM

    Hi Ganesh,


    You were right, we had not the latest patch. Now it work's perfectly.

    I have now one question about Oracle licencing.

    When I see the configuration screen, for example we have this query about initialization parameters:

    "select o.name as "Parameter",

                         o.value as "Value"

                    from sysman.mgmt$db_init_params o

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

                     and o.isdefault = 'FALSE'

                     order by name asc"


    The problem is this view is part of the « Database Lifecycle Management Pack for Oracle Database ". So for my understanding, if you use this screen, you will trigger this option. So ok, I saw this query and could create my own dashboards.

    But how to be sure that grafana is not using hidden query with view which are under this pack?

  • F3D3HRV
    F3D3HRV Member Posts: 3 Blue Ribbon
    edited Dec 29, 2020 4:59PM

    Hi,

    I've just installed the grafana plugin and configured on OMS, I can create the new datasource, It tests OK for both OMS and repository. But when I go and try one of the sample dashboards (performance), I get no databases, only "none", after selecting EM, target_type: oracle_database. I tried editing one of the panels and modifying the query, on the "series" I leave all as is, and in the target dropdown, I get 3 options besides de var name: perfdb, database, Oemrep_Database and if I select any of those I get the error:

    Bad Request Reference Id : A : You dont have permission to view any target for targetType:oracle_database

    And console log for grafana:

    t=2020-12-29T13:45:28-0300 lvl=info msg="Request Completed" logger=context userId=25 orgId=2 uname=XXXXX method=POST path=/api/datasources/proxy/44/em/websvcs/restful/grafana/v1/namedcreds status=400 remote_addr=XXX.XXX.XXX.XXX time_ms=108 size=105 referer="https://lxdevopsdesa01.ar.bsch:4443/d/kJnWHlbGz/template-single-em-single-target-type-single-target-name-single-named-credential?orgId=2"

    I have OEM 13.4.0.8, grafana plugin 2.0.0 installed on grafana 7.1.5. Also the DS is configured with SYSMAN and named credentials that I use to access the performance views without problems.


    This plugin only works with Grafana Enterprise?? I just saw it only referenced as "grafana enterprise" in the "Before you begin" section of https://docs.oracle.com/en/enterprise-manager/cloud-control/enterprise-manager-cloud-control/13.4/emgrf/you-begin.html, anywhere else it states only "grafana".


    Regards,

  • ganessub-Oracle
    ganessub-Oracle Member Posts: 39 Employee

    No Grafana Enterprise is not required. It seems to me purely permission issue. Few things to check:

    1. In the Datasource whichever user id and password you set, can you try to use the same to login to your EM site URL and check in the All Targets Or Database page whether you are able to view data of database targets without any issues.
    2. Login to EM site as SYSMAN and From the Setup menu, select Security, then select Administrators. Click on the user id which was configured in the Grafana's Datasource and ensure View Target permission is given to those targets of oracle_database.
  • F3D3HRV
    F3D3HRV Member Posts: 3 Blue Ribbon

    Hi,

    I've used SYSMAN as login username, and enabled the repository named credential the same we user with sysman, the DS "save and test" button returns "OK" so it seems that it is working, and sysman has all the permissions necesary for it to work.

  • F3D3HRV
    F3D3HRV Member Posts: 3 Blue Ribbon


    2020-12-29 14:49:00,871 [[ACTIVE] ExecuteThread: '50' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR em.Grafana logp.251 - Error while getting metricgroups operation: You dont have permission to view any target for targetType:oracle_database

    java.lang.Exception: You dont have permission to view any target for targetType:oracle_database

    at oracle.sysman.db.restfulapi.metric.MetricService.validateTargets(MetricService.java:656)

    at oracle.sysman.db.restfulapi.metric.MetricService.validateTargets(MetricService.java:640)

    at oracle.sysman.db.restfulapi.metric.MetricService.fetchMetricGroups(MetricService.java:694)

    at oracle.sysman.db.restfulapi.grafana.GrafanaController.fetchMetricGroups(GrafanaController.java:429)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:498)

    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)

    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)

    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)

    at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)

    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)

    at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)

    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)

    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)

    at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)

    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)

    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)

    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)

    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)

    at org.glassfish.jersey.internal.Errors.process(Errors.java:267)

    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)

    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)

    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)

    at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)

    at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)

    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)

    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)

    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)

    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:286)

    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)

    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)

    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:350)

    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)

    at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:371)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)

    at weblogic.websocket.tyrus.TyrusServletFilter.doFilter(TyrusServletFilter.java:274)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)

    at oracle.sysman.eml.app.MBeanServerConnFilter.doFilter(MBeanServerConnFilter.java:43)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)

    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:169)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)

    at oracle.sysman.emInternalSDK.core.model.utils.EntityManagerFilter.doFilter(EntityManagerFilter.java:46)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)

    at oracle.sysman.emWebservices.inbound.restful.RestfulAuthServletFilter.doFilter(RestfulAuthServletFilter.java:223)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)

    at oracle.sysman.emx.service.restful.MpcuiAuthServletFilter.doFilter(MpcuiAuthServletFilter.java:135)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)

    at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:575)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)

    at oracle.adfinternal.view.faces.caching.filter.AdfFacesCachingFilterImpl.doFilter(AdfFacesCachingFilterImpl.java:134)

    at oracle.adf.view.rich.webapp.AdfFacesCachingFilter.doFilter(AdfFacesCachingFilter.java:66)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)

    at oracle.security.jps.ee.http.JpsAbsFilter$3.run(JpsAbsFilter.java:174)

    at java.security.AccessController.doPrivileged(Native Method)

    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)

    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:650)

    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:112)

    at oracle.security.jps.ee.http.JpsAbsFilter.doFilterInternal(JpsAbsFilter.java:292)

    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:149)

    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:94)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)

    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:248)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)

    at oracle.jrf.servlet.ExtensibleGlobalFilter.doFilter(ExtensibleGlobalFilter.java:92)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)

    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:32)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)

    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3706)

    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3672)

    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:328)

    at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)

    at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)

    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)

    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2443)

    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2291)

    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2269)

    at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1705)

    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1665)

    at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:272)

    at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)

    at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)

    at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)

    at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)

    at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:652)

    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:420)

    at weblogic.work.ExecuteThread.run(ExecuteThread.java:360)

  • User_9W2JY
    User_9W2JY Member Posts: 3 Green Ribbon

    Hello,

    I am new to Oracle environment and was trying to use this OEM app for Grafana.

    followed the steps on how to install the oem app and enable them from both grafana and also from the OEM itself. Unfortunately faced a problem when I was trying out one of the sample Dashboards (Sample-Database Performance Report). It gives out this error (screenshot below):

    Also, I tried to use the explore feature in Grafana, to try out some of the data, but it seems like there are no data there.

    Is there something wrong with my browser or i missed anything?

    In the datasource, I set the authentication as sysman, so the oem privilege should not be a problem right?


    Thank you in advance.

  • ganessub-Oracle
    ganessub-Oracle Member Posts: 39 Employee

    If you see the TargetType dropdown on your 2nd screenshot has [object Object]...which tells me that your OMS version and the version of OEM app for Grafana plugin is not compatible. Please ensure that both server(OMS) and client(Grafana plugin) are compatible(refer compatibility matrix in the Grafana plugin download page). Can you check and tell at what RU Level your OEM is at?

    Murtaza Husain-Oracle