4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Grafana Oracle Telemetry Streaming PluginをインストールしてAutonomous AI Databaseに接続してみた

4
Last updated at Posted at 2026-05-27

はじめに

Grafana Oracle Telemetry Streaming Pluginを使用して、GrafanaからAutonomous AI Databaseに接続してSQLを実行する手順を検証してみました。

注意
こちらの記事の内容はあくまで個人のメモ的な内容のため、こちらの内容を利用した場合のトラブルには一切責任を負いません。
また、こちらの記事の内容を元にしたOracleサポートへの問い合わせはご遠慮ください。

1. 必要なパッケージ、ツールのインストールと設定

<フロントエンド>
・nvm
nvmのインストール

[opc@grafana ~]$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 16774  100 16774    0     0  1092k      0 --:--:-- --:--:-- --:--:-- 1092k
=> Downloading nvm as script to '/home/opc/.nvm'

=> Appending nvm source string to /home/opc/.bashrc
=> Appending bash_completion source string to /home/opc/.bashrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
[opc@grafana ~]$

環境変数の設定

[opc@grafana ~]$ export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
[opc@grafana ~]$

・Node.js
Node.jsのインストール

[opc@grafana ~]$ nvm install 16
Downloading and installing node v16.20.2...
Downloading https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-x64.tar.xz...
######################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v16.20.2 (npm v8.19.4)
Creating default alias: default -> 16 (-> v16.20.2 *)
[opc@grafana ~]$

・Yarn
yarnのインストール

[opc@grafana ~]$ npm install yarn -g

added 1 package, and audited 2 packages in 458ms

found 0 vulnerabilities
[opc@grafana ~]$

yarnのバージョンの確認

[opc@grafana ~]$ yarn --version
1.22.22
[opc@grafana ~]$

<バックエンド>
・Go
Goのインストール

[opc@grafana ~]$ sudo dnf install -y go-toolset
Ksplice for Oracle Linux 9 (x86_64)              69 MB/s |  23 MB     00:00    
Oracle Linux 9 OCI Included Packages (x86_64)    46 MB/s | 228 MB     00:04    
Oracle Linux 9 BaseOS Latest (x86_64)            75 MB/s | 122 MB     00:01    
Oracle Linux 9 Application Stream Packages (x86  74 MB/s |  90 MB     00:01    
Oracle Linux 9 Addons (x86_64)                  572 kB/s | 866 kB     00:01    
Oracle Linux 9 UEK Release 8 (x86_64)            73 MB/s |  42 MB     00:00    
Last metadata expiration check: 0:00:01 ago on Thu 21 May 2026 01:31:50 AM GMT.
Dependencies resolved.
================================================================================
 Package          Arch        Version                  Repository          Size
================================================================================
Installing:
 go-toolset       x86_64      1.25.9-1.0.1.el9_7       ol9_appstream      9.6 k
Installing dependencies:
 delve            x86_64      1.25.2-2.0.1.el9_7       ol9_appstream      5.6 M
 golang           x86_64      1.25.9-1.0.1.el9_7       ol9_appstream      1.3 M
 golang-bin       x86_64      1.25.9-1.0.1.el9_7       ol9_appstream       37 M
 golang-race      x86_64      1.25.9-1.0.1.el9_7       ol9_appstream      1.7 M
 golang-src       noarch      1.25.9-1.0.1.el9_7       ol9_appstream       16 M

Transaction Summary
================================================================================
Install  6 Packages

Total download size: 61 M
Installed size: 198 M
Downloading Packages:
(1/6): go-toolset-1.25.9-1.0.1.el9_7.x86_64.rpm  86 kB/s | 9.6 kB     00:00    
(2/6): golang-1.25.9-1.0.1.el9_7.x86_64.rpm     8.1 MB/s | 1.3 MB     00:00    
(3/6): delve-1.25.2-2.0.1.el9_7.x86_64.rpm       21 MB/s | 5.6 MB     00:00    
(4/6): golang-race-1.25.9-1.0.1.el9_7.x86_64.rp 7.8 MB/s | 1.7 MB     00:00    
(5/6): golang-src-1.25.9-1.0.1.el9_7.noarch.rpm  34 MB/s |  16 MB     00:00    
(6/6): golang-bin-1.25.9-1.0.1.el9_7.x86_64.rpm  37 MB/s |  37 MB     00:00    
--------------------------------------------------------------------------------
Total                                            55 MB/s |  61 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Running scriptlet: golang-1.25.9-1.0.1.el9_7.x86_64                       1/1 
  Preparing        :                                                        1/1 
  Installing       : golang-src-1.25.9-1.0.1.el9_7.noarch                   1/6 
  Installing       : golang-bin-1.25.9-1.0.1.el9_7.x86_64                   2/6 
  Installing       : golang-race-1.25.9-1.0.1.el9_7.x86_64                  3/6 
  Installing       : golang-1.25.9-1.0.1.el9_7.x86_64                       4/6 
  Installing       : delve-1.25.2-2.0.1.el9_7.x86_64                        5/6 
  Installing       : go-toolset-1.25.9-1.0.1.el9_7.x86_64                   6/6 
  Running scriptlet: go-toolset-1.25.9-1.0.1.el9_7.x86_64                   6/6 
  Verifying        : delve-1.25.2-2.0.1.el9_7.x86_64                        1/6 
  Verifying        : go-toolset-1.25.9-1.0.1.el9_7.x86_64                   2/6 
  Verifying        : golang-1.25.9-1.0.1.el9_7.x86_64                       3/6 
  Verifying        : golang-bin-1.25.9-1.0.1.el9_7.x86_64                   4/6 
  Verifying        : golang-race-1.25.9-1.0.1.el9_7.x86_64                  5/6 
  Verifying        : golang-src-1.25.9-1.0.1.el9_7.noarch                   6/6 

Installed:
  delve-1.25.2-2.0.1.el9_7.x86_64         go-toolset-1.25.9-1.0.1.el9_7.x86_64  
  golang-1.25.9-1.0.1.el9_7.x86_64        golang-bin-1.25.9-1.0.1.el9_7.x86_64  
  golang-race-1.25.9-1.0.1.el9_7.x86_64   golang-src-1.25.9-1.0.1.el9_7.noarch  

Complete!
[opc@grafana ~]$ 

インストールされたGoのバージョンの確認

[opc@grafana ~]$ go version
go version go1.25.9 (Red Hat 1.25.9-1.0.1.el9_7) linux/amd64
[opc@grafana ~]$ 

・Oracle Instant Client
Oracle Linuxリリース・パッケージのインストール(Oracle Instant Clientのリポジトリを定義)

[opc@grafana ~]$ sudo dnf install -y oracle-instantclient-release-26ai-el9
Last metadata expiration check: 0:01:19 ago on Thu 21 May 2026 01:31:50 AM GMT.
Dependencies resolved.
================================================================================
 Package                               Arch   Version   Repository         Size
================================================================================
Installing:
 oracle-instantclient-release-26ai-el9 x86_64 1.0-6.el9 ol9_baseos_latest  14 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 14 k
Installed size: 18 k
Downloading Packages:
oracle-instantclient-release-26ai-el9-1.0-6.el9 102 kB/s |  14 kB     00:00    
--------------------------------------------------------------------------------
Total                                           101 kB/s |  14 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : oracle-instantclient-release-26ai-el9-1.0-6.el9.x86_   1/1 
  Verifying        : oracle-instantclient-release-26ai-el9-1.0-6.el9.x86_   1/1 

Installed:
  oracle-instantclient-release-26ai-el9-1.0-6.el9.x86_64                        

Complete!
[opc@grafana ~]$ 

Oracle Instant Clinetのインストール

[opc@grafana ~]$ sudo dnf install -y oracle-instantclient-basic oracle-instantclient-sqlplus
Oracle Instant Client 26 for Oracle Linux 9 - L 391 kB/s |  22 kB     00:00    
Dependencies resolved.
================================================================================
 Package              Arch   Version           Repository                  Size
================================================================================
Installing:
 oracle-instantclient-basic
                      x86_64 23.26.2.0.0-1.el9 ol9_oracle_instantclient26  80 M
 oracle-instantclient-sqlplus
                      x86_64 23.26.2.0.0-1.el9 ol9_oracle_instantclient26 3.9 M

Transaction Summary
================================================================================
Install  2 Packages

Total download size: 84 M
Installed size: 362 M
Downloading Packages:
(1/2): oracle-instantclient-sqlplus-23.26.2.0.0 8.9 MB/s | 3.9 MB     00:00    
(2/2): oracle-instantclient-basic-23.26.2.0.0-1  48 MB/s |  80 MB     00:01    
--------------------------------------------------------------------------------
Total                                            50 MB/s |  84 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : oracle-instantclient-basic-23.26.2.0.0-1.el9.x86_64    1/2 
  Running scriptlet: oracle-instantclient-basic-23.26.2.0.0-1.el9.x86_64    1/2 
  Installing       : oracle-instantclient-sqlplus-23.26.2.0.0-1.el9.x86_6   2/2 
  Running scriptlet: oracle-instantclient-sqlplus-23.26.2.0.0-1.el9.x86_6   2/2 
  Verifying        : oracle-instantclient-basic-23.26.2.0.0-1.el9.x86_64    1/2 
  Verifying        : oracle-instantclient-sqlplus-23.26.2.0.0-1.el9.x86_6   2/2 

Installed:
  oracle-instantclient-basic-23.26.2.0.0-1.el9.x86_64                           
  oracle-instantclient-sqlplus-23.26.2.0.0-1.el9.x86_64                         

Complete!
[opc@grafana ~]$ 

環境変数の設定
・LD_LIBRARY_PATH

[opc@grafana ~]$ echo 'export LD_LIBRARY_PATH=/usr/lib/oracle/23/client64/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
[opc@grafana ~]$

・TNS_ADMIN

[opc@grafana ~]$ echo 'export TNS_ADMIN=/usr/lib/oracle/23/client64/lib/network/admin' >> ~/.bashrc
[opc@grafana ~]$

.bashrcを実行

[opc@grafana ~]$ source ~/.bashrc 
[opc@grafana ~]$

環境変数の確認

[opc@grafana ~]$ echo $LD_LIBRARY_PATH
/usr/lib/oracle/23/client64/lib:
[opc@grafana ~]$ echo $TNS_ADMIN
/usr/lib/oracle/23/client64/lib/network/admin
[opc@grafana ~]$

・Git
Gitのインストール

[opc@grafana ~]$ sudo dnf install -y git
Last metadata expiration check: 0:01:52 ago on Thu 21 May 2026 01:33:38 AM GMT.
Dependencies resolved.
================================================================================
 Package              Arch       Version                Repository         Size
================================================================================
Installing:
 git                  x86_64     2.47.3-1.el9_6         ol9_appstream      65 k
Installing dependencies:
 git-core             x86_64     2.47.3-1.el9_6         ol9_appstream     4.7 M
 git-core-doc         noarch     2.47.3-1.el9_6         ol9_appstream     4.1 M
 perl-DynaLoader      x86_64     1.47-481.1.el9_6       ol9_appstream      24 k
 perl-Error           noarch     1:0.17029-7.el9        ol9_appstream      57 k
 perl-File-Find       noarch     1.37-481.1.el9_6       ol9_appstream      24 k
 perl-Git             noarch     2.47.3-1.el9_6         ol9_appstream      42 k
 perl-TermReadKey     x86_64     2.38-11.el9            ol9_appstream      42 k

Transaction Summary
================================================================================
Install  8 Packages

Total download size: 9.1 M
Installed size: 40 M
Downloading Packages:
(1/8): git-2.47.3-1.el9_6.x86_64.rpm            218 kB/s |  65 kB     00:00    
(2/8): git-core-doc-2.47.3-1.el9_6.noarch.rpm   8.1 MB/s | 4.1 MB     00:00    
(3/8): git-core-2.47.3-1.el9_6.x86_64.rpm       8.5 MB/s | 4.7 MB     00:00    
(4/8): perl-DynaLoader-1.47-481.1.el9_6.x86_64.  83 kB/s |  24 kB     00:00    
(5/8): perl-File-Find-1.37-481.1.el9_6.noarch.r 269 kB/s |  24 kB     00:00    
(6/8): perl-TermReadKey-2.38-11.el9.x86_64.rpm  369 kB/s |  42 kB     00:00    
(7/8): perl-Error-0.17029-7.el9.noarch.rpm      147 kB/s |  57 kB     00:00    
(8/8): perl-Git-2.47.3-1.el9_6.noarch.rpm       119 kB/s |  42 kB     00:00    
--------------------------------------------------------------------------------
Total                                           9.6 MB/s | 9.1 MB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : git-core-2.47.3-1.el9_6.x86_64                         1/8 
  Installing       : git-core-doc-2.47.3-1.el9_6.noarch                     2/8 
  Installing       : perl-File-Find-1.37-481.1.el9_6.noarch                 3/8 
  Installing       : perl-Error-1:0.17029-7.el9.noarch                      4/8 
  Installing       : perl-DynaLoader-1.47-481.1.el9_6.x86_64                5/8 
  Installing       : perl-TermReadKey-2.38-11.el9.x86_64                    6/8 
  Installing       : perl-Git-2.47.3-1.el9_6.noarch                         7/8 
  Installing       : git-2.47.3-1.el9_6.x86_64                              8/8 
  Running scriptlet: git-2.47.3-1.el9_6.x86_64                              8/8 
  Verifying        : git-2.47.3-1.el9_6.x86_64                              1/8 
  Verifying        : git-core-2.47.3-1.el9_6.x86_64                         2/8 
  Verifying        : git-core-doc-2.47.3-1.el9_6.noarch                     3/8 
  Verifying        : perl-DynaLoader-1.47-481.1.el9_6.x86_64                4/8 
  Verifying        : perl-Error-1:0.17029-7.el9.noarch                      5/8 
  Verifying        : perl-File-Find-1.37-481.1.el9_6.noarch                 6/8 
  Verifying        : perl-Git-2.47.3-1.el9_6.noarch                         7/8 
  Verifying        : perl-TermReadKey-2.38-11.el9.x86_64                    8/8 

Installed:
  git-2.47.3-1.el9_6.x86_64            git-core-2.47.3-1.el9_6.x86_64           
  git-core-doc-2.47.3-1.el9_6.noarch   perl-DynaLoader-1.47-481.1.el9_6.x86_64  
  perl-Error-1:0.17029-7.el9.noarch    perl-File-Find-1.37-481.1.el9_6.noarch   
  perl-Git-2.47.3-1.el9_6.noarch       perl-TermReadKey-2.38-11.el9.x86_64      

Complete!
[opc@grafana ~]$ 

2. Gitリポジトリのクローン

git cloneコマンドでプラグインのリポジトリをクローン

[opc@grafana ~]$ git clone https://github.com/oracle-samples/oracle-telemetry-streaming.git
Cloning into 'oracle-telemetry-streaming'...
remote: Enumerating objects: 203, done.
remote: Counting objects: 100% (203/203), done.
remote: Compressing objects: 100% (155/155), done.
remote: Total 203 (delta 80), reused 108 (delta 38), pack-reused 0 (from 0)
Receiving objects: 100% (203/203), 1.61 MiB | 27.99 MiB/s, done.
Resolving deltas: 100% (80/80), done.
[opc@grafana ~]$

クローンされたリポジトリを確認

[opc@grafana ~]$ ls -l
total 4
drwxr-xr-x. 9 opc opc 4096 May 21 01:36 oracle-telemetry-streaming
[opc@grafana ~]$

クローンされたリポジトリのディレクトリに移動

[opc@grafana ~]$ cd oracle-telemetry-streaming
[opc@grafana oracle-telemetry-streaming]$

リポジトリの内容を確認

[opc@grafana oracle-telemetry-streaming]$ ls
CHANGELOG.md     go.sum          Magefile.go   src
CONTRIBUTING.md  img             package.json  THIRD_PARTY_LICENSES.txt
coverage         jest.config.js  pkg           tsconfig.json
docs             LICENSE         README.md     yarn-error.log
go.mod           LICENSE.txt     SECURITY.md   yarn.lock
[opc@grafana oracle-telemetry-streaming]$

3. プロジェクトのビルド

<フロントエンド>
yarn installコマンドでプロジェクトの依存関係をインストール

[opc@grafana oracle-telemetry-streaming]$ yarn install
yarn install v1.22.22
warning ../package.json: No license field
warning Resolution field "@inquirer/*" does not end with a valid package name and will be ignored
warning Resolution field "@jest/*" does not end with a valid package name and will be ignored
[1/5] Validating package.json...
warning Resolution field "@inquirer/*" does not end with a valid package name and will be ignored
warning Resolution field "@jest/*" does not end with a valid package name and will be ignored
[2/5] Resolving packages...
warning Resolution field "pretty-format@26.6.2" is incompatible with requested version "pretty-format@^27.0.2"
warning Resolution field "rxjs@7.3.0" is incompatible with requested version "rxjs@^6.6.0"
warning Resolution field "rxjs@7.3.0" is incompatible with requested version "rxjs@7.5.5"
warning Resolution field "rxjs@7.3.0" is incompatible with requested version "rxjs@7.5.5"
warning Resolution field "rxjs@7.3.0" is incompatible with requested version "rxjs@7.5.5"
warning Resolution field "inquirer@7.3.3" is incompatible with requested version "inquirer@^8.0.0"
warning Resolution field "jest-diff@26.6.2" is incompatible with requested version "jest-diff@^27.0.0"
warning Resolution field "pretty-format@26.6.2" is incompatible with requested version "pretty-format@^27.0.0"
warning Resolution field "rxjs@7.3.0" is incompatible with requested version "rxjs@^6.6.3"
warning Resolution field "expect@26.6.2" is incompatible with requested version "expect@^30.0.0"
warning Resolution field "pretty-format@26.6.2" is incompatible with requested version "pretty-format@^30.0.0"
warning Resolution field "pretty-format@26.6.2" is incompatible with requested version "pretty-format@^27.0.2"
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning " > styled-components@5.3.11" has unmet peer dependency "react-is@>= 16.8.0".
warning "styled-components > babel-plugin-styled-components > @babel/plugin-syntax-jsx@7.28.6" has unmet peer dependency "@babel/core@^7.0.0-0".
[5/5] Building fresh packages...
Done in 43.06s.
[opc@grafana oracle-telemetry-streaming]$

yarn devコマンドでアプリケーションを開発モードで実行

[opc@grafana oracle-telemetry-streaming]$ yarn dev
yarn run v1.22.22
warning ../package.json: No license field
$ grafana-toolkit plugin:dev
✔ Linting
⠴ Bundling plugin in dev mode  
   Hash: a128f42addc1a03e093d
  Version: webpack 4.41.5
  Time: 12203ms
  Built at: 05/22/2026 5:18:10 AM
          Asset       Size  Chunks                   Chunk Names
   CHANGELOG.md   53 bytes          [emitted]        
        LICENSE   11.1 KiB          [emitted]        
      README.md   7.61 KiB          [emitted]        
   img/logo.svg   6.05 KiB          [emitted]        
       logo.svg   8.77 KiB          [emitted]        
      module.js    190 KiB  module  [emitted]        module
  module.js.map    182 KiB  module  [emitted] [dev]  module
    plugin.json  958 bytes          [emitted]        
  Entrypoint module = module.js module.js.map
  [../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js] 4.45 KiB {module} [built]
  [../node_modules/styled-components/dist/styled-components.browser.esm.js] 26.3 KiB {module} [built]
  [../node_modules/tslib/tslib.es6.js] 18.8 KiB {module} [built]
  [./AddLabelToQuery.ts] 6.1 KiB {module} [built]
  [./ConfigEditor.tsx] 12.4 KiB {module} [built]
  [./QueryEditor.tsx] 24 KiB {module} [built]
  [./VariableQueryEditor.tsx] 4.09 KiB {module} [built]
  [./datasource.ts] 25.1 KiB {module} [built]
  [./module.ts] 1.83 KiB {module} [built]
  [./styles.ts] 3.91 KiB {module} [built]
  [@grafana/data] external "@grafana/data" 42 bytes {module} [built]
  [@grafana/runtime] external "@grafana/runtime" 42 bytes {module} [built]
  [@grafana/ui] external "@grafana/ui" 42 bytes {module} [built]
  [lodash] external "lodash" 42 bytes {module} [built]
  [react] external "react" 42 bytes {module} [built]
      + 8 hidden modules 
  
✔ Bundling plugin in dev mode
Done in 18.61s.
[opc@grafana oracle-telemetry-streaming]$ 

yarn testコマンドでテストスクリプトを実行

[opc@grafana oracle-telemetry-streaming]$ yarn test
yarn run v1.22.22
warning ../package.json: No license field
$ grafana-toolkit plugin:test
 PASS  src/__tests__/datasource.test.ts
 PASS  src/__tests__/ConfigEditor.test.tsx (12.258 s)
 PASS  src/__tests__/QueryEditor.test.tsx
 PASS  src/__tests__/AddLabelToQuery.test.ts
 PASS  src/__tests__/VariableQueryEditor.test.tsx

Test Suites: 5 passed, 5 total
Tests:       52 passed, 52 total
Snapshots:   0 total
Time:        22.526 s
Ran all test suites with tests matching "".
✔ Running tests
Done in 24.40s.
[opc@grafana oracle-telemetry-streaming]$

yarn buildコマンドでフロントエンドのバイナリをビルド

[opc@grafana oracle-telemetry-streaming]$ yarn build
yarn run v1.22.22
warning ../package.json: No license field
$ grafana-toolkit plugin:build
  Using Node.js v16.20.2
  Using @grafana/toolkit v8.5.27
✔ Preparing
✔ Linting
 PASS  src/__tests__/ConfigEditor.test.tsx
 PASS  src/__tests__/datasource.test.ts
 PASS  src/__tests__/QueryEditor.test.tsx
 PASS  src/__tests__/VariableQueryEditor.test.tsx
 PASS  src/__tests__/AddLabelToQuery.test.ts

Test Suites: 5 passed, 5 total
Tests:       52 passed, 52 total
Snapshots:   0 total
Time:        7.726 s, estimated 22 s
Ran all test suites with tests matching "".
✔ Running tests
⠇ Compiling...  
   Hash: b654a12c6aed5e3d2d3c
  Version: webpack 4.41.5
  Time: 12722ms
  Built at: 05/22/2026 5:23:40 AM
                  Asset       Size  Chunks                   Chunk Names
           CHANGELOG.md   53 bytes          [emitted]        
                LICENSE   11.1 KiB          [emitted]        
              README.md   7.61 KiB          [emitted]        
           img/logo.svg   6.05 KiB          [emitted]        
               logo.svg   8.77 KiB          [emitted]        
              module.js   71.7 KiB       0  [emitted]        module
  module.js.LICENSE.txt  410 bytes          [emitted]        
          module.js.map    202 KiB       0  [emitted] [dev]  module
            plugin.json  958 bytes          [emitted]        
  Entrypoint module = module.js module.js.map
   [0] external "react" 42 bytes {0} [built]
   [1] external "@grafana/ui" 42 bytes {0} [built]
   [2] ../node_modules/styled-components/dist/styled-components.browser.esm.js 26.3 KiB {0} [built]
   [3] external "@grafana/runtime" 42 bytes {0} [built]
   [4] ../node_modules/react-is/index.js 196 bytes {0} [built]
   [5] external "lodash" 42 bytes {0} [built]
   [6] ../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js 2.68 KiB {0} [built]
   [7] ../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js + 1 modules 4.65 KiB {0} [built]
       | ../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js 4.45 KiB [built]
       | ../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js 202 bytes [built]
   [8] external "@grafana/data" 42 bytes {0} [built]
   [9] ../node_modules/shallowequal/index.js 979 bytes {0} [built]
  [10] ../node_modules/@emotion/stylis/dist/stylis.browser.esm.js 15.6 KiB {0} [built]
  [11] ../node_modules/@emotion/unitless/dist/unitless.browser.esm.js 899 bytes {0} [built]
  [12] ../node_modules/process/browser.js 5.29 KiB {0} [built]
  [13] ../node_modules/react-is/cjs/react-is.production.min.js 2.49 KiB {0} [built]
  [14] ./module.ts + 7 modules 96.1 KiB {0} [built]
       | ./module.ts 1.83 KiB [built]
       | ./datasource.ts 25.1 KiB [built]
       | ./ConfigEditor.tsx 12.4 KiB [built]
       | ./QueryEditor.tsx 24 KiB [built]
       | ./VariableQueryEditor.tsx 4.09 KiB [built]
       | ../node_modules/tslib/tslib.es6.js 18.8 KiB [built]
       | ./AddLabelToQuery.ts 6.1 KiB [built]
       | ./styles.ts 3.91 KiB [built] 
  
✔ Compiling...
Done in 27.01s.
[opc@grafana oracle-telemetry-streaming]$ 

<バックエンド>
go mod tidyコマンドで依存関係をインストール

[opc@grafana oracle-telemetry-streaming]$ go mod tidy
go: downloading github.com/grafana/grafana-plugin-sdk-go v0.102.0
go: downloading github.com/godror/godror v0.44.2
go: downloading github.com/stretchr/testify v1.8.4
go: downloading github.com/hashicorp/go-hclog v0.9.2
go: downloading github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
go: downloading github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
go: downloading github.com/hashicorp/go-plugin v1.2.2
go: downloading github.com/json-iterator/go v1.1.11
go: downloading github.com/prometheus/client_golang v1.10.0
go: downloading github.com/prometheus/common v0.23.0
go: downloading google.golang.org/grpc v1.77.0
go: downloading github.com/google/go-cmp v0.7.0
go: downloading github.com/mitchellh/reflectwalk v1.0.2
go: downloading github.com/apache/arrow/go/arrow v0.0.0-20210223225224-5bea62493d91
go: downloading github.com/cheekybits/genny v1.0.0
go: downloading github.com/mattetti/filebuffer v1.0.1
go: downloading github.com/olekukonko/tablewriter v0.0.5
go: downloading github.com/godror/knownpb v0.1.2
go: downloading github.com/UNO-SOFT/zlog v0.8.1
go: downloading github.com/go-logfmt/logfmt v0.6.0
go: downloading github.com/oklog/ulid/v2 v2.0.2
go: downloading golang.org/x/sync v0.19.0
go: downloading github.com/magefile/mage v1.11.0
go: downloading golang.org/x/sys v0.39.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading golang.org/x/net v0.48.0
go: downloading github.com/golang/protobuf v1.5.4
go: downloading github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d
go: downloading github.com/mitchellh/go-testing-interface v1.0.0
go: downloading github.com/oklog/run v1.0.0
go: downloading github.com/jhump/protoreflect v1.6.0
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading github.com/modern-go/reflect2 v1.0.1
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/prometheus/client_model v0.2.0
go: downloading github.com/prometheus/procfs v0.6.0
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading google.golang.org/genproto v0.0.0-20200911024640-645f7a48b24f
go: downloading github.com/google/flatbuffers v2.0.0+incompatible
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
go: downloading github.com/mattn/go-runewidth v0.0.9
go: downloading github.com/go-logr/logr v1.4.3
go: downloading golang.org/x/term v0.38.0
go: downloading go.opentelemetry.io/otel v1.38.0
go: downloading go.opentelemetry.io/otel/sdk/metric v1.38.0
go: downloading go.opentelemetry.io/otel/sdk v1.38.0
go: downloading go.opentelemetry.io/otel/metric v1.38.0
go: downloading go.opentelemetry.io/otel/trace v1.38.0
go: downloading golang.org/x/text v0.32.0
go: downloading github.com/go-logr/stdr v1.2.2
go: downloading go.opentelemetry.io/auto/sdk v1.2.1
go: downloading gonum.org/v1/gonum v0.16.0
go: downloading github.com/google/uuid v1.6.0
go: finding module for package github.com/DATA-DOG/go-sqlmock
go: downloading github.com/DATA-DOG/go-sqlmock v1.5.2
go: found github.com/DATA-DOG/go-sqlmock in github.com/DATA-DOG/go-sqlmock v1.5.2
[opc@grafana oracle-telemetry-streaming]$ 

go buildコマンドでバックエンドのバイナリをビルド

[opc@grafana oracle-telemetry-streaming]$ go build -o dist/gpx_oracle-telemetry_linux_amd64 ./pkg
[opc@grafana oracle-telemetry-streaming]$

実行ファイルの確認

[opc@grafana oracle-telemetry-streaming]$ ls -l dist
total 27056
-rwxr-xr-x. 1 opc opc 27701872 May 21 01:51 gpx_oracle-telemetry_linux_amd64
[opc@grafana oracle-telemetry-streaming]$ 

4. Grafanaのダウンロードと設定

ホームディレクトリに移動

[opc@grafana oracle-telemetry-streaming]$ cd
[opc@grafana ~]$ 

wgetコマンドでGrafanaをダウンロード

[opc@grafana ~]$ wget https://dl.grafana.com/grafana-enterprise/release/12.4.3+security-02/grafana-enterprise_12.4.3+security-02_25720634919_linux_amd64.tar.gz
--2026-05-21 01:56:19--  https://dl.grafana.com/grafana-enterprise/release/12.4.3+security-02/grafana-enterprise_12.4.3+security-02_25720634919_linux_amd64.tar.gz
Resolving dl.grafana.com (dl.grafana.com)... 151.101.198.217, 2a04:4e42:2e::729
Connecting to dl.grafana.com (dl.grafana.com)|151.101.198.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 294419782 (281M) [application/gzip]
Saving to: ‘grafana-enterprise_12.4.3+security-02_25720634919_linux_amd64.tar.gz’

grafana-enterprise_ 100%[===================>] 280.78M  30.1MB/s    in 9.9s    

2026-05-21 01:56:32 (28.3 MB/s) - ‘grafana-enterprise_12.4.3+security-02_25720634919_linux_amd64.tar.gz’ saved [294419782/294419782]

[opc@grafana ~]$ 

tarコマンドでダウンロードしたGrafanaのtarボールを展開

[opc@grafana ~]$ tar -zxvf grafana-enterprise_12.4.3+security-02_25720634919_linux_amd64.tar.gz
grafana-12.4.3+security-02/
grafana-12.4.3+security-02/Dockerfile
grafana-12.4.3+security-02/docs/
grafana-12.4.3+security-02/docs/sources/
<中略>
grafana-12.4.3+security-02/bin/grafana-cli
grafana-12.4.3+security-02/bin/grafana
grafana-12.4.3+security-02/bin/grafana-server
[opc@grafana ~]$ 

展開されたディレクトリを確認

[opc@grafana ~]$ ls
go
grafana-12.4.3+security-02
grafana-enterprise_12.4.3+security-02_25720634919_linux_amd64.tar.gz
oracle-telemetry-streaming
[opc@grafana ~]$

プラグインを配置するディレクトリを作成

[opc@grafana ~]$ mkdir -p grafana-12.4.3+security-02/data/plugins
[opc@grafana ~]$ 

作成したディレクトリにプラグインをコピー

[opc@grafana ~]$ cp -r oracle-telemetry-streaming grafana-12.4.3+security-02/data/plugins/
[opc@grafana ~]$ 

viで設定ファイルdefaults.iniを開く

[opc@grafana ~]$ vi grafana-12.4.3+security-02/conf/defaults.ini

allow_loading_unsigned_plugins にoracle-oracle-telemetryを設定

defaunts.ini 編集前
# Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned. Plugins with modified signatures are never loaded.
allow_loading_unsigned_plugins = 
defaunts.ini 編集後
# Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned. Plugins with modified signatures are never loaded.
allow_loading_unsigned_plugins = oracle-oracle-telemetry

変更を保存して、viを終了する

5. firewalldの設定

firewalldのTCP 3000番ポートを永続的に解放

[opc@grafana ~]$ sudo firewall-cmd --permanent --add-port=3000/tcp
success
[opc@grafana ~]$ 

firewalldの設定を再読み込み

[opc@grafana ~]$ sudo firewall-cmd --reload
success
[opc@grafana ~]$  

firewalldの設定を確認

[opc@grafana ~]$ sudo firewall-cmd --list-ports
3000/tcp
[opc@grafana ~]$ 

6. tnsnames.oraファイルの作成

viでtnsnames.oraファイルを作成

[opc@grafana ~]$ sudo vi $TNS_ADMIN/tnsnames.ora

Autonomous AI Databaseの接続記述子を設定

tnsnames.ora
ADB = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=sii4hqn5.adb.ap-tokyo-1.oraclecloud.com))(connect_data=(service_name=sya6vphk3pzlkhq_grafanatest_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))

変更を保存して、viを終了する

7. Grafanaサーバーの実行

Grafanaサーバーの実行ファイルがあるディレクトリに移動

[opc@grafana ~]$ cd grafana-12.4.3+security-02/bin
[opc@grafana bin]$ ls
grafana  grafana-cli  grafana-server
[opc@grafana bin]$

Grafanaサーバーをバックグラウンドで実行

[opc@grafana bin]$ nohup ./grafana-server &
[1] 54429
[opc@grafana bin]$ nohup: ignoring input and appending output to 'nohup.out'

[opc@grafana bin]$

8. 動作確認

ComputeインスタンスのIPアドレスにポート3000を指定してブラウザからアクセスする

http://<ComputeインスタンスのIPアドレス>:3000

スクリーンショット 2026-05-22 14.38.32.png

初期パスワード(ユーザ名:admin、パスワード:admin)でサインインする
スクリーンショット 2026-05-22 14.51.15.png

新しいパスワードを設定する
スクリーンショット 2026-05-22 14.51.42.png

サインイン完了
スクリーンショット 2026-05-22 14.52.41.png

「Administration」→「Plugins and data」→Pluginsにに移動する
スクリーンショット 2026-05-22 14.56.52.png

「Search」にoracle-telemetryと入力し、表示された「oracle-telemetry」をクリックする
スクリーンショット 2026-05-22 14.59.00.png

