Zabbix icon indicating copy to clipboard operation
Zabbix copied to clipboard

ZBX-BROCADE-FC-PORT: import error on "Error(s) [...]" trigger

Open DurvalMenezes opened this issue 10 years ago • 2 comments

Hello,

The following happens with Zabbix 2.2.6 (running on Linux EL6, if relevant);

I've Imported the other ZBX-BROCADE-FC (zbx-brocade-fc-envmon.xml) with no issues, and it seems to be working great.

But, When I tried importing zbx-brocade-fc-port.xml, the import aborts with the following error: Cannot implode expression "{KHP-BROCADE-FC-PORT:swFCPortRxCrcs[{#ADVSNMPVALUE}].last(0)}>0 | {KHP-BROCADE-FC-PORT:swFCPortRxBadEofs[{#ADVSNMPVALUE}].avg(0)}>0 | {KHP-BROCADE-FC-PORT:swFCPortRxEncOutFrs[{#ADVSNMPVALUE}].avg(0)}>0 | {KHP-BROCADE-FC-PORT:swFCPortRxTooLongs[{#ADVSNMPVALUE}].avg(0)}>0 | {KHP-BROCADE-FC-PORT:swFCPortRxTruncs[{#ADVSNMPVALUE}].avg(0)}>0". Incorrect trigger function "avg(0)" provided in expression. Invalid first parameter.

In case it's related, I've double checked and the required mappings have all been created and are listed on Administration > General > Value Mappings, and the advsnmp.discovery script is correctly installed on my externalscripts dir (along with echo.something, which works) and it also works correctly when invoked from the command-line with the same parameters mentioned in zbx-brocade-fc-port.xml:

# ./advsnmp.discovery 10.0.0.50 "-v1 -c mycommunity" .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.37 1.1
{
    "data":[
            {
            "{#ADVSNMPINDEX1}": "",
            "{#ADVSNMPINDEX2}": "1",
            "{#ADVSNMPVALUE}":"0"
            }       ,
            {
            "{#ADVSNMPINDEX1}": "",
            "{#ADVSNMPINDEX2}": "10",
            "{#ADVSNMPVALUE}":"9"
            }       ,
            [...]
        ]
}

For now, I've removed the whole trigger definition, and was able to import the template, but I'd like to fix this so I can have the trigger too.

Thanks in advance, Durval.

DurvalMenezes avatar Sep 30 '14 11:09 DurvalMenezes

I got the exactly same problem with zabbix 2.2.7 on CentOS 6.6.

scutdk avatar Dec 19 '14 08:12 scutdk

Same error, Zabbix 2.4.4 / CentOS 7

I thought the "avg(0)" items looked strange. Average needs to be of more than 0 readings (avg seems pointless if less than 2 readings - might as well use last, which should require less processing)

Changed "avg(0)" to "avg(#10)" (average of last 10 readings). You can also do "avg(3600)" (average of last hour's readings)...

https://www.zabbix.com/documentation/2.2/manual/appendix/triggers/functions

lstein89 avatar Jun 02 '15 01:06 lstein89