{"id":19076167,"url":"https://github.com/acalephstorage/kubernetes-alerts","last_synced_at":"2025-04-30T01:46:23.049Z","repository":{"id":73699237,"uuid":"46398365","full_name":"AcalephStorage/kubernetes-alerts","owner":"AcalephStorage","description":"Monitor Kubernetes and send alert notifications to Email, Slack etc","archived":false,"fork":false,"pushed_at":"2016-02-26T09:53:19.000Z","size":37,"stargazers_count":40,"open_issues_count":1,"forks_count":7,"subscribers_count":15,"default_branch":"develop","last_synced_at":"2025-04-18T20:49:14.651Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AcalephStorage.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,"zenodo":null}},"created_at":"2015-11-18T05:54:27.000Z","updated_at":"2022-11-11T00:43:52.000Z","dependencies_parsed_at":"2023-02-24T10:45:29.328Z","dependency_job_id":null,"html_url":"https://github.com/AcalephStorage/kubernetes-alerts","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AcalephStorage%2Fkubernetes-alerts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AcalephStorage%2Fkubernetes-alerts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AcalephStorage%2Fkubernetes-alerts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AcalephStorage%2Fkubernetes-alerts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AcalephStorage","download_url":"https://codeload.github.com/AcalephStorage/kubernetes-alerts/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251621400,"owners_count":21617741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-09T01:57:24.528Z","updated_at":"2025-04-30T01:46:23.034Z","avatar_url":"https://github.com/AcalephStorage.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"kube-alerts\n===========\n\n[![Build Status](https://travis-ci.org/AcalephStorage/kubernetes-alerts.svg?branch=develop)](https://travis-ci.org/AcalephStorage/kubernetes-alerts)\n\nMonitor Kubernetes and send alert notifications to Email, Slack etc.\n\nThis follows a similar approach to [consul-alerts](https://github.com/AcalephStorage/consul-alerts). \n\n## Requirement\n\n1. Kubernetes\n2. Heapster\n3. Etcd\n\nReleases\n--------\n\nBinaries are [here](https://github.com/AcalephStorage/kubernetes-alerts/releases) and docker images [here](https://quay.io/repository/acaleph/kube-alerts).\n\nBuild\n-----\n\nTo build from source, clone the repo:\n\n```\n$ git clone https://github.com/AcalephStorage/kubernetes-alerts.git\n$ cd kubernetes-alerts\n```\n\nGet gb (package manager):\n\n```\n$ go get github.com/constabulary/gb/...\n```\n\nGet dependencies:\n\n```\n$ make deps\n```\n\nand lastly, build:\n\n```\n$ make build\n```\n\nThe binary will be in `bin/$GOOS/$GOARCH` directory.\n\nDocker\n------\n\nThe docker image can be pulled from quay.io.\n\n```\n$ docker pull quay.io/acaleph/kube-alerts:$tag\n```\n\nUsage\n-----\n\n```\n$ kube-alerts [options]\n```\n\nor using docker:\n\n```\n$ docker run quay.io/acaleph/kube-alerts:$tag [options]\n```\n\nConfiguration\n-------------\n\n### Connection\n\nkube-alerts requires to connect to Kubernetes, Heapster, and ETCD. Here are the flags to configure the connections:\n\n#### Kubernetes flags\n\n| flag                       | description                                     | example                           |\n|----------------------------|-------------------------------------------------|-----------------------------------|\n| -k8s-api                   | the base url for the Kubernetes API             | https://localhost/api/v1          |\n| -k8s-certificate-authority | the certificate authority of the Kubernetes API | /etc/kubernetes/ssl/ca.pem        |\n| -k8s-client-certificate    | the client certificate for authentication       | /etc/kubernetes/ssl/admin.pem     |\n| -k8s-client-key            | the client key for authentication               | /etc/kubernetes/ssl/admin-key.pem |\n| -k8s-token                 | the token for authentication                    | F0XBLTDaL3xDlBsq5YKAFIH7yzZNBhs6  |\n\n#### Heapster flags\n\n| flag                            | description                                     | example                           |\n|---------------------------------|-------------------------------------------------|-----------------------------------|\n| -heapster-api                   | the base url for the Heapster API               | https://localhost/api/v1          |\n| -heapster-certificate-authority | the certificate authority of the Heapster API   | /etc/kubernetes/ssl/ca.pem        |\n| -heapster-client-certificate    | the client certificate for authentication       | /etc/kubernetes/ssl/admin.pem     |\n| -heapster-client-key            | the client key for authentication               | /etc/kubernetes/ssl/admin-key.pem |\n| -heapster-token                 | the token for authentication                    | F0XBLTDaL3xDlBsq5YKAFIH7yzZNBhs6  |\n\nNote: Heapster can be accessed via Kubernetes. The heapster flag may change (not yet used).\n\n#### KV store flags\n\n| flag                      | description                                        | example                      |\n|---------------------------|----------------------------------------------------|------------------------------|\n| -kv-addresses             | comma separated addresses for the KV store         | https://localhost:2379       |\n| -kv-backend               | the KV store backend (only etcd supported for now) | etcd                         |\n| -kv-certificate-authority | the certificate authority of the KV store          | /etc/etcd/ssl/ca.pem         |\n| -kv-client-certificate    | the client certificate for authentication          | /etc/etcd/ssl/client.pem     |\n| -kv-client-key            | the client key for authentication                  | /etc/etcd/ssl/client-key.pem |\n\n\n### Monitoring\n\nThere are three major kinds of checks that are monitored by kube-alerts. Node checks, cluster checks, and resource checks (pods). At the moment, only node checks are available. Here the options:\n\n#### Node check flags\n\n| flag                  | description                                                                  | example |\n|-----------------------|------------------------------------------------------------------------------|---------|\n| -node-check-interval  | interval when running the node checks (seconds)                              | 10      |\n| -node-check-threshold | amount of time (seconds) a change of state needed to qualify as state change | 60      |\n\n\n### Notification\n\nDifferent notifiers can be configured. At the moment, only Slack and Email are supported.\n\n#### General notification flags\n\n| flag                   | description                                                           | example |\n|------------------------|-----------------------------------------------------------------------|---------|\n| -notification-interval | amount of time (seconds) to wait before sending pending notifications | 60      |\n| -enable-email          | enable email notifier                                                 | true    |\n| -enable-slack          | enable slack notifier                                                 | true    |\n\n#### Email notifier flags\n\n| flag                   | description                                             | example       |\n|------------------------|---------------------------------------------------------|---------------|\n| -email-cluster-name    | the cluster name to appear on the default email message | acaleph       |\n| -email-url             | the SMTP server URL                                     | localhost     |     \n| -email-port            | the SMTP server port                                    | 25            |\n| -email-username        | the SMTP username                                       | user          |\n| -email-password        | the SMTP password                                       | password      |\n| -email-receivers       | comma-separated list of email to receive notifications  | dood@acale.ph |\n| -email-sender-email    | the email of the sender                                 | food@acale.ph |\n| -email-sender-alias    | alias of the sender                                     | kube-alerts   |\n| -email-template        | custom email template                                   |               |\n\nNote: The custom email template is optional, a default template will be used if this is not provided. (TODO: document custom template)\n\n#### Slack notifier flags\n\n| flag                | description                                             | example                              |\n|---------------------|---------------------------------------------------------|--------------------------------------|\n| -slack-cluster-name | the cluster name to appear on the default slack message | acaleph                              |\n| -slack-url          | the slack webhook URL                                   | https://hooks.slack.com/services/... |\n| -slack-username     | the username to appear on the slack message             | 25                                   |\n\n### Logging\n\nLog level can be set to limit the verbosity of the log.\n\n| flag       | description                                                   | example |\n|------------|---------------------------------------------------------------|---------|\n| -log-level | log level, valid values are [debug, info, warn, error, panic] | debug   |\n\nTODO\n----\n\nThis is an initial release, a few more things needs to be done:\n\n - [ ] implement cluster level checks\n - [ ] implement pod/resource level checks\n - [ ] document email template\n - [ ] add more notifiers\n - [ ] simpler configuration (via YAML?)\n - [ ] Real tests\n\nContribution\n------------\n\nPRs are more than welcome. Just fork, create a feature branch, and open a PR. :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facalephstorage%2Fkubernetes-alerts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facalephstorage%2Fkubernetes-alerts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facalephstorage%2Fkubernetes-alerts/lists"}