update docker images
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
FROM quay.io/prometheus/alertmanager:latest as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
ARG SLACK_WEBHOOK_ID
|
||||
|
||||
COPY ${DOCKER_BUILD_DIR}/config.tmpl /etc/alertmanager/config.tmpl
|
||||
RUN sed 's@SLACK_WEBHOOK_ID@'"${SLACK_WEBHOOK_ID:-UNDEFINED}"'@g' /etc/alertmanager/config.tmpl > /etc/alertmanager/alertmanager.yml
|
||||
@@ -0,0 +1,224 @@
|
||||
# Documentation : https://prometheus.io/docs/alerting/configuration/
|
||||
|
||||
global:
|
||||
resolve_timeout: 5m
|
||||
slack_api_url: SLACK_WEBHOOK_ID
|
||||
# The smarthost and SMTP sender used for mail notifications.
|
||||
# smtp_smarthost: 'localhost:25'
|
||||
# smtp_from: 'alertmanager@domain.com'
|
||||
|
||||
# The root route on which each incoming alert enters.
|
||||
route:
|
||||
# The root route must not have any matchers as it is the entry point for
|
||||
# all alerts. It needs to have a receiver configured so alerts that do not
|
||||
# match any of the sub-routes are sent to someone.
|
||||
receiver: 'slack-default'
|
||||
|
||||
# The labels by which incoming alerts are grouped together. For example,
|
||||
# multiple alerts coming in for cluster=A and alertname=LatencyHigh would
|
||||
# be batched into a single group.
|
||||
# group_by: ['alertname', 'cluster']
|
||||
group_by: ['instance']
|
||||
|
||||
# When a new group of alerts is created by an incoming alert, wait at
|
||||
# least 'group_wait' to send the initial notification.
|
||||
# This way ensures that you get multiple alerts for the same group that start
|
||||
# firing shortly after another are batched together on the first
|
||||
# notification.
|
||||
group_wait: 1m
|
||||
|
||||
# When the first notification was sent, wait 'group_interval' to send a batch
|
||||
# of new alerts that started firing for that group.
|
||||
group_interval: 1m
|
||||
|
||||
# If an alert has successfully been sent, wait 'repeat_interval' to
|
||||
# resend them.
|
||||
repeat_interval: 1h
|
||||
|
||||
|
||||
# All the above attributes are inherited by all child routes and can
|
||||
# overwritten on each.
|
||||
|
||||
# The child route trees.
|
||||
# routes:
|
||||
# This routes performs a regular expression match on alert labels to
|
||||
# catch alerts that are related to a list of services.
|
||||
# - match_re:
|
||||
# service: ^(foo1|foo2|baz)$
|
||||
# receiver: team-X-mails
|
||||
|
||||
routes:
|
||||
- match:
|
||||
severity: "low"
|
||||
instance: "Hourly GMV"
|
||||
type: "lower than static threshold"
|
||||
receiver: slack-gmv-static-low
|
||||
|
||||
- match:
|
||||
severity: "high"
|
||||
instance: "Hourly GMV"
|
||||
type: "lower than static threshold"
|
||||
receiver: slack-gmv-static-high
|
||||
|
||||
- match:
|
||||
severity: "low"
|
||||
instance: "Hourly GMV"
|
||||
receiver: slack-gmv-low
|
||||
|
||||
- match:
|
||||
severity: "high"
|
||||
instance: "Hourly GMV"
|
||||
receiver: slack-gmv-high
|
||||
|
||||
- match:
|
||||
instance: "Hourly GMV test"
|
||||
receiver: slack-gmv-low
|
||||
|
||||
- match:
|
||||
severity: "low"
|
||||
receiver: slack-generic-low
|
||||
|
||||
- match:
|
||||
severity: "medium"
|
||||
receiver: slack-generic-medium
|
||||
|
||||
- match:
|
||||
severity: "high"
|
||||
receiver: slack-generic-high
|
||||
|
||||
- match:
|
||||
severity: "critical"
|
||||
receiver: slack-generic-critical
|
||||
|
||||
|
||||
# The service has a sub-route for critical alerts, any alerts
|
||||
# that do not match, i.e. severity != critical, fall-back to the
|
||||
# parent node and are sent to 'team-X-mails'
|
||||
# routes:
|
||||
# - match:
|
||||
# severity: critical
|
||||
# receiver: team-X-pager
|
||||
|
||||
|
||||
# Inhibition rules allow to mute a set of alerts given that another alert is
|
||||
# firing.
|
||||
# We use this to mute any warning-level notifications if the same alert is
|
||||
# already critical.
|
||||
inhibit_rules:
|
||||
|
||||
- source_match:
|
||||
severity: 'medium'
|
||||
target_match:
|
||||
severity: 'low'
|
||||
# Apply inhibition if the alertname is the same.
|
||||
equal: ['instance']
|
||||
|
||||
- source_match:
|
||||
severity: 'high'
|
||||
target_match:
|
||||
severity: 'medium'
|
||||
# Apply inhibition if the alertname is the same.
|
||||
equal: ['instance']
|
||||
|
||||
- source_match:
|
||||
severity: 'high'
|
||||
target_match:
|
||||
severity: 'low'
|
||||
# Addition for GMV, which has no "medium" severity
|
||||
equal: ['instance']
|
||||
|
||||
- source_match:
|
||||
severity: 'critical'
|
||||
target_match:
|
||||
severity: 'high'
|
||||
# Apply inhibition if the alertname is the same.
|
||||
equal: ['instance']
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
receivers:
|
||||
- name: 'slack-gmv-static-low'
|
||||
slack_configs:
|
||||
- api_url: SLACK_WEBHOOK_ID
|
||||
send_resolved: true
|
||||
username: 'Chouette Vigilante [severity - low]'
|
||||
icon_emoji: ':owl:'
|
||||
title: ':mostly_sunny: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
||||
text: "{{ .CommonAnnotations.description }}"
|
||||
|
||||
- name: 'slack-gmv-static-high'
|
||||
slack_configs:
|
||||
- api_url: SLACK_WEBHOOK_ID
|
||||
send_resolved: true
|
||||
username: 'Chouette Vigilante [severity - high]'
|
||||
icon_emoji: ':fallen_leaf:'
|
||||
title: ':tornado: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
||||
text: "{{ .CommonAnnotations.description }}"
|
||||
|
||||
- name: 'slack-gmv-low'
|
||||
slack_configs:
|
||||
- api_url: SLACK_WEBHOOK_ID
|
||||
send_resolved: true
|
||||
username: 'Chouette Vigilante [severity - low]'
|
||||
icon_emoji: ':owl:'
|
||||
title: ':mostly_sunny: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
||||
text: "{{ .CommonAnnotations.description }}
|
||||
\n
|
||||
\n{{ .CommonAnnotations.query }}"
|
||||
|
||||
- name: 'slack-gmv-high'
|
||||
slack_configs:
|
||||
- api_url: SLACK_WEBHOOK_ID
|
||||
send_resolved: true
|
||||
username: 'Chouette Vigilante [severity - high]'
|
||||
icon_emoji: ':fallen_leaf:'
|
||||
title: ':tornado: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
||||
text: "{{ .CommonAnnotations.description }}
|
||||
\n
|
||||
\n{{ .CommonAnnotations.query }}"
|
||||
|
||||
- name: 'slack-generic-low'
|
||||
slack_configs:
|
||||
- api_url: SLACK_WEBHOOK_ID
|
||||
send_resolved: true
|
||||
username: 'Chouette Vigilante [severity - low]'
|
||||
icon_emoji: ':owl:'
|
||||
title: ':mostly_sunny: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
||||
text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for a few seconds."
|
||||
|
||||
- name: 'slack-generic-medium'
|
||||
slack_configs:
|
||||
- api_url: SLACK_WEBHOOK_ID
|
||||
send_resolved: true
|
||||
username: 'Chouette Vigilante [severity - medium]'
|
||||
icon_emoji: ':owl:'
|
||||
title: ':sun_behind_rain_cloud: {{ .Status|toUpper }} issue on [ {{ .CommonLabels.instance }} ]'
|
||||
text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for more than 5 minutes."
|
||||
|
||||
- name: 'slack-generic-high'
|
||||
slack_configs:
|
||||
- api_url: SLACK_WEBHOOK_ID
|
||||
send_resolved: true
|
||||
username: 'Chouette Vigilante [severity - high]'
|
||||
icon_emoji: ':fallen_leaf:'
|
||||
title: ':tornado: {{ .Status|toUpper }} issue on {{ .CommonLabels.instance }}'
|
||||
text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for an hour"
|
||||
|
||||
- name: 'slack-generic-critical'
|
||||
slack_configs:
|
||||
- api_url: SLACK_WEBHOOK_ID
|
||||
send_resolved: true
|
||||
username: 'Chouette Vigilante [severity - critical]'
|
||||
icon_emoji: ':fire:'
|
||||
title: ':boom: {{ .Status|toUpper }} issue on {{ .CommonLabels.instance }}'
|
||||
text: "*{{ .CommonLabels.instance }}* had a *{{ .CommonLabels.type }}* issue for more than 12 hours"
|
||||
|
||||
- name: 'slack-default'
|
||||
slack_configs:
|
||||
- api_url: SLACK_WEBHOOK_ID
|
||||
send_resolved: true
|
||||
username: 'Chouette Vigilante [default]'
|
||||
icon_emoji: ':owl:'
|
||||
@@ -0,0 +1,7 @@
|
||||
FROM quay.io/prometheus/blackbox-exporter:latest as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
COPY ${DOCKER_BUILD_DIR}/config.yml /etc/blackbox_exporter/config.yml
|
||||
@@ -0,0 +1,38 @@
|
||||
modules:
|
||||
http_2xx:
|
||||
prober: http
|
||||
http:
|
||||
preferred_ip_protocol: "ip4"
|
||||
http_post_2xx:
|
||||
prober: http
|
||||
http:
|
||||
method: POST
|
||||
preferred_ip_protocol: "ip4"
|
||||
tcp_connect:
|
||||
prober: tcp
|
||||
pop3s_banner:
|
||||
prober: tcp
|
||||
tcp:
|
||||
query_response:
|
||||
- expect: "^+OK"
|
||||
tls: true
|
||||
tls_config:
|
||||
insecure_skip_verify: false
|
||||
ssh_banner:
|
||||
prober: tcp
|
||||
tcp:
|
||||
query_response:
|
||||
- expect: "^SSH-2.0-"
|
||||
irc_banner:
|
||||
prober: tcp
|
||||
tcp:
|
||||
query_response:
|
||||
- send: "NICK prober"
|
||||
- send: "USER prober prober prober :prober"
|
||||
- expect: "PING :([^ ]+)"
|
||||
send: "PONG ${1}"
|
||||
- expect: "^:[^ ]+ 001"
|
||||
icmp:
|
||||
prober: icmp
|
||||
icmp:
|
||||
preferred_ip_protocol: "ip4"
|
||||
@@ -0,0 +1,7 @@
|
||||
FROM braedon/prometheus-es-exporter:0.5.2 AS dist
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
COPY ${DOCKER_BUILD_DIR}/exporter.cfg /usr/src/app
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
@@ -0,0 +1,112 @@
|
||||
# This section defines default settings for how queries should be run.
|
||||
# All settings can be overridden for any given query in its own section.
|
||||
# The values shown in this example are also the fallback values used if
|
||||
# a setting is not specified in the DEFAULT section or a query's section.
|
||||
[DEFAULT]
|
||||
# How often to run queries.
|
||||
QueryIntervalSecs = 30
|
||||
# How long to wait for a query to return before timing out.
|
||||
QueryTimeoutSecs = 10
|
||||
# The indices to run the query on.
|
||||
# Any way of specifying indices supported by your Elasticsearch version can be used.
|
||||
QueryIndices = stats
|
||||
|
||||
# Queries are defined in sections beginning with 'query_'.
|
||||
# Characters following this prefix will be used as a prefix for all metrics
|
||||
# generated for this query
|
||||
[query_all]
|
||||
QueryIndices = stats
|
||||
QueryJson = {
|
||||
"size": 0,
|
||||
"query": {
|
||||
"match_all": {}
|
||||
}
|
||||
}
|
||||
|
||||
[query_gmv_hourly]
|
||||
QueryIndices = stats
|
||||
QueryIntervalSecs = 300
|
||||
QueryJson = {
|
||||
"size": 0,
|
||||
"query": {
|
||||
"constant_score": {
|
||||
"filter": {
|
||||
"range": { "date" : { "from" : "now-1h", "to" : "now" }}
|
||||
}
|
||||
}
|
||||
},
|
||||
"aggs": {
|
||||
"return": { "sum": { "field": "cartProductsPrice" } }
|
||||
}
|
||||
}
|
||||
|
||||
[query_gmv_hourly_oneweekago]
|
||||
QueryIndices = stats
|
||||
QueryIntervalSecs = 300
|
||||
QueryJson = {
|
||||
"size": 0,
|
||||
"query": {
|
||||
"constant_score": {
|
||||
"filter": {
|
||||
"range": { "date" : { "from" : "now-1w-1h", "to" : "now-1w" }}
|
||||
}
|
||||
}
|
||||
},
|
||||
"aggs": {
|
||||
"return": { "sum": { "field": "cartProductsPrice" } }
|
||||
}
|
||||
}
|
||||
|
||||
[query_gmv_hourly_twoweeksago]
|
||||
QueryIndices = stats
|
||||
QueryIntervalSecs = 300
|
||||
QueryJson = {
|
||||
"size": 0,
|
||||
"query": {
|
||||
"constant_score": {
|
||||
"filter": {
|
||||
"range": { "date" : { "from" : "now-2w-1h", "to" : "now-2w" }}
|
||||
}
|
||||
}
|
||||
},
|
||||
"aggs": {
|
||||
"return": { "sum": { "field": "cartProductsPrice" } }
|
||||
}
|
||||
}
|
||||
|
||||
[query_gmv_hourly_threeweeksago]
|
||||
QueryIndices = stats
|
||||
QueryIntervalSecs = 300
|
||||
QueryJson = {
|
||||
"size": 0,
|
||||
"query": {
|
||||
"constant_score": {
|
||||
"filter": {
|
||||
"range": { "date" : { "from" : "now-3w-1h", "to" : "now-3w" }}
|
||||
}
|
||||
}
|
||||
},
|
||||
"aggs": {
|
||||
"return": { "sum": { "field": "cartProductsPrice" } }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[query_gmv_hourly_fourweeksago]
|
||||
QueryIndices = stats
|
||||
QueryIntervalSecs = 300
|
||||
QueryJson = {
|
||||
"size": 0,
|
||||
"query": {
|
||||
"constant_score": {
|
||||
"filter": {
|
||||
"range": { "date" : { "from" : "now-4w-1h", "to" : "now-4w" }}
|
||||
}
|
||||
}
|
||||
},
|
||||
"aggs": {
|
||||
"return": { "sum": { "field": "cartProductsPrice" } }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
FROM quay.io/prometheus/prometheus:latest as dist
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
ARG DOCKER_BUILD_DIR
|
||||
|
||||
COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh /
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD []
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
ARG MONITORING_PRIMARY_TARGETS_BLACKBOX
|
||||
ARG MONITORING_SECONDARY_TARGETS_BLACKBOX
|
||||
|
||||
LABEL maintainer aynic.os <support+docker@asycn.io>
|
||||
|
||||
COPY ${DOCKER_BUILD_DIR}/prometheus.tmpl /etc/prometheus/prometheus.tmpl
|
||||
COPY ${DOCKER_BUILD_DIR}/alert-rules.yml /etc/prometheus/alert-rules.yml
|
||||
|
||||
@@ -13,10 +19,3 @@ COPY ${DOCKER_BUILD_DIR}/alert-rules.yml /etc/prometheus/alert-rules.yml
|
||||
RUN sed \
|
||||
-e 's|MONITORING_PRIMARY_TARGETS_BLACKBOX|'" - ${MONITORING_PRIMARY_TARGETS_BLACKBOX// /\\n - }"'|; s|MONITORING_SECONDARY_TARGETS_BLACKBOX|'" - ${MONITORING_SECONDARY_TARGETS_BLACKBOX// /\\n - }"'|' \
|
||||
/etc/prometheus/prometheus.tmpl > /etc/prometheus/prometheus.yml
|
||||
|
||||
COPY ${DOCKER_BUILD_DIR}/docker-entrypoint.sh /
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD []
|
||||
|
||||
FROM dist as master
|
||||
ARG DOCKER_BUILD_DIR
|
||||
Reference in New Issue
Block a user