PDA

View Full Version : can not add trigger expression with SNMP OID


Lufa
11-01-2011, 09:13
Hi!

Since Zabbiux 1.8.3 (to 1.8.4) I can not add trigger with expression which consist of ":" signs. For examlpe:
{Template_VPN:IF-MIB::ifNumber.0.delta(900)=0}

I am getting the following error:
* Not allowed symbols or sequence of symbols in expression element detected: Check expression part starting from ' IF-MIB::ifNumber.delta(900)}=0 '

I can not find a proper regular expression in defines.php to fix it.

If I got rid of "::" in the Item's key - trigger saved successfully.

:: is the standard separator for SNMP OIDs. So I prefer to use it.

Any ideas?

Thank you!

troffasky
19-01-2011, 12:22
Yes, I have this problem too. It's really annoying. Worked fine in 1.6 but not 1.8.

Using : for SNMP stuff [descriptions, keys, triggers] seems pretty much essential to me. If I've got hundreds of SNMP items on a host then I have to contrive some means to translate : to some other character that Zabbix likes.

MrKen
20-01-2011, 10:48
Zabbix Manual for 1.6 page 95, shows that ':' is supported but has a Note that ": is not recommended and can be dropped in future releases".

Zabbix 1.8 online docs, no longer supports ':'
http://www.zabbix.com/documentation/1.8/manual/config/items#item_key (http://www.zabbix.com/forum/../documentation/1.8/manual/config/items#item_key)

Solution:
Use an OID numeric or string form for the OID field.
The Key can be anything you like! There is no need to put something like IF-MIB::ifNumber.0 as the Key. Just use ifNumber.0

MrKen

troffasky
26-01-2011, 12:07
The fact that it's deliberate doesn't make it any less annoying.

troffasky
27-01-2011, 19:25
Actually I've just noticed on a server with 1.8.2 upgraded all the way from 1.4 that : in key works fine - so long as you don't try and edit it through the web interface.

Why do SNMP objects need a key in addition to the OID anyway? You wouldn't monitor the same OID twice on the same host, so the OID should suffice as the key; I can't see why internal details like what the key is should be exposed to the user.