Forum Stats

  • 3,826,357 Users
  • 2,260,635 Discussions
  • 7,896,916 Comments

Discussions

Oracle Enterprise Manager App for Grafana

Rob Fish
Rob Fish Member Posts: 23 Blue Ribbon

I am trying to install the OEM Plug-in for Grafana and it's not showing up on the Grafana plug-in after the plug-in has been installed. I have used the grafana-cli to install the plug-in. I have stopped/restarted grafana and updated teh defaults.ini file as well. Am I missing something here? Hopefully something simply :) Grafana version 8.3.6


13:18:28 [[email protected]:1 ~]

# date

Fri May 6 13:18:37 UTC 2022

13:18:37 [[email protected]:1 ~]

# grafana-cli --pluginUrl /home/SZ1Q/V1020218-01.zip plugins install oracle-emcc-app

✔ Downloaded oracle-emcc-app v3.0.0 zip successfully

Please restart Grafana after installing plugins. Refer to Grafana documentation for instructions if necessary.

13:18:44 [[email protected]:1 ~]

# grafana-cli plugins ls

installed plugins:

oracle-emcc-app @ 3.0.0

Please restart Grafana after installing plugins. Refer to Grafana documentation for instructions if necessary.

13:21:56 [[email protected]:1 /usr/share/grafana/conf]

# grafana-cli -v

Grafana CLI version 8.3.6

