prometheus-alertmanager

Is the fingerprint field in Alertmanager unique?

丶灬走出姿态 提交于 2020-08-10 17:53:26
问题 I am developing a dashboard, which receives all Alertmanager readings and processes them. I looked for a unique field in the request payload to create a unique external alert id in my database. The request payload looks something like this: { "status": "firing", "labels": { "alertname": "", "app": "", "cluster": "", "deployed_location": "", "instance": "", "job": "", "kubernetes_namespace": "", "kubernetes_pod_name": "", "pod_template_hash": "", "release": "", "replica": "", "severity": "" },

How to trigger alert in Kubernetes using Prometheus Alert Manager

好久不见. 提交于 2020-05-16 20:11:51
问题 I have setup kube-prometheus in my cluster(https://github.com/coreos/prometheus-operator/tree/master/contrib/kube-prometheus). It contains some default alerts like "CoreDNSdown etc". How to create my own alert? Could any one provide me sample example to create an alert that will send an email to my gmail account? I followed this Alert when docker container pod is in Error or CarshLoopBackOff kubernetes. But I couldn't make it work. 回答1: To send an alert to your gmail account, you need to

How to trigger alert in Kubernetes using Prometheus Alert Manager

南楼画角 提交于 2020-05-16 20:11:29
问题 I have setup kube-prometheus in my cluster(https://github.com/coreos/prometheus-operator/tree/master/contrib/kube-prometheus). It contains some default alerts like "CoreDNSdown etc". How to create my own alert? Could any one provide me sample example to create an alert that will send an email to my gmail account? I followed this Alert when docker container pod is in Error or CarshLoopBackOff kubernetes. But I couldn't make it work. 回答1: To send an alert to your gmail account, you need to

How to trigger alert in Kubernetes using Prometheus Alert Manager

扶醉桌前 提交于 2020-05-16 20:11:28
问题 I have setup kube-prometheus in my cluster(https://github.com/coreos/prometheus-operator/tree/master/contrib/kube-prometheus). It contains some default alerts like "CoreDNSdown etc". How to create my own alert? Could any one provide me sample example to create an alert that will send an email to my gmail account? I followed this Alert when docker container pod is in Error or CarshLoopBackOff kubernetes. But I couldn't make it work. 回答1: To send an alert to your gmail account, you need to

Multiple Targets on prometheus

霸气de小男生 提交于 2020-01-15 17:20:40
问题 I've configured prometheus on Centos, version details are follows. prometheus-2.5.0.linux-386 I've added two targets on the prometheus.yml configuration file, all the servers node exporters are running. Config as follows, scrape_configs: - job_name: "node" scrape_interval: "15s" target_groups: - targets: ['192.168.x.x:9100','192.168.x.y:9100'] But in the prometheus UI Tragets only showing single node other is not showing. If I remove one node existing node is showing. How can I monitor

Multiple Targets on prometheus

萝らか妹 提交于 2020-01-15 17:19:09
问题 I've configured prometheus on Centos, version details are follows. prometheus-2.5.0.linux-386 I've added two targets on the prometheus.yml configuration file, all the servers node exporters are running. Config as follows, scrape_configs: - job_name: "node" scrape_interval: "15s" target_groups: - targets: ['192.168.x.x:9100','192.168.x.y:9100'] But in the prometheus UI Tragets only showing single node other is not showing. If I remove one node existing node is showing. How can I monitor

Alert when docker container pod is in Error or CarshLoopBackOff kubernetes

巧了我就是萌 提交于 2020-01-03 15:35:32
问题 I have my kubernetes cluster setup on AWS where I am trying to monitor several pods, using cAdvisor + Prometheus + Alert manager. What I want to do it launch an email alert (with service/container name) if a container/pod goes down or stuck in Error or CarshLoopBackOff state or stcuk in anyother state apart from running. 回答1: Prometheus collects a wide range of metrics. As an example, you can use a metric kube_pod_container_status_restarts_total for monitoring restarts, which will reflect

Prometheus Slack alert with FAQ url

帅比萌擦擦* 提交于 2019-12-13 05:42:19
问题 I have a Prometheus alert like this: - alert: NginxCrashLoop annotations: description: Nginx at {{ $labels.pod }} is in Crash Loop identifier: '{{ $labels.node }}' runbook_url: https://sites.google.com/a/domain.com/bi/faq/nginx expr: | rate(kube_pod_container_status_restarts_total{container="frontend"}[2m]) * on(namespace, pod) group_left(node) kube_pod_info * 3600 > 3 labels: severity: critical and a Go template for Slack custom alerting: {{ define "__single_message_title" }}{{ range .Alerts

Dynamic label values in Promethues alerting rules

試著忘記壹切 提交于 2019-12-11 17:46:50
问题 I am a bit of a novice with the monitoring world. Here is my question. I want to fire an alert only for a set of assets based on asset-id. My metrics looks like the below. test_value{asset_id="123"} 0.215 My alert manager rules looks like the below. name: iot_rules rules: - alert: threshhold_alert expr: test_value >= 4 #for: 1m labels: severity: critical probableCause: Communication failure annotations: summary: 'Error detected on {{$labels.assset_id}}' I get the templating feature on the

how to install latest version of prometheus/promtool in ubuntu?

被刻印的时光 ゝ 提交于 2019-12-11 11:32:56
问题 I downloaded my prometheus version is 2.3.2 wget https://github.com/prometheus/prometheus/releases/download/v2.3.2/prometheus-2.3.2.linux-amd64.tar.gz untared and prometheus already running as service. I want to verify my Prometheus alert manager rule using promtool. created one rule from below blog. https://petargitnik.github.io/blog/2018/01/04/how-to-write-rules-for-prometheus when I run the promtool check rules /etc/prometheus/prometheus.rules.yml it says, Promtheus not installed, so