How to seed a dashboard png via webhook weekly?

Here we want to use watcher to send a weekly png report into a group such Wechat etc, which is produced from dashboard periodically. Email report is able to use attachment, while webhook doesn't have this parameter.

I used superset dashboard before, and it has this function like below:

{
  "trigger": {
    "schedule": {
      "interval": "1d"
    }
  },
  "input": {
    "none": {}
  },
  "condition": {
    "always": {}
  },
  "actions": {
    "my_webhook": {
      "throttle_period_in_millis": 300000,
      "webhook": {
        "scheme": "https",
        "host": "kibana-spx-es.idata.shopeemobile.com",
        "port": 443,
        "method": "post",
        "path": "/api/reporting/generate/png",
        "params": {
          "jobParams": "(browserTimezone:Asia/Shanghai,layout:(dimensions:(height:624,width:1792),id:png),objectType:dashboard,relativeUrl:'/app/dashboards#/view/8d8e92c0-0bb5-11ec-95a3-794d0fe236f9?_g=(filters:!!(),refreshInterval:(pause:!!t,value:0),time:(from:now-7d,to:now))&_a=(description:!'!',filters:!!((!'$state!':(store:appState),meta:(alias:!!n,controlledBy:!'1630568434041!',disabled:!!f,index:!'90f5a800-0bb4-11ec-95a3-794d0fe236f9!',key:addr_library_version,negate:!!f,params:(query:my_nonexpiredstations_center_google_geodisdistance_20190201_20210622),type:phrase),query:(match_phrase:(addr_library_version:my_nonexpiredstations_center_google_geodisdistance_20190201_20210622)))),fullScreenMode:!!f,options:(hidePanelTitles:!!f,useMargins:!!t),query:(language:kuery,query:!'!'),timeRestore:!!f,title:MY_offline_and_online%E5%9C%B0%E5%9D%80%E5%BA%93%E6%95%88%E6%9E%9C%E7%9B%91%E6%8E%A7,viewMode:view)',title:MY_offline_and_online地址库效果监控)"
        },
        "headers": {
          "kbn-xsrf": "reporting"
        },
        "auth": {
          "basic": {
            "username": "elastic",
            "password": "::es_redacted::"
          }
        }
      }
    },
    "seatalk_webhook": {
      "throttle_period_in_millis": 300000,
      "webhook": {
        "scheme": "https",
        "host": "openapi.seatalk.io",
        "port": 443,
        "method": "post",
        "path": "/webhook/group/7knUHqpZRuORtisLFQof4w",
        "params": {},
        "headers": {
          "Content-Type": "application/json"
        },
        "body": """{"tag": "text","text": {"content": "My_precision_report: https://kibana-spx-es.idata.shopeemobile.com/goto/838be424c8e0a22c6c7a35fb122950ea"} }"""
      }
    }
  }
}

Hello,

These are our docs. But I am confused if i am looking at Kibana in your screenshot? Are you using Kibana and watcher?

Thanks,
Bhavya

The screenshot is superset's function that i want to realize in kibana.
In fact, i want automatically produce a dashboard png, then send it to a IM group via webhook

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