Answers

  • User_M4BS6
    User_M4BS6 Member Posts: 3 Employee

    Upon checking your log files, do you find the following two lines that might indicate a problem with loading the plugin when you restart the Grafana server?


    WARN [...] Skipping loading plugin due to problem with signature logger=plugin.loader pluginID=oracle-emcc-datasource status=unsigned
    WARN [...] Skipping loading plugin due to problem with signature logger=plugin.loader pluginID=oracle-emcc-app status=unsigned
    


    If you see the above in your logs, would you mind sharing the changes you made to the defaults.ini to enable the plugin? I assume the below documentation was followed.

    As a final step, you could explore the alternative method if the config file is modified correctly, by setting the environment variable to the same values as suggested under the "Alternate Method" section.



  • Rob Fish
    Rob Fish Member Posts: 23 Blue Ribbon

    This is the only line I changed in the defaults.ini file;

    17:02:33 [[email protected]adba1t2h:1 /usr/share/grafana/conf]

    # cat defaults.ini|grep oracle

    allow_loading_unsigned_plugins = oracle-emcc-app,oracle-emcc-datasource


    Here is the /var/log/grafana/grafana.log file;

    17:07:48 [[email protected]:1 /usr/share/grafana]

    # cat /var/log/grafana/grafana.log

    t=2022-05-06T13:00:37+0000 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/live/ws status=0 remote_addr=10.47.114.27 time_ms=3 size=0 referer=

    t=2022-05-06T13:00:49+0000 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/gnet/plugins status=502 remote_addr=10.47.114.27 time_ms=30 size=0 referer=http://xoradba1t2h.opr.test.statefarm.org:3000/plugins

    t=2022-05-06T13:05:12+0000 lvl=info msg="Shutdown started" logger=server reason="System signal: terminated"

    t=2022-05-06T13:08:09+0000 lvl=info msg="The state of unified alerting is still not defined. The decision will be made during as we run the database migrations" logger=settings

    t=2022-05-06T13:08:09+0000 lvl=warn msg="falling back to legacy setting of 'min_interval_seconds'; please use the configuration option in the `unified_alerting` section if Grafana 8 alerts are enabled." logger=settings

    t=2022-05-06T13:08:09+0000 lvl=info msg="Config loaded from" logger=settings file=/usr/share/grafana/conf/defaults.ini

    t=2022-05-06T13:08:09+0000 lvl=info msg="Config loaded from" logger=settings file=/etc/grafana/grafana.ini

    t=2022-05-06T13:08:09+0000 lvl=info msg="Config overridden from command line" logger=settings arg="default.paths.data=/var/lib/grafana"

    t=2022-05-06T13:08:09+0000 lvl=info msg="Config overridden from command line" logger=settings arg="default.paths.logs=/var/log/grafana"

    t=2022-05-06T13:08:09+0000 lvl=info msg="Config overridden from command line" logger=settings arg="default.paths.plugins=/var/lib/grafana/plugins"

    t=2022-05-06T13:08:09+0000 lvl=info msg="Config overridden from command line" logger=settings arg="default.paths.provisioning=/etc/grafana/provisioning"

    t=2022-05-06T13:08:09+0000 lvl=info msg="Path Home" logger=settings path=/usr/share/grafana

    t=2022-05-06T13:08:09+0000 lvl=info msg="Path Data" logger=settings path=/var/lib/grafana

    t=2022-05-06T13:08:09+0000 lvl=info msg="Path Logs" logger=settings path=/var/log/grafana

    t=2022-05-06T13:08:09+0000 lvl=info msg="Path Plugins" logger=settings path=/var/lib/grafana/plugins

    t=2022-05-06T13:08:09+0000 lvl=info msg="Path Provisioning" logger=settings path=/etc/grafana/provisioning

    t=2022-05-06T13:08:09+0000 lvl=info msg="App mode production" logger=settings

    t=2022-05-06T13:08:09+0000 lvl=info msg="Connecting to DB" logger=sqlstore dbtype=sqlite3

    t=2022-05-06T13:08:09+0000 lvl=info msg="Starting DB migrations" logger=migrator

    t=2022-05-06T13:08:09+0000 lvl=info msg="migrations completed" logger=migrator performed=0 skipped=377 duration=633.528µs

    t=2022-05-06T13:08:09+0000 lvl=info msg="Initialising plugins" logger=plugin.manager

    t=2022-05-06T13:08:10+0000 lvl=info msg="Plugin registered" logger=plugin.manager pluginId=input

    t=2022-05-06T13:08:10+0000 lvl=info msg="Live Push Gateway initialization" logger=live.push_http

    t=2022-05-06T13:08:10+0000 lvl=info msg="Writing PID file" logger=server path=/var/run/grafana/grafana-server.pid pid=13927

    t=2022-05-06T13:08:10+0000 lvl=info msg="warming cache for startup" logger=ngalert

    t=2022-05-06T13:08:10+0000 lvl=info msg="starting MultiOrg Alertmanager" logger=ngalert.multiorg.alertmanager

    t=2022-05-06T13:08:10+0000 lvl=info msg="HTTP Server Listen" logger=http.server address=[::]:3000 protocol=http subUrl= socket=

    t=2022-05-06T13:10:17+0000 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/live/ws status=0 remote_addr=10.47.114.27 time_ms=1 size=0 referer=

    t=2022-05-06T13:10:28+0000 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/gnet/plugins status=502 remote_addr=10.47.114.27 time_ms=29 size=0 referer=http://xoradba1t2h.opr.test.statefarm.org:3000/plugins

  • Rob Fish
    Rob Fish Member Posts: 23 Blue Ribbon

    Also, I exported the value of GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS. This didn't help either.

    17:07:56 [[email protected]:1 /usr/share/grafana]

    # export GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=oracle-emcc-app,oracle-emcc-datasource

  • User_M4BS6
    User_M4BS6 Member Posts: 3 Employee

    Based on the provided logs, I see the plugin is not getting picked up by Grafana. From the logs, I can see that the path plugins is /var/lib/grafana/plugins. What are the folders/files under that directory? The expectation is that a folder named "oracle-emcc-app" should be present at that location after installation.

    The logs should have a line similar to the following once the plugin is recognized and registered by Grafana during startup of the server

    WARN[...] Permitting unsigned plugin. This is not recommended logger=plugin.signature.validator pluginID=oracle-emcc-datasource 
    
  • Rob Fish
    Rob Fish Member Posts: 23 Blue Ribbon

    20:13:34 [[email protected]:1 ~]

    # cd /var/lib/grafana/plugins/

    20:13:45 [[email protected]:1 /var/lib/grafana/plugins]

    # ls -tlr

    total 0

    drwx------. 6 root root 143 May 6 13:18 oracle-emcc-app

    20:13:47 [[email protected]:1 /var/lib/grafana/plugins]

    # cd oracle-emcc-app/

    20:13:55 [[email protected]:1 /var/lib/grafana/plugins/oracle-emcc-app]

    # ls -ltr

    total 20

    -rw-------. 1 root root 1559 May 6 13:18 README.md

    -rw-------. 1 root root 2583 May 6 13:18 plugin.json

    -rw-------. 1 root root 501 May 6 13:18 module.js

    -rw-------. 1 root root 1866 May 6 13:18 LICENSE.txt

    drwx------. 2 root root  25 May 6 13:18 img

    drwx------. 3 root root  39 May 6 13:18 components

    drwx------. 4 root root 274 May 6 13:18 datasource

    drwx------. 2 root root 4096 May 6 13:18 dashboards

    20:13:57 [[email protected]:1 /var/lib/grafana/plugins/oracle-emcc-app]

  • User_M4BS6
    User_M4BS6 Member Posts: 3 Employee

    The folder is there as expected with the files as expected... I am not sure why during startup Grafana is not recognizing the plugin in the plugins folder...

    I just tested it locally with brand new server instance of v8.3.6 with plugin v3 and it was picked up immediately.


    What method of installation did you use to install the Grafana server?

  • Rob Fish
    Rob Fish Member Posts: 23 Blue Ribbon

    This is how I installed the Grafana server;


    sudo yum install grafana-8.3.6-1.x86_64.rpm

  • Rob Fish
    Rob Fish Member Posts: 23 Blue Ribbon

    This is the output when I check the status of Grafana;


    # systemctl status grafana-server

    ● grafana-server.service - Grafana instance

      Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; disabled; vendor preset: disabled)

      Active: active (running) since Fri 2022-05-06 17:18:25 UTC; 2 days ago

         Docs: http://docs.grafana.org

     Main PID: 107881 (grafana-server)

      Memory: 41.7M

      CGroup: /system.slice/grafana-server.service

          └─107881 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid --packaging=rpm cfg:default....


    Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.