Ad Widget

Collapse

Trigger prototype: How to exclude?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DiViNe
    Member
    • Feb 2015
    • 30

    #1

    Trigger prototype: How to exclude?

    Installation:
    +++++++++++++
    - Zabbix 3.2
    - Oracle 11 DB with ODBC
    - Oracle tables get discovered



    Item prototype:
    +++++++++++++++
    Name = Tablespace {#TBSNAME} free (MB)
    Key = db.odbc.select[tbs_free_{#TBSNAME}, {HOST.NAME}]
    SQL query = select round(nvl(mb_free,0), 0) "free MB"
    from (select sum(bytes)/1024/1024 mb_free
    ,tablespace_name
    from dba_free_space
    group by tablespace_name
    union all
    select sum(free_space)/1024/1024 mb_free
    ,tablespace_name
    from dba_temp_free_space
    group by tablespace_name) a
    ,(select sum(bytes)/1024/1024 mb_alloc
    ,tablespace_name
    from dba_data_files
    group by tablespace_name
    union all
    select sum(bytes)/1024/1024 mb_alloc
    ,tablespace_name
    from dba_temp_files
    group by tablespace_name) b
    where a.tablespace_name = b.tablespace_name
    and a.tablespace_name = '{#TBSNAME}'



    Trigger prototype:
    ++++++++++++++++++
    Name = Less than 3% free in tablespace {#TBSNAME} on {HOST.NAME}
    Trigger-expression = {servername:db.odbc.select[tbs_used_percent_{#TBSNAME}, {HOST.NAME}].last()}>97
    Severity = Disaster

    or

    Name = Less than 5% free in tablespace {#TBSNAME} on {HOST.NAME}
    Trigger-expression = {servername:db.odbc.select[tbs_used_percent_{#TBSNAME}, {HOST.NAME}].last()}>95
    Severity = High


    This is fine so far. But there are some tables who should't generate an disaster-alarm (for ex. SYSTEM or TEMP tables) , only a high-alarm.
    How can I change the trigger 97% trigger prototype, so it will ignore tables like SYSTEM or TEMP? I think this wont work:
    {servername:db.odbc.select[tbs_used_percent_{#TBSNAME}, {HOST.NAME}].last()}>97 and {#TBSNAME} not TEMP and not SYSTEM
Working...