[ZBX-4709] SNMP text values contain surrounding quotes when processed with *.regexp() Created: 2012 Feb 29 Updated: 2017 May 30 Resolved: 2012 Jun 13 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.0.0rc1 |
Fix Version/s: | 1.8.12rc2, 2.0.0rc3 |
Type: | Incident report | Priority: | Minor |
Reporter: | Jens Berthold | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | regexps, snmp, trigger | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Debian 6.0.3 |
Attachments: |
![]() |
||||||||
Issue Links: |
|
Description |
I use a global regular expression in a trigger for an SNMP item (example value: "54 C"): {MyHost:SystemTemperature.regexp(@QNAP-SysTemp-OK)}=0 The regexp only works if I include the surrounding quotes: I guess the intended behaviour should be to strip off the quotes from the SNMP text values before they are further processed by Zabbix. |
Comments |
Comment by Jens Berthold [ 2012 Feb 29 ] |
I just saw that it is generally true that all SNMP text values are shown with quotes everywhere in Zabbix. So maybe the issue title should be changed... |
Comment by Jens Berthold [ 2012 Mar 09 ] |
I found out that Zabbix shows the quotes for snmp text values only if SNMP OID is unknown to Zabbix. So this item is shown with quotes: .1.3.6.1.2.1.47.1.1.1.1.13.1001 |
Comment by dimir [ 2012 Apr 04 ] |
What type of the device is it that you are monitoring? |
Comment by dimir [ 2012 Apr 04 ] |
If you request the item value using snmpwalk do you get quoted return value? |
Comment by Jens Berthold [ 2012 Apr 04 ] |
The first example was from a QNAP Storage, the one in my second comment from a Cisco switch. Oh... I see, it's also quoted when using the OID with snmpget on the command line: |
Comment by dimir [ 2012 Apr 05 ] |
So, I guess the problem is not on Zabbix side? |
Comment by Jens Berthold [ 2012 Apr 05 ] |
You are right, it's not on Zabbix' side - no work for you this time |
Comment by Cristian Mammoli [ 2012 Apr 05 ] |
Yeah, strings are always quoted in snmpwalk if you don't have the correct MIB. Sometimes anyway, maybe because of crappy 3rd party mibs, they are quoted even if the MIB is present: [root@srvzabbix ~]# snmpwalk -c public -v 2c quescom -m +QUESCOM-MIB QUESCOM-MIB::voipType.0.0 I know it's not Zabbix fault, but having an option to strip quotes would be nice! |
Comment by dimir [ 2012 Apr 10 ] |
OK, that makes sense. We decided to get back to this issue after 2.0 is out. |
Comment by Kodai Terashima [ 2012 Apr 13 ] |
This problem is happened on snmp dynamic index as well. I also think it's better that Zabbix server remove quotes.
In this case, simple snmp item with .1.3.6.1.2.1.25.4.2.1.2.1 in OID store value "init" (with quotes) to DB. Dynamic index 1.3.6.1.2.1.25.4.2.1.6["index","1.3.6.1.2.1.25.4.2.1.2","init"] doesn't work. Because Zabbix server try to compare init and "init". I attached debug log. I confirm dynamic index 1.3.6.1.2.1.25.4.2.1.6["index","1.3.6.1.2.1.25.4.2.1.2","\"init\""] works on 1.8.11. |
Comment by Alexander Vladishev [ 2012 Apr 16 ] |
Will be fixed with |
Comment by dimir [ 2012 Apr 17 ] |
This appeared to be a regression so will be fixed in both 1.8 and 2.0 . |
Comment by Alexander Vladishev [ 2012 Apr 17 ] |
Fixed in version pre-1.8.12 r26905 and pre-2.0.0rc3 r26919. |