ExportXMLWordPrintable

    • Type: Problem report
    • Resolution: Won't Do
    • Priority: Trivial
    • None
    • Affects Version/s: 6.0.48, 6.0.49, 7.0.31, 8.0.0
    • Component/s: API (A)

      Line9    case '"Not classified':    <------ " is unneccesary.
       
      zabbix-webhook-patlite-1.1.yaml
      =======
      try {
          params = JSON.parse(value);

          req = new HttpRequest();
          params.HTTPProxy && req.setProxy(params.HTTPProxy);

          switch (params.severity)

      {         case '0':         case '"Not classified':             options = params.notclassified;             break;         case '1':         case 'Information':             options = params.information;             break;         case '2':         case 'Warning':             options = params.warning;             break;         case '3':         case 'Average':             options = params.average;             break;         case '4':         case 'High':             options = params.high;             break;         case '5':         case 'Disaster':             options = params.disaster;             break;         default:             options = '999999';     }

          url = 'http://' + params.IPAddress + '/api/control?alert=' + options;

          return req.get(url)
      }
      catch (error)

      {     Zabbix.Log(4, '[ Webhook ] Patlite notification failed : ' + error);     throw 'Patlite notification failed : ' + error; }

            Assignee:
            Piotr Wegrzyn
            Reporter:
            kujiraitakahiro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified