X-pack Watcher Execution Status: Error!

alerting

(Nikhil Pawar) #1

Hi ,
i am able to add watcher action but seeing execution error .
Can someone help

 PUT _xpack/watcher/watch/my-watch
{
  "trigger": {
    "schedule": {
      "interval": "10s"
    }
  },
  "input": {
    "http": {
      "request": {
        "host": "10.62.8.15",
        "port": 9200,
        "path": "/_cluster/health"
      }
    }
  },
  "actions": {
    "logging": {
      "logging": {
        "text": "executed at {{ctx.execution_time}}"
      }
    },
    "notify-slack": {
      "slack": {
        "account": "monitoring",
        "message": {
          "from": "ELK Stack",
          "to": [ "#elastic-test" ],
          "text": "Watcher Alert Triggered!",
          "attachments": [
            {
              "title": "HSM_DISCONNECTED",
              "text": "Watch [{{ctx.metadata.name}}] threshold alert",
              "color": "danger"
            }
          ]
        }
      }
    }
  }
}

Execution output

Execution Status:
Error!

{
  "watch_id": "my-test-watch",
  "node": "Qd-MDj8XTjuPpD0En1VMKw",
  "state": "failed",
  "status": {
    "state": {
      "active": true,
      "timestamp": "2018-03-02T19:16:33.337Z"
    },
    "actions": {
      "logging": {
        "ack": {
          "timestamp": "2018-03-02T19:16:33.337Z",
          "state": "awaits_successful_execution"
        }
      },
      "notify-slack": {
        "ack": {
          "timestamp": "2018-03-02T19:16:33.337Z",
          "state": "awaits_successful_execution"
        }
      }
    },
    "execution_state": "failed",
    "version": -1
  },
  "trigger_event": {
    "type": "schedule",
    "triggered_time": "2018-03-02T19:28:23.754Z",
    "schedule": {
      "scheduled_time": "2018-03-02T19:28:23.473Z"
    }
  },
  "input": {
    "http": {
      "request": {
        "scheme": "http",
        "host": "10.62.8.15",
        "port": 9200,
        "method": "get",
        "path": "/_cluster/health",
        "params": {},
        "headers": {}
      }
    }
  },
  "condition": {
    "always": {}
  },
  "result": {
    "execution_time": "2018-03-02T19:28:23.754Z",
    "execution_duration": 1,
    "input": {
      "type": "http",
      "status": "failure",
      "error": {
        "root_cause": [
          {
            "type": "no_http_response_exception",
            "reason": "10.62.8.15:9200 failed to respond"
          }
        ],
        "type": "no_http_response_exception",
        "reason": "10.62.8.15:9200 failed to respond"
      },
      "http": {
        "request": {
          "host": "10.62.8.15",
          "port": 9200,
          "scheme": "http",
          "method": "get",
          "path": "/_cluster/health"
        }
      }
    },
    "actions": []
  },
  "messages": [
    "failed to execute watch input"
  ]
}

(Nikhil Pawar) #2

Can someone guide on this ?


(kulkarni) #3

Any logs to support this? Which version r u using ?

cc / @spinscale

Thanks
Rashmi


#4

You are telling your watch to gather input from the _cluster/health API of one of the Elastic servers:

  "input": {
"http": {
  "request": {
    "host": "10.62.8.15",
    "port": 9200,
    "path": "/_cluster/health"
  }
}

but the URL is not available to the server executing the watch:

  "error": {
    "root_cause": [
      {
        "type": "no_http_response_exception",
        "reason": "10.62.8.15:9200 failed to respond"
      }

So this seems to be a networking issue unrelated to Elastic. Perhaps you can try to set host to localhost?


(Nikhil Pawar) #5

apparently it was cert issue.


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.