「Add new data source」をクリックする
スクリーンショット 2026-05-22 15.00.55.png

設定情報を入力する

設定項目 設定内容
Name 作成するデータソースの名前(ここではADB)
Connection Type 「TNS」を選択
Deployment Type 「ADB」を選択
Username Autonomous AI Databaseのユーザ名(ここではadmin)
Password Autonomous AI Databaseユーザのパスワード(ここではadminのパスワード)
Connection Identifier tnsnames.oraで設定したAutonomous AI Databaseの接続記述子(ここではADB)

スクリーンショット 2026-05-22 15.12.47.png

「Save & test」をクリックする
スクリーンショット 2026-05-22 15.12.47のコピー.png

設定内容に問題がなければ「Data souce is working」と表示される
スクリーンショット 2026-05-22 15.13.20.png

「Explore view」のリンクをクリックする
スクリーンショット 2026-05-27 18.05.28.png

Exploreの画面が表示される
スクリーンショット 2026-05-27 18.05.51.png

「PROMQL」と表示されているドロップダウンをクリックし、「SQL」を選択する
スクリーンショット 2026-05-27 18.06.03.png

「Time Series Mode」のトグルをオフにする
スクリーンショット 2026-05-27 18.07.12.png

「Enter Sql Query」と表示されている部分に、実行するSQLを入力する
スクリーンショット 2026-05-27 18.16.06.png

入力したSQLの実行結果が表示される
スクリーンショット 2026-05-27 18.17.17.png

参考情報

Grafana Oracle Telemetry Streaming Plugin
NVM Installl
nvm-sh Command Line (Linux/MacOS/WSL)
Yarn Installation
Go
RPMを使用したOracle Instant Clientのインストール
Gitのインストール

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?