Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "watch_id": "eve-error-prod",
- "node": "VOHGKu7SRzut0oM5dyUNQg",
- "state": "executed",
- "user": "elastic",
- "status": {
- "state": {
- "active": true,
- "timestamp": "2020-03-19T09:08:40.697Z"
- },
- "last_checked": "2020-03-20T07:01:03.760Z",
- "last_met_condition": "2020-03-20T07:01:03.760Z",
- "actions": {
- "freshdesk_alert": {
- "ack": {
- "timestamp": "2020-03-19T09:08:40.697Z",
- "state": "awaits_successful_execution"
- },
- "last_execution": {
- "timestamp": "2020-03-20T07:01:03.760Z",
- "successful": false,
- "reason": "received [502] status code"
- }
- },
- "notify-slack": {
- "ack": {
- "timestamp": "2020-03-20T07:01:03.760Z",
- "state": "ackable"
- },
- "last_execution": {
- "timestamp": "2020-03-20T07:01:03.760Z",
- "successful": true
- },
- "last_successful_execution": {
- "timestamp": "2020-03-20T07:01:03.760Z",
- "successful": true
- }
- },
- "email_administrator": {
- "ack": {
- "timestamp": "2020-03-20T07:01:03.760Z",
- "state": "ackable"
- },
- "last_execution": {
- "timestamp": "2020-03-20T07:01:03.760Z",
- "successful": true
- },
- "last_successful_execution": {
- "timestamp": "2020-03-20T07:01:03.760Z",
- "successful": true
- }
- }
- },
- "execution_state": "executed",
- "version": -1
- },
- "trigger_event": {
- "type": "schedule",
- "triggered_time": "2020-03-20T07:01:03.760Z",
- "schedule": {
- "scheduled_time": "2020-03-20T07:01:03.401Z"
- }
- },
- "input": {
- "search": {
- "request": {
- "search_type": "query_then_fetch",
- "indices": [
- "eve-*"
- ],
- "rest_total_hits_as_int": true,
- "body": {
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "log_level": "[error]"
- }
- },
- {
- "match": {
- "fields.environment_type": "production"
- }
- },
- {
- "range": {
- "@timestamp": {
- "gte": "now-1m"
- }
- }
- }
- ]
- }
- }
- }
- }
- }
- },
- "condition": {
- "compare": {
- "ctx.payload.hits.total": {
- "gt": 0
- }
- }
- },
- "result": {
- "execution_time": "2020-03-20T07:01:03.760Z",
- "execution_duration": 2681,
- "input": {
- "type": "search",
- "status": "success",
- "payload": {
- "_shards": {
- "total": 31,
- "failed": 0,
- "successful": 31,
- "skipped": 0
- },
- "hits": {
- "hits": [
- {
- "_index": "eve-2020.03.19-000038",
- "_type": "_doc",
- "_source": {
- "duration": "0.610",
- "input": {
- "type": "log"
- },
- "agent": {
- "hostname": "a28-app-1",
- "id": "142ac904-9bab-4b61-8722-8dc9af43445a",
- "type": "filebeat",
- "ephemeral_id": "3c86989c-a1dd-4823-98fa-4c092281d63f",
- "version": "7.6.0"
- },
- "@timestamp": "2020-03-20T07:00:08.079Z",
- "ecs": {
- "version": "1.4.0"
- },
- "log": {
- "file": {
- "path": "/var/log/eve/console.log"
- },
- "offset": 0
- },
- "@version": "1",
- "log_level": "[error]",
- "host": {
- "name": "a28-app-1"
- },
- "message": "{{REMOVED}}",
- "fields": {
- "log_type": "eve.console",
- "environment": "A28",
- "alert_email": "devops",
- "environment_type": "production"
- },
- "tags": [
- "eve",
- "beats_input_codec_plain_applied"
- ]
- },
- "_id": "JMa99nABmhy27pMs9EAm",
- "_score": 4.6705303
- }
- ],
- "total": 1,
- "max_score": 4.6705303
- },
- "took": 1477,
- "timed_out": false
- },
- "search": {
- "request": {
- "search_type": "query_then_fetch",
- "indices": [
- "eve-*"
- ],
- "rest_total_hits_as_int": true,
- "body": {
- "query": {
- "bool": {
- "must": [
- {
- "match": {
- "log_level": "[error]"
- }
- },
- {
- "match": {
- "fields.environment_type": "production"
- }
- },
- {
- "range": {
- "@timestamp": {
- "gte": "now-1m"
- }
- }
- }
- ]
- }
- }
- }
- }
- }
- },
- "condition": {
- "type": "compare",
- "status": "success",
- "met": true,
- "compare": {
- "resolved_values": {
- "ctx.payload.hits.total": 1
- }
- }
- },
- "actions": [
- {
- "id": "freshdesk_alert",
- "type": "webhook",
- "status": "failure",
- "reason": "received [502] status code",
- "webhook": {
- "request": {
- "host": "{{REMOVED}}.freshdesk.com",
- "port": 443,
- "scheme": "https",
- "method": "post",
- "path": "/api/v2/tickets",
- "headers": {
- "Content-Type": "application/json"
- },
- "auth": {
- "basic": {
- "username": "::es_redacted::",
- "password": "::es_redacted::"
- }
- },
- "body": "{{REMOVED}}"
- },
- "response": {
- "status": 502,
- "headers": {
- "date": [
- "Fri, 20 Mar 2020 07:01:06 GMT"
- ],
- "content-length": [
- "54"
- ],
- "x-ratelimit-total": [
- "5000"
- ],
- "connection": [
- "keep-alive"
- ],
- "content-type": [
- "text/html; charset=UTF-8"
- ],
- "cache-control": [
- "no-cache, no-store, must-revalidate"
- ],
- "x-ratelimit-remaining": [
- "4999"
- ],
- "x-ratelimit-used-currentrequest": [
- "1"
- ],
- "status": [
- "502 Bad Gateway"
- ],
- "x-fw-ratelimiting-managed": [
- "true"
- ]
- },
- "body": "<h2>Incomplete response received from application</h2>"
- }
- }
- },
- {
- "id": "notify-slack",
- "type": "slack",
- "status": "success",
- "slack": {
- "account": "monitoring",
- "sent_messages": [
- {
- "status": "success",
- "to": "#devops-alerts",
- "message": {
- "from": "Elasticsearch - Watcher",
- "attachments": [
- {
- "color": "danger",
- "title": "Detected an error in the Eve console",
- "text": "{{REMOVED}}"
- }
- ]
- }
- }
- ]
- }
- },
- {
- "id": "email_administrator",
- "type": "email",
- "status": "success",
- "email": {
- "account": "work",
- "message": {
- "id": "email_administrator_eve-error-prod_c5847df7-d090-497a-8401-7a678bcb8fd2-2020-03-20T07:01:03.760691Z",
- "from": "Watcher Alert <[email protected]>",
- "sent_date": "2020-03-20T07:01:05.253232Z",
- "to": [
- ],
- "subject": "Detected an error in the Eve console for the [A28] Environment",
- "body": {
- "text": "{{REMOVED}}"
- }
- }
- }
- }
- ]
- },
- "messages": []
- }
Advertisement
Add Comment
Please, Sign In to add comment