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

IT Service.GetSLA incorrect result when "from" time in down-time

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • None
    • None
    • None

      When the requested period for service.getsla function starts in problem state in defined down-time, SLA result is calculated incorrectly.
      The problem looks similar to another bug (https://support.zabbix.com/browse/ZBX-16500).
      This one is reproduced in actual version 5.0.15

      Problem description:

      1. defined item and and trigger -> trigger was fired (PROBLEM status) between 8.9.2021 15:05 - 15:15
      2. defined IT Service based on the trigger
      3. defined IT Service down-time 8.9.2021 15:00 - 15:20
       
      Then I tried to calculate SLA for the service by API request
      like this:

      1. correct result for period 8.9.2021 14:55 - 15:25

      curl -ks
      -X POST -H 'Content-Type: application/json-rpc' https://127.0.0.1/zabbix/api_jsonrpc.php -d '
      {   
      "jsonrpc": "2.0",   
      "method": "service.getsla",   
      "params": {       
      "serviceids": "1",       
      "intervals": [           
      {               
      "from": 1631105700,               
      "to":   1631107500           
      }       
      ]   
      },   
      "auth": "mySID",   
      "id": 1
      }'
      
      result:
      {"jsonrpc":"2.0","result":{"1":{"status":"0","problems":[],"sla":[{"from":1631105700,"to":1631107500,"sla":100,"okTime":600,"problemTime":0,"downtimeTime":1200}]}},"id":1}
      
       
      

      2. wrong result for period 8.9.2021 15:10 - 15:25 - starts in problem state in down-time period

      curl -ks
      -X POST -H 'Content-Type: application/json-rpc' https://127.0.0.1/zabbix/api_jsonrpc.php -d '
      {   
      "jsonrpc": "2.0",   
      "method": "service.getsla",   
      "params": {       
      "serviceids": "1",   
          "intervals": [           
      {               
      "from": 1631106600,               
      "to":   1631107500           
      }       
      ]   
      },   
      "auth": "mySID",   
      "id": 1
      }'
      
      result:
      {"jsonrpc":"2.0","result":{"1":{"status":"0","problems":[],"sla":[{"from":1631106600,"to":1631107500,"sla":0,"okTime":0,"problemTime":300,"downtimeTime":600}]}},"id":1}

            zabbix.dev Zabbix Development Team
            agavrilovs Aleksandrs Petrovs-Gavrilovs
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: