[ZBX-6992] SQL Error on "IT services" screen Created: 2013 Sep 12  Updated: 2017 May 30  Resolved: 2013 Sep 18

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.0.8
Fix Version/s: 2.0.9rc1, 2.1.5

Type: Incident report Priority: Minor
Reporter: Simon Wetzstein Assignee: Ivo Kurzemnieks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix 2.0.8, Postgresql 8.1


Attachments: JPEG File zabbix1-cct.jpg    

 Description   

After i create under IT services a new Service i get the following error under the SLA Screen:

pg_query() [<a href='function.pg-query'>function.pg-query</a>]: Query failed: ERROR: syntax error at or near "servicealarmid" at character 67 [include/db.inc.php:440]
Error in query [SELECT sa.serviceid,sa.value FROM (SELECT MAX(sa3.servicealarmid) servicealarmid FROM (SELECT sa2.serviceid,MAX(sa2.clock) clock FROM service_alarms sa2 WHERE sa2.clock<'1376385501' AND sa2.serviceid IN ('5','6','7') GROUP BY sa2.serviceid) ss JOIN service_alarms sa3 ON sa3.serviceid = ss.serviceid and sa3.clock = ss.clock GROUP BY sa3.serviceid) ss2 JOIN service_alarms sa ON sa.servicealarmid = ss2.servicealarmid] [ERROR: syntax error at or near "servicealarmid" at character 67]
pg_fetch_assoc() expects parameter 1 to be resource, boolean given [include/db.inc.php:577]
pg_free_result(): supplied argument is not a valid PostgreSQL result resource [include/db.inc.php:578]



 Comments   
Comment by Pavels Jelisejevs (Inactive) [ 2013 Sep 12 ]

The query is missing the "AS" keyword before field aliases.

Comment by Ivo Kurzemnieks [ 2013 Sep 13 ]

RESOLVED for 2.0 in svn://svn.zabbix.com/branches/dev/ZBX-6992

Comment by Volker Fröhlich [ 2013 Sep 13 ]

Goes into EPEL zabbix20-2.0.8-2

Comment by Pavels Jelisejevs (Inactive) [ 2013 Sep 17 ]

TESTED.

Comment by Ivo Kurzemnieks [ 2013 Sep 17 ]

Fixed in pre-2.0.9rc1 r38543 and pre-2.1.5 (trunk) r38544

Comment by Pavels Jelisejevs (Inactive) [ 2013 Sep 18 ]

(1) This should be noted in the 2.0 API changelog.

iivs RESOLVED.
Please review: https://www.zabbix.com/documentation/2.0/manual/appendix/api/changes_2.0

jelisejev CLOSED.

Generated at Thu Apr 25 17:05:41 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.