[ZBX-8301] Zabbix API allows specify unique criteria for simple checks in discovery rule creation Created: 2014 Jun 04  Updated: 2017 May 30  Resolved: 2014 Jun 20

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 2.2.3
Fix Version/s: 2.3.2

Type: Incident report Priority: Minor
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: api, discoveryrule
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate

 Description   

There is possible to specify "uniq" = "1" for simple checks, like ICMP Ping, FTP, HTTP and other.

For example, the following API query is accepted without errors:
{
"jsonrpc": "2.0",
"method": "drule.create",
"params": {
"name": "test",
"iprange": "10.2.158.0\/24",
"dchecks": [

{ "type": "12", "uniq": "1" }

],
"proxy_hostid": "1010",
"delay": "3600",
"status": "0"
},
"auth": "****",
"id": 1
}



 Comments   
Comment by Pavels Jelisejevs (Inactive) [ 2014 Jun 05 ]

Uniqueness criteria can only be set for Zabbix agent, SNMPv1, SNMPv2 and SNMPv3 agent checks.

Comment by Andrejs Čirkovs (Inactive) [ 2014 Jun 06 ]

RESOLVED in r46253.

Comment by Andrejs Čirkovs (Inactive) [ 2014 Jun 06 ]

(1) Strings added: "Only Zabbix Agent, SNMPv1, SNMPv2 and SNMPv3 checks can be made unique."

richlv let's change that to "Zabbix agent" as per https://www.zabbix.org/wiki/Docs/specs/syntax#Syntax

andrewtch RESOLVED, updated in r46298.

sasha CLOSED

Comment by Alexander Vladishev [ 2014 Jun 09 ]

(2) Too long line.

self::exception(ZBX_API_ERROR_PARAMETERS, _s('Only Zabbix agent, SNMPv1, SNMPv2 and SNMPv3 checks can be made unique.'));

andrewtch RESOLVED in 46309.

sasha CLOSED

Comment by Alexander Vladishev [ 2014 Jun 09 ]

Please review my changes in r46309 before a merge.

andrewtch Looks fine, thanks.

Comment by Andrejs Čirkovs (Inactive) [ 2014 Jun 11 ]

CLOSED in r46428.

Comment by Pavels Jelisejevs (Inactive) [ 2014 Jun 20 ]

(3) This needs to be noted in the 2.2 API changelog

andrewtch RESOLVED

jelisejev CLOSED.

Generated at Sat Apr 20 00:01:56 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.