# Automatic reporting not getting email

**URL:** <https://discuss.elastic.co/t/automatic-reporting-not-getting-email/91239>\
**Category:** Kibana\
**Tags:** elastic-stack-reporting\
**Created:** [June 29, 2017, 8:06am UTC](https://discuss.elastic.co/t/automatic-reporting-not-getting-email/91239 "2017-06-29T08:06:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raj\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raj_kumar/32/25420_2.png) [@Raj\_Kumar](https://discuss.elastic.co/u/Raj_Kumar)\
**Post date:** [June 29, 2017, 8:06am UTC](https://discuss.elastic.co/t/automatic-reporting-not-getting-email/91239/1 "2017-06-29T08:06:45Z")

</div>

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

```auto
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

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

```

after this I was trying to execute if this works

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

```

I get this

```auto
{
  "_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

 ![](https://us1.discourse-cdn.com/elastic/original/3X/5/4/548dd85826bedd779f75d4b32f09d5ba49dcc1f0.png)

Please anyone help me in fixing this issue .

Thanks,  
Raj

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 27, 2017, 8:06am UTC](https://discuss.elastic.co/t/automatic-reporting-not-getting-email/91239/2 "2017-07-27T08:06:47Z")

</div>

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