[ZBX-5483] Zabbix Sender protocol doesn't respond correctly to some incorrect requests. Created: 2012 Aug 22 Updated: 2017 May 30 Resolved: 2012 Aug 23 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | API (A), Server (S) |
Affects Version/s: | 2.0.0 |
Fix Version/s: | 2.0.3rc1, 2.1.0 |
Type: | Incident report | Priority: | Minor |
Reporter: | Mikhail Dobrinin | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | sender | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
When using the exposed zabbix_sender service to post information, the server doesn't respond correctly. It should mark the response as a failure but it doesn't. The following examples are for posting to an 'item' of type zabbix_trapper. They are not pretty printed for space reasons. #1##Missing host in request##You can see that the response is success, although Total is still 0 ]} { "response":"success", "info":"Processed 0 Failed 0 Total 0 Seconds spent 0.000156"}#2##Missing item key in request##Again, response is success but Total is 0 ]} { "response":"success", "info":"Processed 0 Failed 0 Total 0 Seconds spent 0.000011"}#3##Missing item value##Again, response is success but Total is 0 ]} { "response":"success", "info":"Processed 0 Failed 0 Total 0 Seconds spent 0.000011"}#4##Incorrect hostname##Response is still success, although here, it correctly says Failed 1 ]} { "response":"success", "info":"Processed 0 Failed 1 Total 1 Seconds spent 0.000121"}#5##Incorrect item key##Response is still success, although here, it correctly says Failed 1 ]} { "response":"success", "info":"Processed 0 Failed 1 Total 1 Seconds spent 0.000137"} |
Comments |
Comment by Mikhail Dobrinin [ 2012 Aug 22 ] |
I suspect that cases 4-5 are working as intended. However, if the correct action for a misspelled key or hostname is to mark as failed, then that should be the case for requests with missing fields as well, like in cases 1-3. |
Comment by Alexander Vladishev [ 2012 Aug 23 ] |
Fixed in the development branch svn://svn.zabbix.com/branches/dev/ZBX-5483 |
Comment by richlv [ 2012 Aug 23 ] |
hmm, i guess it's not merged yet ? |
Comment by Alexander Vladishev [ 2012 Aug 23 ] |
Rich, thank you! |
Comment by dimir [ 2012 Aug 27 ] |
Cases 4-5 are indeed working as intended. The response will be "success" in case request contains any data. In cases 1-3 indeed the returned "info" had incorrect counters which was fixed. |
Comment by dimir [ 2012 Aug 27 ] |
Successfully tested. |
Comment by Alexander Vladishev [ 2012 Aug 27 ] |
Fixed in pre-2.0.3 r29878 and pre-2.1.0 (trunk) r29879. |