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

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 2.0.9, 2.2.1
    • API (A), Server (S)
    • Zabbix server x32 on SLES11SP2 x64

      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)
      

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

              Created:
              Updated: