Automatic reporting not getting email

Hi All,

Iam trying to generate a automatic report using xpack reporting through watcher.I tried this

Iam tying to generate reports automatically through watcher using

PUT _xpack/watcher/watch/error_report
{
  "trigger" : {
    "schedule": {
      "interval": "1d"
    }
  },
  "actions" : {
    "email_admin" : { 
      "email": {
        "to": "'xx@xx.dk'",
        "subject": "Error Monitoring Report",
        "attachments" : {
          "error_report.pdf" : {
            "reporting" : {
              "url": "http://x.x.x.x:5601/api/reporting/generate/dashboard/New-Dashboard-Netflow?_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-4h,mode:quick,to:now))&_a=(filters:!(),options:(darkTheme:!t),panels:!((col:1,id:Bytes-slash-hostname-slash-port,panelIndex:1,row:16,size_x:12,size_y:3,type:visualization)", 
              "retries":6, 
              "interval":"1s", 
              "auth":{ 
                "basic":{
                  "username":"elastic",
                  "password":"xxx"
                }
              }
            }
          }
        }
      }
    }
  }
}

then i get

{
  "_id": "error_report",
  "_version": 8,
  "created": true
}

after this I was trying to execute if this works

POST _xpack/watcher/watch/error_report/_execute
{
  "record_execution": true
}

I get this

{
  "_id": "error_report_0c53e317-2efd-4efb-ad37-cc257dbb96a0-2017-06-29T08:00:29.783Z",
  "watch_record": {
    "watch_id": "error_report",
    "state": "executed",
    "_status": {
      "state": {
        "active": true,
        "timestamp": "2017-06-29T07:59:47.404Z"
      },
      "last_checked": "2017-06-29T08:00:29.783Z",
      "last_met_condition": "2017-06-29T08:00:29.783Z",
      "actions": {
        "email_admin": {
          "ack": {
            "timestamp": "2017-06-29T07:59:47.404Z",
            "state": "awaits_successful_execution"
          },
          "last_execution": {
            "timestamp": "2017-06-29T08:00:29.783Z",
            "successful": false,
            "reason": "Watch[error_report] reporting[error_report.pdf] Error when polling pdf from host[x.x.x.x], port[5601], method[POST], path[/api/reporting/generate/dashboard/New-Dashboard-Netflow], status[200]"
          }
        }
      }
    },
    "trigger_event": {
      "type": "manual",
      "triggered_time": "2017-06-29T08:00:29.782Z",
      "manual": {
        "schedule": {
          "scheduled_time": "2017-06-29T08:00:29.782Z"
        }
      }
    },
    "input": {
      "none": {}
    },
    "condition": {
      "always": {}
    },
    "result": {
      "execution_time": "2017-06-29T08:00:29.783Z",
      "execution_duration": 2131,
      "input": {
        "type": "none",
        "status": "success",
        "payload": {}
      },
      "condition": {
        "type": "always",
        "status": "success",
        "met": true
      },
      "actions": [
        {
          "id": "email_admin",
          "type": "email",
          "status": "failure",
          "reason": "Watch[error_report] reporting[error_report.pdf] Error when polling pdf from host[x.x.x.x], port[5601], method[POST], path[/api/reporting/generate/dashboard/New-Dashboard-Netflow], status[200]"
        }
      ]
    },
    "messages": []
  }
}

and at top of the kibana i get this message

Please anyone help me in fixing this issue .

Thanks,
Raj

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