Zabbix Documentation 1.8

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools


api:drule

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

api:drule [2014/09/30 12:54]
api:drule [2014/09/26 11:22] (current)
sasha Links adapted because of a move operation
Line 1: Line 1:
 +===== DRule =====
 +==== Methods ====
  
 +Class containing methods for operations with Discovery Rules.
 +^Methods^Description^
 +|[[api:​drule:​get|get()]] |Get discovery rule details |
 +|[[api:​drule:​exists|exists()]] |Check if discovery rule exists |
 +|[[api:​drule:​create|create()]] |Create discovery rules |
 +|[[api:​drule:​update|update()]] |Update discovery rule details |
 +|[[api:​drule:​delete|delete()]] |Delete discovery rules |
 +
 +
 +==== Object details ====
 +
 +The table contains complete list of Discovery Rule attributes.
 +
 +^Parameter^Type^Description^Details^
 +|druleid|//​integer//​|Discovery Rule ID | |
 +|proxy_hostid|//​integer//​|Proxy Host ID.  | |
 +|name|//​string//​|Discovery Rule name. | |
 +|iprange|//​string//​|Ip range. | |
 +|delay|//​integer//​|Delay between checks ​ | |
 +|nextcheck|//​integer//​|Next check date  | Zabbix internal field|
 +|status|//​integer//​|Status ​ | |
 +|unique_dcheckid|//​string//​|Unique discovery check ID  | |
 +
 +
 +==== Common tasks ====
 +The table contains list of common discovery rule-related tasks and possible implementation using Zabbix API
 +^Task^HOWTO^
 +|Add a bunch of new discovery rules | Use method **discovery rule.create** with array of Discovery Rule objects |
 +|Enable a discovery rule | Use method **drule.update**,​ set **"​status":​0** |
 +|Disable a discovery rule | Use method **drule.update**,​ set **"​status":​1** |
 +|Retrieve discovery rule details by Discovery Rule IDs | Use method **drule.get** with parameter **druleids** |
 +|Retrieve discovery rule details by Discovery Rule name | Use method **drule.get** with parameter **filter**, specify **"​name":"<​your discovery rule>"​** |