Pyora icon indicating copy to clipboard operation
Pyora copied to clipboard

Zabbix 5.0TLS Import pyora.xml error

Open xiaole992 opened this issue 3 years ago • 9 comments

Provide the wrong item value type "number (no plus or minus)" to the trigger function "regexp (ORA)"

xiaole992 avatar Feb 12 '22 08:02 xiaole992

Hi. Can you confirm the XML that you tried to import?

danilochilene avatar Feb 15 '22 13:02 danilochilene

Hi. Can you confirm the XML that you tried to import?

yes

xiaole992 avatar Feb 15 '22 14:02 xiaole992

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

goodchenwei123 avatar Mar 01 '22 06:03 goodchenwei123

I'm going take a look @goodchenwei123

danilochilene avatar Mar 01 '22 11:03 danilochilene

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?

xiaole992 avatar Mar 04 '22 01:03 xiaole992

There is a default value.

danilochilene avatar Mar 10 '22 15:03 danilochilene

@447238862 ,

This is still an issue?

danilochilene avatar May 03 '22 19:05 danilochilene

@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]

jperestvt avatar May 19 '22 15:05 jperestvt

Hi @jperestvt ,

Please confirm the XML you are trying to import and the Zabbix version so I can try to reproduce it.

danilochilene avatar May 20 '22 12:05 danilochilene