Monitorizar BDs vía ODBC

From Zabbix-ES
Jump to navigation Jump to search

Instalas el InstantClient de Oracle en el Zabbix Server

Configuras el /etc/odbcinst.ini

[Oracle 11g ODBC driver]
Description     = Oracle ODBC driver for Oracle 11g
Driver          = /oracle/instantclient_11_2/libsqora.so.11.1
Setup           =
FileUsage       =
CPTimeout       =
CPReuse         =

Configuras el /etc/odbc.ini

###############################
## CONEXIONES ORACLE
###############################
[NOMBRE_DE_LA_BBDD]
Application Attributes = T
Attributes = W
BatchAutocommitMode = IfAllSuccessful
BindAsFLOAT = F
CloseCursor = F
DisableDPM = F
DisableMTS = T
Driver = Oracle 11g ODBC driver
Servername = [SERVER_NAME]
XECSchemaOpt =
EXECSyntax = T
Failover = T
FailoverDelay = 10
FailoverRetryCount = 10
FetchBufferSize = 64000
ForceWCHAR = F
Lobs = T
Longs = T
MaxLargeData = 0
MetadataIdDefault = F
QueryTimeout = T
ResultSets = T
ServerName =
SQLGetData extensions = F
Translation DLL =
Translation Option = 0
DisableRULEHint = T
UserID =
StatementCache=F
CacheBufferSize=20
UseOCIDescribeAny=F
MaxTokenSize=8192

Desde Zabbix utilizas el item "Database Monitor"

Name      : Realiza un select en OracleDB
Type      : Database monitor
Key       : db.odbc.select[selec_generico_{$SID},{$DSN}]
User name : {$USER_DB}
Password  : {$PASSWD_DB}
SQL query : SELECT 1 FROM DUAL

Links utiles

https://docs.oracle.com/database/121/ADFNS/adfns_odbc.htm#ADFNS1112
https://www.zabbix.com/documentation/current/manual/config/items/itemtypes/odbc_checks