{"id":37980433,"url":"https://github.com/ix-ai/grafana-email","last_synced_at":"2026-01-16T18:34:11.182Z","repository":{"id":63725107,"uuid":"236165823","full_name":"ix-ai/grafana-email","owner":"ix-ai","description":"Connects to Grafana and sends an e-mail with attached graphs.","archived":false,"fork":false,"pushed_at":"2025-02-15T04:15:56.000Z","size":78,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T05:19:11.760Z","etag":null,"topics":["docker","email","grafana","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ix-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-25T12:14:55.000Z","updated_at":"2025-02-15T04:15:59.000Z","dependencies_parsed_at":"2024-05-21T08:30:00.060Z","dependency_job_id":"3e64ad89-f132-4504-ac45-288e0f897951","html_url":"https://github.com/ix-ai/grafana-email","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/ix-ai/grafana-email","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ix-ai%2Fgrafana-email","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ix-ai%2Fgrafana-email/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ix-ai%2Fgrafana-email/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ix-ai%2Fgrafana-email/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ix-ai","download_url":"https://codeload.github.com/ix-ai/grafana-email/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ix-ai%2Fgrafana-email/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","email","grafana","python"],"created_at":"2026-01-16T18:34:10.363Z","updated_at":"2026-01-16T18:34:11.155Z","avatar_url":"https://github.com/ix-ai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grafana-email\n\n[![Pipeline Status](https://gitlab.com/ix.ai/grafana-email/badges/master/pipeline.svg)](https://gitlab.com/ix.ai/grafana-email/)\n[![Docker Stars](https://img.shields.io/docker/stars/ixdotai/grafana-email.svg)](https://hub.docker.com/r/ixdotai/grafana-email/)\n[![Docker Pulls](https://img.shields.io/docker/pulls/ixdotai/grafana-email.svg)](https://hub.docker.com/r/ixdotai/grafana-email/)\n[![Docker Image Version (latest)](https://img.shields.io/docker/v/ixdotai/grafana-email/latest)](https://hub.docker.com/r/ixdotai/grafana-email/)\n[![Docker Image Size (latest)](https://img.shields.io/docker/image-size/ixdotai/grafana-email/latest)](https://hub.docker.com/r/ixdotai/grafana-email/)\n[![Gitlab Project](https://img.shields.io/badge/GitLab-Project-554488.svg)](https://gitlab.com/ix.ai/grafana-email/)\n\nConnects to Grafana and sends an e-mail with attached graphs.\n\n\u003e **Warning!** For grafana-email to work, you need the [grafana-image-renderer](https://grafana.com/grafana/plugins/grafana-image-renderer) plugin (details also here: [Image Rendering](https://grafana.com/docs/grafana/latest/administration/image_rendering/)). I'm using the docker image [grafana/grafana-image-renderer](https://hub.docker.com/r/grafana/grafana-image-renderer) for this. See below the example under [Grafana configuration on docker swarm, with grafana-image-renderer](#grafana-configuration-on-docker-swarm-with-grafana-image-renderer)\n\n## Supported environment variables\nExample panel url:\n```\nhttp://grafana1:3001/render/d-solo/gV6maGVZz/e-mail-reports?orgId=1\u0026from=1562006810978\u0026to=1562078810980\u0026panelId=2\u0026width=1000\u0026height=500\u0026tz=Europe%2FOslo\n```\n\nYou can see the panel url by selecting `Share` in a panel menu (click on its name) -\u003e `Link` -\u003e `Direct link rendered image`\n\n\n| **Variable**          | **Default**            | **Mandatory** | **Description**                                                        |\n|:----------------------|:----------------------:|:-------------:|:-----------------------------------------------------------------------|\n| `GRAFANA_TOKEN`       | -                      | **YES**       | the authentication token for Grafana |\n| `GRAFANA_DASHBOARD`   | -                      | **YES**       | the short code for the dashboard (example: **`gV6maGVZz/e-mail-reports`**) |\n| `SMTP_FROM`           | -                      | **YES**       | the e-mail address of the sender |\n| `SMTP_TO`             | -                      | **YES**       | the e-mail address of the receipient. Alternatively, a space separated list of recipients. |\n| `SMTP_PORT`           | `25`                   | NO            | the port for the SMTP host |\n| `SMTP_HOST`           | `localhost`            | NO            | the SMTP host |\n| `SMTP_SUBJECT`        | `Grafana Email Report` | NO            | the e-mail subject |\n| `PANEL_IDS`           | `1`                    | NO            | comma separated list with the IDs of the panels (example: `2`) |\n| `PANEL_ORG_ID`        | `1`                    | NO            | the Grafana organization (in example: `1`) |\n| `PANEL_FROM`          | `now-1d`               | NO            | the start of the panel time interval (example: `1562006810978`) |\n| `PANEL_TO`            | `now`                  | NO            | the end of the panel time interval (example: `1562078810980`) |\n| `PANEL_WIDTH`         | `500`                  | NO            | the width of the image in pixels (example: `1000`) |\n| `PANEL_HEIGHT`        | `250`                  | NO            | the height of the image in pixels (example: `500`) |\n| `PANEL_THEME`         | `light`                | NO            | one of `dark`, `light` |\n| `GRAFANA_HOST`        | `grafana`              | NO            | the hostname or FQDN of the Grafana host (example: `grafana1`) |\n| `GRAFANA_PORT`        | `3000`                 | NO            | the port for the Grafana host (example: `3001`) |\n| `GELF_PORT`           | `12201`                | NO            | if `GELF_HOST` is configured (see below), use this **UDP** port for logging |\n| `LOGLEVEL`            | `INFO`                 | NO            | [Logging Level](https://docs.python.org/3/library/logging.html#levels) |\n| `GELF_HOST`           | -                      | NO            | the GELF capable host, for logging |\n| `SMTP_USER`           | -                      | NO            | fill this out, if your SMTP server requires authentication |\n| `SMTP_PASSWORD`       | -                      | NO            | fill this out, if your SMTP server requires authentication |\n| `PANEL_TZ`            | -                      | NO            | the timezone, needed for timestamp `PANEL_FROM` or `PANEL_TO` (example: `Europe/Oslo`) |\n| `PANEL_TIMEOUT`       | -                      | NO            | the timeout for Grafana to generate the panel |\n| `GRAFANA_HEADER_HOST` | -                      | NO            | useful if the hostname of the Grafana host/container is set to something than the FQDN in Grafana |\n| `GRAFANA_URL_PARAMS`  | -                      | NO            | add additional URL params (example: `var-RequestHost=alex\u0026var-Filters=OriginStatus\\|!%3D\\|404`) |\n| `GRAFANA_SSL_VERIFY`  | TRUE                   | NO            | set to `FALSE` to ignore SSL certificate errors |\n| `GRAFANA_TIMEOUT`     | 60                     | NO            | the number of seconds to wait for the connection to Grafana |\n\n## Examples\n### Bash\n```sh\ndocker run -it --rm --name=grafana-email \\\n  -e GRAFANA_TOKEN='MyAmazingTokenFromGrafana=' \\\n  -e GRAFANA_DASHBOARD=\"gV6maGVZz/e-mail-reports\" \\\n  -e SMTP_FROM=\"test-docker@example.com\" \\\n  -e SMTP_TO=\"grafana@example.com\" \\\n  -e SMTP_HOST=\"10.0.10.1\" \\\n  -e PANEL_IDS=\"2,5,6\" \\\n  -e PANEL_FROM=\"now-6h\" \\\n  -e PANEL_THEME=\"light\" \\\n  -e PANEL_TZ=\"Europe/Berlin\" \\\n  -e GRAFANA_HOST=\"grafana1\" \\\n  -e GRAFANA_PORT=\"3001\" \\\n  -e GELF_HOST=\"graylog\" \\\n  -e GRAFANA_HEADER_HOST=\"grafana.example.com\" \\\n  -e LOGLEVEL=\"DEBUG\" \\\n  registry.gitlab.com/ix.ai/grafana-email:latest\n```\n\n### systemd example:\nPlace the files under `/etc/systemd/system` and run `sudo systemctl daemon-reload`. You can test it by running\n`sudo systemctl start grafana-email.service --now`.\n#### grafana-email.service\n```\n[Unit]\nDescription=Send an e-mail with Grafana graphs\nAfter=docker.service\n\n[Service]\nType=oneshot\nExecStart=docker run -it --rm --name=grafana-email \\\n-e GRAFANA_TOKEN='MyAmazingTokenFromGrafana=' \\\n-e GRAFANA_DASHBOARD=\"gV6maGVZz/e-mail-reports\" \\\n-e SMTP_FROM=\"test-docker@example.com\" \\\n-e SMTP_TO=\"grafana@example.com\" \\\n-e SMTP_HOST=\"10.0.10.1\" \\\n-e PANEL_IDS=\"2,5,6\" \\\n-e PANEL_FROM=\"now-6h\" \\\n-e PANEL_THEME=\"light\" \\\n-e PANEL_TZ=\"Europe/Berlin\" \\\n-e GRAFANA_HOST=\"grafana1\" \\\n-e GRAFANA_PORT=\"3001\" \\\n-e GELF_HOST=\"graylog\" \\\n-e GRAFANA_HEADER_HOST=\"grafana.example.com\" \\\n-e LOGLEVEL=\"DEBUG\" \\\nregistry.gitlab.com/ix.ai/grafana-email:latest\n```\n#### grafana-email.timer\n```\n[Unit]\nDescription=Timer for grafana-email.service daily at 06:59\n\n[Timer]\nOnCalendar=06:59\n\n[Install]\nWantedBy=multi-user.target\n```\n\n### Grafana configuration on docker swarm, with grafana-image-renderer\n```yml\nversion: '3.7'\n\nservices:\n  grafana:\n    image: grafana/grafana:latest\n    environment:\n      GF_INSTALL_PLUGINS: grafana-image-renderer\n      GF_LOG_FILTERS: rendering:debug\n      GF_RENDERING_SERVER_URL: http://grafana-image-renderer:8081/render\n      GF_RENDERING_CALLBACK_URL: http://grafana:3000/\n  grafana-image-renderer:\n    image: grafana/grafana-image-renderer:latest\n    networks:\n      - grafana-email\n    environment:\n      ENABLE_METRICS: 'true'\n      LOG_LEVEL: 'info'\n```\n\n## Tags and Arch\n\nStarting with version v0.3.0, the images are multi-arch, with builds for amd64, arm64 and armv7. Version v0.4.0 also\nadds 386 build.\n\n* `vN.N.N` - for example v0.3.0\n* `latest` - always pointing to the latest version\n* `dev-master` - the last build on the master branch\n\n## Resources:\n* GitLab: https://gitlab.com/ix.ai/grafana-email\n* GitHub: https://github.com/ix-ai/grafana-email\n* GitLab Registry: https://gitlab.com/ix.ai/grafana-email/container_registry\n* Docker Hub: https://hub.docker.com/r/ixdotai/grafana-email\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fix-ai%2Fgrafana-email","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fix-ai%2Fgrafana-email","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fix-ai%2Fgrafana-email/lists"}