Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle DB monitor -- steps in #2796 does not seem to work #5143

Open
Sriram-Kumar1 opened this issue Sep 30, 2024 · 4 comments Β· May be fixed by #5680
Open

Oracle DB monitor -- steps in #2796 does not seem to work #5143

Sriram-Kumar1 opened this issue Sep 30, 2024 · 4 comments Β· May be fixed by #5680
Labels
feature-request Request for new features to be added

Comments

@Sriram-Kumar1
Copy link

Sriram-Kumar1 commented Sep 30, 2024

πŸ“‘ I have found these related issues/pull requests

#2493

🏷️ Feature Request Type

New monitor

πŸ”– Feature description

Should be able to monitor connection to an Oracle DB

βœ”οΈ Solution

Install oracle db node package
add option for monitoring oracle db accepting host name , port, service name, user name and password

❓ Alternatives

No response

πŸ“ Additional Context

made changes mentioned in #2796 but the oracle db as an option is not showing in the drop down. I am new to this framework any help would be appreciated.

@Sriram-Kumar1 Sriram-Kumar1 added the feature-request Request for new features to be added label Sep 30, 2024
@Sriram-Kumar1
Copy link
Author

running uptime-kuma Version: 1.23.13

  1. installed oracledb node package
  2. Changes done in following files

src\pages\EditMonitor.vue

Lines 77-80


Oracledb

Lines 388-393

                       <!--Oracle -->
                      <template v-if="monitor.type === 'Oracledb'">
                            <div class="my-3">
                        <input id="sqlConnectionString" v-model="monitor.databaseConnectionString" type="text" class="form-control" placeholder='"user":"<USER>","password":"<PASSWORD>","connectionString":"(DESCRIPTION =(ADDRESS_LIST=(ADDRESS     =(PROTOCOL=TCP)(HOST=<HOSTADDRESS>)(PORT=<PORT>)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=<SERVICENAME>)))"'>
                           </div>
                     </template>
  1. edited file server\model\monitor.js to handle OracleDb monitor:

Line 8-9

const { tcping, ping, dnsResolve, checkCertificate, checkStatusCode, getTotalClientInRoom, setting, mssqlQuery, postgresQuery, mysqlQuery, oracledbQuery,mqttAsync, setSetting, httpNtlm, radius, grpcQuery,
redisPingAsync, mongodbPing, kafkaProducerAsync, getOidcTokenClientCredentials, rootCertificatesFingerprints, axiosAbortSignal

line 861-868

  } else if (this.type === "oracledb") {
            let startTime = dayjs().valueOf();

             await oracledbQuery(this.databaseConnectionString, this.databaseQuery);
              bean.msg = "";
              bean.status = UP;
              bean.ping = dayjs().valueOf() - startTime;        
  }
  1. cd to project dir and run npm rebuild, then start again uptime-kuma.

  2. After the changes are done, I dont see the oracle db as an option in the add monitor page.

@CommanderStorm
Copy link
Collaborator

Regarding oracle
Monitoring oracle databases won't be supported as this would mean having to drop arm support (which is a non-starter)
This monitor will thus not be merged. Consider asking oracle for arm support.

Regarding your post. Could you specify what you mean by the following? (npm run setup for expample will delete any local changes by design)

cd to project dir and run npm rebuild, then start again uptime-kuma.

given how brittle such a patch would be (you will need to maintain your fork), I suggest to use the push monitor instead with a script of your choosing.

@Sriram-Kumar1
Copy link
Author

@CommanderStorm thank you. I could not quiet understand arm support. (ARM as in processor)?.

I observe that oracle site is showing that their thick client is supported in ARM processor

https://node-oracledb.readthedocs.io/en/latest/user_guide/installation.html#aarch64

not sure if I am missing something obvious.

coming to the steps, I repeated the steps mentioned in #2796

after I made the changes in the above mentioned files I did a npm rebuild and restarted uptime-kuma from pm2

I will look up push monitor and see how to go about it.

@CommanderStorm
Copy link
Collaborator

CommanderStorm commented Oct 1, 2024

Things must have changed since we last looked at this

the node-oracledb driver is a pure JavaScript module that directly connects to Oracle Database 12.1 or later. This β€˜Thin’ mode does not need Oracle Client libraries. The database can be on the same machine as Node.js, or it can be remote.

We either overlooked thin mode or (more likely) that is a newer development..
=> Should be possible to do that way

When this was last looked into, oracle required binary blobs and those were neither bundled with the package, nor build for arm.

after I made the changes in the above mentioned files

Could you provide that as a pull request? Reviewing the text above for what is missing is pretty hard
Among others, the above code is missing oracledbQuery and the Monitor-Registration (see the "new monitoring type" part of our contribution guide

danilodorgam added a commit to danilodorgam/uptime-kuma that referenced this issue Mar 8, 2025
@danilodorgam danilodorgam linked a pull request Mar 8, 2025 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features to be added
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants