Git Product home page Git Product logo

regular_mail's Introduction

grafana_dashboard_mail

定时发送Grafana的Dashboard面板图日报邮件

  • main.py:入口文件

  • get_grafana_dashboard.py:通过组装url下载指定时间区间的日报dashboard图片

  • send_mail.py:发送日报邮件或者下载失败的体型邮件

  • schedule:第三方定时器库(https://github.com/dbader/schedule)

  • rm_picture.py:删除生成的图片

  • config.py: 配置文件

配置文件详解:

  • grafana_server:grafana server 地址

    eg.'http://ip:端口'

  • header :grafana api 访问鉴权

    eg. {"Authorization": "Bearer APIKEY"}

  • dashboard_list : 要访问的图标信息

    eg. [['图表名称',"图表dbuid",'其他参数(&var-node=xxxx)'],['图表名称',"图表dbuid",'其他参数(&var-node=xxxx)']

    #邮件发送相关信息

  • gserver : 'smtp.qq.com' gport :25 username : 发送邮箱的名称 password : 邮箱的授权码 mailfrom : 发送邮件的邮箱地址 mailto : 邮件接收方邮箱地址 eg. mailto = [mail1'','mail2'] mailcc : 邮件抄送方邮箱地址 subject : 邮件主题

regular_mail's People

Contributors

liyu0420 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.