ikzelf / zbxdb

Zabbix database monitoring, the easy and extendable way
GNU General Public License v3.0
94 stars 45 forks source link

oracle stby db #77

Closed rmdolezal closed 3 years ago

rmdolezal commented 3 years ago

Hi Ronald, I tryed to monitor stby db but I have a problem with login to db - because of stby. So I cant login as user zabbix. How can I solve the problem ? How the cfg file must look ?

Thank you

Regards

Marek

2021-04-19 12:33:17,910main20_site_checks : standby.12

2021-04-19 12:33:17,911main20_connecting to zabbix/**@// - removed

2021-04-19 12:33:18,108main50_problem Traceback (most recent call last): File "/home/zbxdb/zbxdb/bin/dbconnections/oracle.py", line 97, in connect _x = _db.connect(connect_string(_c), mode=_c['omode']) cx_Oracle.DatabaseError: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

ikzelf commented 3 years ago

Hi Marek,

I assume that the standby is not open for read only. In that case you need to connect as sysdba. You can connect as sysdba to specifying the "role = sysdba" in the cfg. And of course you need to grant sysdba to your monitoring user.

Ronald.

On 19 Apr 2021, at 12:59, rmdolezal @.***> wrote:

Hi Ronald, I tryed to monitor stby db but I have a problem with login to db - because of stby. So I cant login as user zabbix. How can I solve the problem ? How the cfg file must look ?

Thank you

Regards

Marek

2021-04-19 12:33:17,910main20_site_checks : standby.12

2021-04-19 12:33:17,911main20_connecting to zabbix/**@// - removed

2021-04-19 12:33:18,108main50_problem Traceback (most recent call last): File "/home/zbxdb/zbxdb/bin/dbconnections/oracle.py", line 97, in connect _x = _db.connect(connect_string(_c), mode=_c['omode']) cx_Oracle.DatabaseError: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ikzelf/zbxdb/issues/77, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADZJBWFFV2FIHFH4QD3ETDTJQEIFANCNFSM43FS2S6Q.

rmdolezal commented 3 years ago

Hi Ronald, Yes, role=sysdba was the trick 😊 Now it`s working. Thank you for your outstanding work.

Best regards

Marek

From: Ronald Rood @.> Sent: Monday, April 19, 2021 1:25 PM To: ikzelf/zbxdb @.> Cc: Doležal Marek @.>; Author @.> Subject: Re: [ikzelf/zbxdb] oracle stby db (#77)

Hi Marek,

I assume that the standby is not open for read only. In that case you need to connect as sysdba. You can connect as sysdba to specifying the "role = sysdba" in the cfg. And of course you need to grant sysdba to your monitoring user.

Ronald.

On 19 Apr 2021, at 12:59, rmdolezal @.<mailto:@.>> wrote:

Hi Ronald, I tryed to monitor stby db but I have a problem with login to db - because of stby. So I cant login as user zabbix. How can I solve the problem ? How the cfg file must look ?

Thank you

Regards

Marek

2021-04-19 12:33:17,910main20_site_checks : standby.12

2021-04-19 12:33:17,911main20_connecting to zabbix/**@// - removed

2021-04-19 12:33:18,108main50_problem Traceback (most recent call last): File "/home/zbxdb/zbxdb/bin/dbconnections/oracle.py", line 97, in connect _x = _db.connect(connect_string(_c), mode=_c['omode']) cx_Oracle.DatabaseError: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ikzelf/zbxdb/issues/77, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADZJBWFFV2FIHFH4QD3ETDTJQEIFANCNFSM43FS2S6Q.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ikzelf/zbxdb/issues/77#issuecomment-822392911, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM27LRQUS542S5M3JGCKPQDTJQHJZANCNFSM43FS2S6Q.

ikzelf commented 3 years ago

glad it's working as designed :-D