Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-11784

Invalid condition operators when using API to create actions

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.2.3
    • Fix Version/s: None
    • Component/s: API (A)
    • Labels:
      None

      Description

      The API docs for Actions indicate that creating action conditions will default to 0 for the operator, but that value is not valid.

      https://www.zabbix.com/documentation/3.2/manual/api/reference/action/object#action_operation_condition

      ie. doing an "action.create" via the API and not specifying the operator results in an invalid action condition, as can be seen in the server logs:

       27429:20170207:150425.793 unsupported operator [0] for condition id [123]
      

      And the same can be seen in the database:

      conditionid actionid conditiontype operator value
      123 107 24 0 "system_type": "feed"

      Here's a comparison with an action/condition that was created via the web interface:

      conditionid actionid conditiontype operator value
      18 14 24 2 "location": "us-east-1"

      Looks like the default operator should be "2" and not "0" for action conditions

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jrbeilke Jon Beilke
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: