Compare commits
7 Commits
pkg/stagin
...
2.6.2/mast
Author | SHA1 | Date | |
---|---|---|---|
a681d455fe | |||
0a3658fa57 | |||
c25b004d3b | |||
f9cb3d35b1 | |||
b4ff9a35fd | |||
dc43a0f26c | |||
a306f5ce19 |
@ -1,10 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<creole>
|
||||
<files>
|
||||
<file filelist='prometheus' name='/etc/default/prometheus' source='prometheus.defaults' mkdir='True' rm='True'/>
|
||||
<file filelist='prometheus' name='/etc/default/prometheus' source='prometheus.defaults' mkdir='True' rm='True'/>
|
||||
<file filelist='prometheus' name='/etc/prometheus/prometheus.yml' mkdir='True' rm='True'/>
|
||||
<file filelist='alertmanager' name='/etc/prometheus/alertmanager.yml' mkdir='True' rm='True'/>
|
||||
<file filelist='alertmanager' name='/etc/prometheus/rules.d/alert-rules.yml' mkdir='True' rm='True'/>
|
||||
<file filelist='alertmanager' name='/etc/prometheus/rules.d/alert-rules.yml' mkdir='True' rm='True'/>
|
||||
<file filelist='alertmanager' name='/etc/prometheus/rules.d/predict-rules.yml' mkdir='True' rm='True'/>
|
||||
<file filelist='grafana' name='/etc/grafana/grafana.ini' mkdir='True' rm='True'/>
|
||||
|
||||
<service>prometheus</service>
|
||||
@ -58,7 +59,7 @@
|
||||
|
||||
<!-- Job standard -->
|
||||
<variable name='prTarg' type='string' description='Nom de la cible prometheus' multi='True'/>
|
||||
<variable name='prTargIP' type='ip' description="Adresse IP de la cible prometheus"/>
|
||||
<variable name='prTargIP' type='string' description="Adresse IP ou nom de domaine de la cible prometheus"/>
|
||||
<variable name='prTargSonde' type='string' description="Sonde a utiliser pour ce client">
|
||||
<value>Node Exporter</value>
|
||||
</variable>
|
||||
@ -77,6 +78,9 @@
|
||||
<variable name='scrpScheme' type='string' description="Protocole à utiliser pour l'interrogation de la sonde">
|
||||
<value>http</value>
|
||||
</variable>
|
||||
<variable name='scrpMetricPath' type='string' description="Chemin d'accès de la ressource">
|
||||
<value>/metrics</value>
|
||||
</variable>
|
||||
|
||||
<variable name='addPrOpenTarg' type='oui/non' description="Ajouter des cibles statiques pour les jobs personnalisé">
|
||||
<value>non</value>
|
||||
@ -84,7 +88,7 @@
|
||||
<!-- Job libre -->
|
||||
<variable name='prOpenTarg' type='string' description='Nom de la cible personnalisé prometheus' multi='True'/>
|
||||
<variable name='prOpenTargJob' type='string' description='Nom du job de rattachement de la cible'/>
|
||||
<variable name='prOpenTargIP' type='ip' description="Adresse IP de la cible"/>
|
||||
<variable name='prOpenTargIP' type='string' description="Adresse IP ou nom de domaine de la cible"/>
|
||||
<variable name='prOpenTargPort' type='number' description="Port d'écoute de la sonde"/>
|
||||
</family>
|
||||
|
||||
@ -104,6 +108,7 @@
|
||||
<variable name='grafana_auth_anonymous' type='string' description="Activer l'accès aux utilisateurs non enregistrés">
|
||||
<value>false</value>
|
||||
</variable>
|
||||
<variable name='grafanaRootURL' type='string' description='Url publique de grafana (avec http:// ou https://)' mode='expert'/>
|
||||
</family>
|
||||
|
||||
<family name="alertes prometheus">
|
||||
@ -147,7 +152,7 @@
|
||||
<separators>
|
||||
<separator name='activer_grafana'>Services complèmentairse</separator>
|
||||
<separator name='prometheusJobName'>Configuration du serveur Prometheus</separator>
|
||||
<separator name='job_name_node'>Configuration des jobs standards</separator>
|
||||
<separator name='job_name_node'>Configuration des jobs standards</separator>
|
||||
<separator name='alSMTPHost'>Configuration SMTP pour l'envois des alertes</separator>
|
||||
<separator name='alReceiver'>Destinatires</separator>
|
||||
<separator name='alRoute'>Rêgles de distribution simples</separator>
|
||||
@ -166,7 +171,8 @@
|
||||
<slave>scrpInterval</slave>
|
||||
<slave>scrpTimeout</slave>
|
||||
<slave>honorLabels</slave>
|
||||
<slave>scrpScheme</slave>
|
||||
<slave>scrpScheme</slave>
|
||||
<slave>scrpMetricPath</slave>
|
||||
</group>
|
||||
|
||||
<group master='alRoute'>
|
||||
|
@ -33,7 +33,7 @@ groups:
|
||||
# Heavy "/" use
|
||||
- alert: filesystem_threshold_exceeded
|
||||
expr: node_filesystem_avail{job="%%{job_name_node}",mountpoint="/"} / node_filesystem_size{job="%%{job_name_node}"}
|
||||
* 100 < 90
|
||||
* 100 < 20
|
||||
annotations:
|
||||
description: This device's filesystem usage has exceeded the threshold with
|
||||
a value of {{ $value }}.
|
||||
|
@ -4,12 +4,13 @@ global:
|
||||
%if %%tls_smtp == "non"
|
||||
smtp_smarthost: '%%exim_relay_smtp:25'
|
||||
%elif %%tls_smtp == "port 25"
|
||||
smtp_smarthost: '%%exim_relay_smtp:25'
|
||||
smtp_require_tls: true
|
||||
%else
|
||||
smtp_smarthost: '%%exim_relay_smtp:465'
|
||||
smtp_require_tls: true
|
||||
smtp_smarthost: '%%exim_relay_smtp:25'
|
||||
smtp_require_tls: true
|
||||
%else
|
||||
smtp_smarthost: '%%exim_relay_smtp:465'
|
||||
smtp_require_tls: true
|
||||
%end if
|
||||
smtp_from: '%%system_mail_from'
|
||||
%else
|
||||
smtp_smarthost: '%%alSMTPHost:%%alSMTPPort'
|
||||
smtp_from: '%%alFrom'
|
||||
@ -31,8 +32,8 @@ global:
|
||||
#hipchat_api_url: 'https://hipchat.foobar.org/'
|
||||
|
||||
# The directory from which notification templates are read.
|
||||
templates:
|
||||
- '/etc/alertmanager/template/*.tmpl'
|
||||
templates:
|
||||
- '/etc/alertmanager/template/*.tmpl'
|
||||
|
||||
# The root route on which each incoming alert enters.
|
||||
route:
|
||||
@ -54,12 +55,12 @@ route:
|
||||
|
||||
# If an alert has successfully been sent, wait 'repeat_interval' to
|
||||
# resend them.
|
||||
repeat_interval: 3h
|
||||
repeat_interval: 3h
|
||||
|
||||
# A default receiver
|
||||
receiver: %%alDefaultReceiver
|
||||
|
||||
# All the above attributes are inherited by all child routes and can
|
||||
# All the above attributes are inherited by all child routes and can
|
||||
# overwritten on each.
|
||||
|
||||
# The child route trees.
|
||||
@ -119,7 +120,7 @@ route:
|
||||
|
||||
# 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
|
||||
# We use this to mute any warning-level notifications if the same alert is
|
||||
# already critical.
|
||||
inhibit_rules:
|
||||
- source_match:
|
||||
|
@ -40,11 +40,13 @@ domain = %%grafana_domain
|
||||
|
||||
# Redirect to correct domain if host header does not match domain
|
||||
# Prevents DNS rebinding attacks
|
||||
;enforce_domain = false
|
||||
enforce_domain = true
|
||||
|
||||
# The full public facing url you use in browser, used for redirects and emails
|
||||
# If you use reverse proxy and sub path specify full url (with sub path)
|
||||
;root_url = http://localhost:3000
|
||||
%if %%is_empty('grafanaRootURL')
|
||||
root_url = %%grafanaRootURL
|
||||
%end if
|
||||
|
||||
# Log web requests
|
||||
;router_logging = false
|
||||
@ -299,18 +301,20 @@ enabled = %%grafana_auth_anonymous
|
||||
|
||||
#################################### SMTP / Emailing ##########################
|
||||
[smtp]
|
||||
;enabled = false
|
||||
;host = localhost:25
|
||||
%if %%getVar('activer_exim_relay_smtp','non') == 'oui'
|
||||
enabled = true
|
||||
host = %%exim_relay_smtp:25
|
||||
;user =
|
||||
# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
|
||||
;password =
|
||||
;cert_file =
|
||||
;key_file =
|
||||
;skip_verify = false
|
||||
;from_address = admin@grafana.localhost
|
||||
;from_name = Grafana
|
||||
skip_verify = true
|
||||
from_address = %%system_mail_from
|
||||
from_name = Grafana
|
||||
# EHLO identity in SMTP dialog (defaults to instance_name)
|
||||
;ehlo_identity = dashboard.example.com
|
||||
%end if
|
||||
|
||||
[emails]
|
||||
;welcome_email_on_sign_up = false
|
||||
|
6
tmpl/predict-rules.yml
Normal file
6
tmpl/predict-rules.yml
Normal file
@ -0,0 +1,6 @@
|
||||
groups:
|
||||
- name: PredictRules
|
||||
rules:
|
||||
- alert: disk_full_within_6_hours
|
||||
expr: predict_linear(node_filesystem_free{job="%%{job_name_node}",mountpoint="/"}[1h], 6 * 3600) < 0
|
||||
for: 5m
|
@ -22,7 +22,7 @@ scrape_configs:
|
||||
|
||||
- job_name: '%%job_name_node'
|
||||
file_sd_configs:
|
||||
- files: [ "%%job_file_config/*.yml" ]
|
||||
# - files: [ "%%job_file_config/*.yml" ]
|
||||
%if %%getVar('addTargetPrometheus','non') == 'oui'
|
||||
static_configs:
|
||||
- targets: [ "%%adresse_ip_eth0:9100"%slurp
|
||||
@ -44,6 +44,7 @@ scrape_configs:
|
||||
scrape_interval: %%{job.scrpInterval}s
|
||||
scrape_timeout: %%{job.scrpTimeout}s
|
||||
scheme: %%job.scrpScheme
|
||||
metrics_path: %%job.scrpMetricPath
|
||||
%set first = True
|
||||
static_configs:
|
||||
- targets: [ %slurp
|
||||
|
Reference in New Issue
Block a user