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

API for maintenance do not work and zabbix server crash

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 2.0.9, 2.2.1
    • Fix Version/s: None
    • Component/s: API (A), Server (S)
    • Labels:
    • Environment:
      Zabbix server x32 on SLES11SP2 x64

      Description

      If I use the API to add a maintenance period, my zabbix server crash when time is equal to $tod_in_s (time of day in seconds). To solve the issue I have to remove the maintenance period created witth the API.

      Here is the command I use to create my maintenance period with API. If I click on the maintenance period created with this command, everything looks fine.

      curl -s -i -X POST -H 'Content-Type: application/json-rpc' -d '{
          "jsonrpc":"2.0",
          "method":"maintenance.create",
          "params":[{
              "groupids":[],
              "hostids":["$hostid"],
              "name":"$hostname",
              "maintenance_type":"0",
              "description":"$description",
              "active_since":"$start",
              "active_till":"$end",
              "timeperiods": [{
                  "timeperiod_type": "3",
                  "dayofweek": "$days",
                  "start_time": "$tod_in_s",
                  "start_date": "$start",
                  "period": "$duration"}]
              }],
          "auth":"$auth",
          "id":3}' $url)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ferchauf Frederic FERCHAUD
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: