Compare commits
22 Commits
2.6.2/mast
...
pkg/stagin
Author | SHA1 | Date | |
---|---|---|---|
a5347e4168 | |||
ee26997348 | |||
7f9d0d252d | |||
16da5b91fa | |||
24332a98c8 | |||
37d0dee412 | |||
be23766fc2 | |||
1f6a18a14b | |||
c0b430ec2c | |||
39e1ed720d | |||
d5fe43fc05 | |||
d154fcd94e | |||
fb6ee11d7a | |||
0614d2863a | |||
0bfbcc71ab | |||
cbf8d62cdc | |||
2af543c34e | |||
2da03082ec | |||
290231b394 | |||
4c6d88bae2 | |||
0a656de9e6 | |||
d1e5392a9a |
4
Makefile
4
Makefile
@ -1,9 +1,9 @@
|
||||
################################
|
||||
# Makefile pour XXX-XXX
|
||||
# Makefile pour eole-prometheus
|
||||
################################
|
||||
|
||||
SOURCE=eole-prometheus
|
||||
VERSION=0.1
|
||||
VERSION=0.0.1
|
||||
EOLE_VERSION=2.6
|
||||
EOLE_RELEASE=2.6.2
|
||||
PKGAPPS=non
|
||||
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
||||
7
|
11
debian/control
vendored
Normal file
11
debian/control
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
Source: eole-prometheus
|
||||
Section: web
|
||||
Priority: optional
|
||||
Maintainer: Cadoles <contact@cadoles.com>
|
||||
Build-Depends: debhelper (>= 9)
|
||||
Standards-Version: 3.9.3
|
||||
|
||||
Package: eole-prometheus
|
||||
Architecture: amd64
|
||||
Depends: ${misc:Depends}, prometheus, grafana, eole-node-exporter, prometheus-alertmanager, curl
|
||||
Description: Eolisation de Prometheus
|
44
debian/copyright
vendored
Normal file
44
debian/copyright
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
Format: http://dep.debian.net/deps/dep5
|
||||
Upstream-Name: {PROJECT}
|
||||
Source: {URL}
|
||||
|
||||
Files: *
|
||||
Copyright: YEAR {UPSTREAM} {AUTHOR} <{MAIL}>
|
||||
License: {UPSTREAM LICENSE}
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2012 Équipe EOLE <eole@ac-dijon.fr>
|
||||
License: CeCILL-2
|
||||
|
||||
License: {UPSTREAM LICENSE}
|
||||
{TEXT OF THE LICENSE}
|
||||
|
||||
License: CeCILL-2
|
||||
This software is governed by the CeCILL-2 license under French law and
|
||||
abiding by the rules of distribution of free software. You can use,
|
||||
modify and or redistribute the software under the terms of the CeCILL-2
|
||||
license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
"http://www.cecill.info";.
|
||||
.
|
||||
As a counterpart to the access to the source code and rights to copy,
|
||||
modify and redistribute granted by the license, users are provided only
|
||||
with a limited warranty and the software's author, the holder of the
|
||||
economic rights, and the successive licensors have only limited
|
||||
liability.
|
||||
.
|
||||
In this respect, the user's attention is drawn to the risks associated
|
||||
with loading, using, modifying and/or developing or reproducing the
|
||||
software by the user in light of its specific status of free software,
|
||||
that may mean that it is complicated to manipulate, and that also
|
||||
therefore means that it is reserved for developers and experienced
|
||||
professionals having in-depth computer knowledge. Users are therefore
|
||||
encouraged to load and test the software's suitability as regards their
|
||||
requirements in conditions enabling the security of their systems and/or
|
||||
data to be ensured and, more generally, to use and operate it in the
|
||||
same conditions as regards security.
|
||||
.
|
||||
The fact that you are presently reading this means that you have had
|
||||
knowledge of the CeCILL-2 license and that you accept its terms.
|
||||
.
|
||||
On Eole systems, the complete text of the CeCILL-2 License can be found
|
||||
in '/usr/share/common-licenses/CeCILL-2-en'.
|
0
debian/eole-prometheus.install
vendored
Normal file
0
debian/eole-prometheus.install
vendored
Normal file
8
debian/rules
vendored
Executable file
8
debian/rules
vendored
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
# export DH_VERBOSE=1
|
||||
|
||||
%:
|
||||
dh $@
|
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
@ -1,11 +1,10 @@
|
||||
<?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/predict-rules.yml' mkdir='True' rm='True'/>
|
||||
<file filelist='alertmanager' name='/etc/prometheus/rules.d/alert-rules.yml' mkdir='True' rm='True'/>
|
||||
<file filelist='grafana' name='/etc/grafana/grafana.ini' mkdir='True' rm='True'/>
|
||||
|
||||
<service>prometheus</service>
|
||||
@ -59,7 +58,7 @@
|
||||
|
||||
<!-- Job standard -->
|
||||
<variable name='prTarg' type='string' description='Nom de la cible prometheus' multi='True'/>
|
||||
<variable name='prTargIP' type='string' description="Adresse IP ou nom de domaine de la cible prometheus"/>
|
||||
<variable name='prTargIP' type='ip' description="Adresse IP de la cible prometheus"/>
|
||||
<variable name='prTargSonde' type='string' description="Sonde a utiliser pour ce client">
|
||||
<value>Node Exporter</value>
|
||||
</variable>
|
||||
@ -78,9 +77,6 @@
|
||||
<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>
|
||||
@ -88,7 +84,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='string' description="Adresse IP ou nom de domaine de la cible"/>
|
||||
<variable name='prOpenTargIP' type='ip' description="Adresse IP de la cible"/>
|
||||
<variable name='prOpenTargPort' type='number' description="Port d'écoute de la sonde"/>
|
||||
</family>
|
||||
|
||||
@ -108,7 +104,6 @@
|
||||
<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">
|
||||
@ -152,7 +147,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>
|
||||
@ -171,8 +166,7 @@
|
||||
<slave>scrpInterval</slave>
|
||||
<slave>scrpTimeout</slave>
|
||||
<slave>honorLabels</slave>
|
||||
<slave>scrpScheme</slave>
|
||||
<slave>scrpMetricPath</slave>
|
||||
<slave>scrpScheme</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 < 20
|
||||
* 100 < 90
|
||||
annotations:
|
||||
description: This device's filesystem usage has exceeded the threshold with
|
||||
a value of {{ $value }}.
|
||||
|
@ -4,13 +4,12 @@ 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'
|
||||
@ -32,8 +31,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:
|
||||
@ -55,12 +54,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.
|
||||
@ -120,7 +119,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,13 +40,11 @@ domain = %%grafana_domain
|
||||
|
||||
# Redirect to correct domain if host header does not match domain
|
||||
# Prevents DNS rebinding attacks
|
||||
enforce_domain = true
|
||||
;enforce_domain = false
|
||||
|
||||
# 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)
|
||||
%if %%is_empty('grafanaRootURL')
|
||||
root_url = %%grafanaRootURL
|
||||
%end if
|
||||
;root_url = http://localhost:3000
|
||||
|
||||
# Log web requests
|
||||
;router_logging = false
|
||||
@ -301,20 +299,18 @@ enabled = %%grafana_auth_anonymous
|
||||
|
||||
#################################### SMTP / Emailing ##########################
|
||||
[smtp]
|
||||
%if %%getVar('activer_exim_relay_smtp','non') == 'oui'
|
||||
enabled = true
|
||||
host = %%exim_relay_smtp:25
|
||||
;enabled = false
|
||||
;host = localhost:25
|
||||
;user =
|
||||
# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
|
||||
;password =
|
||||
;cert_file =
|
||||
;key_file =
|
||||
skip_verify = true
|
||||
from_address = %%system_mail_from
|
||||
from_name = Grafana
|
||||
;skip_verify = false
|
||||
;from_address = admin@grafana.localhost
|
||||
;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
|
||||
|
@ -1,6 +0,0 @@
|
||||
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,7 +44,6 @@ 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