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

Create action fail use ZabbixAPI

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • 3.2.10
    • API (A)

      Through ZabbixAPI failed to create action.
      execute command line parameters?

          method = "action.create",
          params = {
              "name": "Trigger action",
              "eventsource": 0,
              "status": 0,
              "esc_period": 120,
              "def_shortdata": "{TRIGGER.NAME}: {TRIGGER.STATUS}",
              "def_longdata": "{TRIGGER.NAME}: {TRIGGER.STATUS}\r\nLast value: {ITEM.LASTVALUE}\r\n\r\n{TRIGGER.URL}",
              "filter": {
                  'evaltype': 0,
                  "conditions": [
                      {
                          "conditiontype": 4,
                          "operator": 5,
                          "value": "2"
                      }
                  ]
              },
              "operations": [
                  {
                      "operationtype": 0,
                      "opmessage_grp": [
                          {
                              "usrgrpid": "7"
                          }
                      ],
                      "opmessage": {
                          "default_msg": 1,
                          "mediatypeid": "0"
                      }
                  }
              ]
          }
          # pprint(params)
          result = zbx_api.get_http(method, params)
          pprint(result)
      

      execute command return:

      {u'message': u'Invalid params.', u'code': -32602, u'data': u'Incorrect API "".'}
      

            Unassigned Unassigned
            tiantian7223430 tim.tian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: