Pyora
Pyora copied to clipboard
Zabbix 5.0TLS Import pyora.xml error
Provide the wrong item value type "number (no plus or minus)" to the trigger function "regexp (ORA)"
Hi. Can you confirm the XML that you tried to import?
Hi. Can you confirm the XML that you tried to import?
yes
def check_active(self):
"""Check Intance is active and open"""
sql = "select to_char(case when inst_cnt > 0 then 1 else 0 end,
'FM99999999999999990') retvalue from (select count(*) inst_cnt
from v$instance where status = 'OPEN' and logins = 'ALLOWED'
and database_status = 'ACTIVE')"
self.cur.execute(sql)
res = self.cur.fetchall()
for i in res:
print(i[0])
This function returns a positive integer, 0 or 1, but the regexp function needs to accept a character parameter,so an error is reported: type mismatch。
So just delete this code temporarily and add the trigger again:
add trigger detail:
name:Oracle/Database {$DATABASE} is down or ORA error found Severity:Disaster Expression:{Pyora:pyora[{$USERNAME},{$PASSWORD},{$ADDRESS},{$PORT},{$DATABASE},check_active].last(0)}=0
I'm going take a look @goodchenwei123
Among triggers Oracle/Tablespace {#TABLESPACE} used on {$DATABASE} high Does the {$FS_P_USED_HIGH} and {$FS_FREE_LOW} parameter need to be added to the macro?
There is a default value.
@447238862 ,
This is still an issue?
@danilochilene I have the same issue when I try to import get the error:
Incorrect item value type "Numeric (unsigned)" provided for trigger function "regexp(ORA)". [conf.import.php:89 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processTriggers() → CTrigger->create() → CTriggerGeneral->createReal() → CTriggerGeneral->implode_expressions() → CApiService::exception() in include/classes/api/services/CTriggerGeneral.php:1561]
Hi @jperestvt ,
Please confirm the XML you are trying to import and the Zabbix version so I can try to reproduce it.