[ZBX-7023] Item became not supported: SQL query returned empty result. Created: 2013 Sep 18 Updated: 2017 May 30 Resolved: 2016 Sep 16 |
|
| Status: | Closed |
| Project: | ZABBIX BUGS AND ISSUES |
| Component/s: | Proxy (P), Server (S) |
| Affects Version/s: | 2.0.8 |
| Fix Version/s: | 2.0.8 |
| Type: | Incident report | Priority: | Minor |
| Reporter: | Michael Wuerl | Assignee: | Unassigned |
| Resolution: | Won't fix | Votes: | 1 |
| Labels: | database, odbc | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Description |
|
Hello, i have a similar problem to https://support.zabbix.com/browse/ZBX-5386. I have created a new odbc sql query that makes a select on the db2 locklist table. If there is no lock, the table is empty and everything is fine. If the table is not empty, something in the database made a lock and should be triggered by zabbix. Problem is: db.odbc.select[lockdb]] became not supported: SQL query returned empty result. This should have been fixed allready since we use 2.0.8. I need the empty result as a valid result. Any solutions for that problem? |
| Comments |
| Comment by Alexander Vladishev [ 2013 Sep 18 ] |
|
For example, you can resolve problem by this statement: select case when exists(select null from <table_name>) then 1 else 0 end as colA from dual |
| Comment by Michael Wuerl [ 2013 Sep 19 ] |
|
This statement still brings error - became not supported:SQL query returned empty result |
| Comment by Oleksii Zagorskyi [ 2013 Sep 19 ] |
|
2.0.* supports empty values for string, text, log items ! Does it really sound like a bug ? |
| Comment by Grzegorz Grabowski [ 2016 Sep 16 ] |
|
Still the same on 3.0 version. Empty value for String and Characters should be allowed. |
| Comment by Oleksii Zagorskyi [ 2016 Sep 16 ] |
|
It's actually allowed. |
| Comment by richlv [ 2016 Sep 16 ] |
|
mbsit, when you say that it is "the same", how have you configured the item and what errors do you get ? |
| Comment by Grzegorz Grabowski [ 2016 Sep 16 ] |
|
v. 3.0.4 and configuration: Bests, |
| Comment by Oleksii Zagorskyi [ 2016 Sep 16 ] |
|
Type of information Text allows to receive and store an empty value. |
| Comment by Grzegorz Grabowski [ 2016 Sep 16 ] |
|
The error is on the screen "SQL query returned empty result." |
| Comment by Grzegorz Grabowski [ 2016 Sep 16 ] |
|
ODBC isql returns from this query: +---------------------------------------------------------------------------------+-----------+--------------------+-----------------------------------------+ | xxxxxxxxxxxx | xxxxxxxx| xxxxxxxx | xxxxxx | +---------------------------------------------------------------------------------+-----------+--------------------+-----------------------------------------+ +---------------------------------------------------------------------------------+-----------+--------------------+-----------------------------------------+ SQLRowCount returns -1 SQL> Bests, |
| Comment by Oleksii Zagorskyi [ 2016 Sep 16 ] |
|
Ahh, cool. Well, "empty result" for an ODBC check in not the same like "empty value" to be stored in zabbix db. |
| Comment by Grzegorz Grabowski [ 2016 Sep 16 ] |
|
So |
| Comment by Oleksii Zagorskyi [ 2016 Sep 16 ] |
|
My statement (assumption actually) above based on these 3 lines from doc :
https://www.zabbix.com/documentation/3.0/manual/config/items/itemtypes/odbc_checks But "magic" suggested by Alexander in very first comment could help you to find a workaround. Maybe the SQL have to adjusted for monitored DB engine. well, I'd suggest you to create a new clean ZBXNEXT, mentioning this ZBX as a reference. |
| Comment by Grzegorz Grabowski [ 2016 Sep 16 ] |
|
No, I will this might be close, tnx. |
| Comment by Oleksii Zagorskyi [ 2016 Sep 16 ] |
|
Closed as won't fix. |