ikzelf / zbxdb

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

ASM cluster monitoring configuration #34

Closed ghost closed 4 years ago

ghost commented 4 years ago

Could you please describe how to properly monitor Oracle ASM instances in the cluster environment? ASM instances are not registered in the high availability SCAN listener, so I have to specify hostname to one of cluster's node in db_url parameter. Script in this case receives the status for all ASM instances in normal situation. But, if this host become unavailable, data will no longer be updated, even while another nodes instances still online. At the same time, I can’t add several cfg files and zabbix hosts, one for each node of the cluster, because in this case the metrics and triggers will be duplicated, and events will also cause doubles. Is it possible to use some kind of failover mechanism for the database connection string, or is some other ASM monitoring logic supposed to be?

ikzelf commented 4 years ago

Easiest is to create a regular sqlnet connect string that describes all instances. This way it will connect the first available instance in the list.

Groeten, Ronald Rood

Op 1 mrt. 2020 om 02:14 heeft Largelos notifications@github.com het volgende geschreven:

 Could you please describe how to properly monitor Oracle ASM instances in the cluster environment? ASM instances are not registered in the high availability SCAN listener, so I have to specify hostname to one of cluster's node in db_url parameter. Script in this case receives the status for all ASM instances in normal situation. But, if this host become unavailable, data will no longer be updated, even while another nodes instances still online. At the same time, I can’t add several cfg files and zabbix hosts, one for each node of the cluster, because in this case the metrics and triggers will be duplicated, and events will also cause doubles. Is it possible to use some kind of failover mechanism for the database connection string, or is some other ASM monitoring logic supposed to be?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ikzelf commented 4 years ago

One example I have without tnsnames.ora: [zbxdb] db_url = (DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=OFF)(FAILOVER=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=dm0201-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=dm0202-vip)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=+ASM)(SERVER=DEDICATED))) username = cistats role = sysdba db_type = oracle db_driver = cx_Oracle instance_type = asm hostname = dm02_ASM

ghost commented 4 years ago

Thx, exactly that I wanted to hear about the ability to use not only ezconnect but also full tnsnames connection string :) Great script, thank you.