Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
centos:web_c7:icinga:graphite [20.11.2015 21:15. ] – [python-carbon] django | centos:web_c7:icinga:graphite [18.11.2024 19:11. ] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== | + | ====== |
- | {{: | + | {{: |
+ | |||
+ | \\ | ||
<WRAP center round info 75%> | <WRAP center round info 75%> | ||
- | Obgleich es aktuell((Stand: | + | Obgleich es aktuell((Stand: |
</ | </ | ||
===== Installation ===== | ===== Installation ===== | ||
+ | ==== Vorbereitung ==== | ||
+ | Die einfachste und schnellste Variante bei der **[[centos: | ||
+ | |||
+ | ==== Informationen ===== | ||
Zum Erstellen und Einbinden der Graphen benötigen wir mehrere Programme und Daemons. | Zum Erstellen und Einbinden der Graphen benötigen wir mehrere Programme und Daemons. | ||
- | - **Generierung Performancedaten** \\ In Icinga Web 2 brauchen wir eine Möglichkeit, | + | - **Generierung Performancedaten** \\ In Icinga Web 2 brauchen wir eine Möglichkeit, |
- **Datenbank(files)** | - **Datenbank(files)** | ||
- | - **Whisper** \\ Zum Abspeichern der Rohdaten, greifen wir auf **python-whisper** einer Datenbank-Engine für schnelle und zuverlässige Speicherung von Daten, ähnlich wie [[http:// | + | - **Whisper** \\ Zum Abspeichern der Rohdaten, greifen wir auf **python-whisper** einer Datenbank-Engine für schnelle und zuverlässige Speicherung von Daten, ähnlich wie [[http:// |
- | - **MariaDB** \\ Zum Speichern der Konfigurationsdaten zu den Graphiken und Dashboards sowie der userspezifischen Einstellungen nutzen wir unsere MariaDB auf unserem Monitoring Host. | + | - **MariaDB** \\ Zum Speichern der Konfigurationsdaten zu den Graphiken und Dashboards sowie der userspezifischen Einstellungen nutzen wir unsere MariaDB auf unserem Monitoring Host. \\ \\ |
- | - **Aufbereiten der Daten und Generierung der Graphiken** \\ Zum Aufbereiten der Rohdaten und zur Generierung der Statistik-Graphen bedienen wir uns des Projektes **Graphite**. Das passende RPM stellt uns wiederum das Repository | + | - **Aufbereiten der Daten und Generierung der Graphiken** \\ Zum Aufbereiten der Rohdaten und zur Generierung der Statistik-Graphen bedienen wir uns des Projektes **[[http:// |
- **Icinga Web 2 Modul graphite** \\ Zum Einbinden der Echtzeitgraphiken in **Icinga Web 2** benötigen wir dann noch das Modul **icingaweb2-module-graphite**. Eine Vorabentwicklerversion laden holen wir uns direkt von der [[https:// | - **Icinga Web 2 Modul graphite** \\ Zum Einbinden der Echtzeitgraphiken in **Icinga Web 2** benötigen wir dann noch das Modul **icingaweb2-module-graphite**. Eine Vorabentwicklerversion laden holen wir uns direkt von der [[https:// | ||
Zeile 49: | Zeile 55: | ||
Build Host : vml000200.dmz.nausch.org | Build Host : vml000200.dmz.nausch.org | ||
Relocations : (not relocatable) | Relocations : (not relocatable) | ||
- | Packager | + | Packager |
URL : https:// | URL : https:// | ||
Summary | Summary | ||
Zeile 207: | Zeile 213: | ||
Build Host : vml000200.dmz.nausch.org | Build Host : vml000200.dmz.nausch.org | ||
Relocations : (not relocatable) | Relocations : (not relocatable) | ||
- | Packager | + | Packager |
URL : https:// | URL : https:// | ||
Summary | Summary | ||
Zeile 249: | Zeile 255: | ||
< | < | ||
- | Version | + | Version |
Release | Release | ||
Architecture: | Architecture: | ||
- | Install Date: Fri 20 Mar 2015 04:30:33 PM CET | + | Install Date: Fri 20 Nov 2015 09:46:40 PM CET |
Group : Applications/ | Group : Applications/ | ||
- | Size : 9298581 | + | Size : 9170954 |
License | License | ||
- | Signature | + | Signature |
- | Source RPM : graphite-web-0.9.12-1.el7.centos.src.rpm | + | Source RPM : graphite-web-0.9.14-1.el7.centos.src.rpm |
- | Build Date : Fri 20 Mar 2015 03:13:26 PM CET | + | Build Date : Fri 20 Nov 2015 09:26:34 PM CET |
Build Host : vml000200.dmz.nausch.org | Build Host : vml000200.dmz.nausch.org | ||
Relocations : (not relocatable) | Relocations : (not relocatable) | ||
- | Packager | + | Packager |
URL : https:// | URL : https:// | ||
Summary | Summary | ||
Zeile 381: | Zeile 387: | ||
/ | / | ||
/ | / | ||
- | / | ||
- | / | ||
- | / | ||
- | / | ||
- | / | ||
- | / | ||
- | / | ||
- | / | ||
- | / | ||
- | / | ||
/ | / | ||
/ | / | ||
Zeile 466: | Zeile 462: | ||
/ | / | ||
/ | / | ||
- | / | ||
/ | / | ||
/ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
/ | / | ||
/ | / | ||
Zeile 498: | Zeile 506: | ||
/ | / | ||
/ | / | ||
- | / | + | / |
- | / | + | / |
- | / | + | / |
- | / | + | / |
- | / | + | / |
- | / | + | / |
- | / | + | / |
- | / | + | / |
- | / | + | |
/ | / | ||
/ | / | ||
Zeile 548: | Zeile 555: | ||
/ | / | ||
/ | / | ||
- | / | ||
/ | / | ||
/ | / | ||
Zeile 555: | Zeile 561: | ||
/ | / | ||
/ | / | ||
- | / | ||
- | / | ||
- | / | ||
- | / | ||
- | / | ||
- | / | ||
- | / | ||
- | / | ||
/ | / | ||
- | / | + | / |
/ | / | ||
+ | / | ||
/ | / | ||
- | / | ||
- | / | ||
- | / | ||
/ | / | ||
/ | / | ||
- | / | ||
/ | / | ||
- | / | ||
/ | / | ||
/ | / | ||
- | / | + | / |
- | / | + | / |
- | / | + | / |
+ | / | ||
+ | / | ||
+ | / | ||
/ | / | ||
/ | / | ||
Zeile 1085: | Zeile 1082: | ||
/ | / | ||
/ | / | ||
- | / | ||
- | / | ||
- | / | ||
- | / | ||
- | / | ||
- | / | ||
/ | / | ||
/ | / | ||
Zeile 1103: | Zeile 1094: | ||
/ | / | ||
/ | / | ||
+ | / | ||
+ | / | ||
/ | / | ||
- | / | + | / |
- | </ | + | |
===== Konfiguration ===== | ===== Konfiguration ===== | ||
==== python-carbon ==== | ==== python-carbon ==== | ||
+ | === carbon.conf === | ||
Die Konfiguration von **python-carbon** erfolgt mit Hilfe der Konfigurationsdatei // | Die Konfiguration von **python-carbon** erfolgt mit Hilfe der Konfigurationsdatei // | ||
# vim / | # vim / | ||
- | <file python / | + | <file python / |
- | # Configure carbon directories. | + | # Configure carbon directories. |
- | # | + | # |
- | # OS environment variables can be used to tell carbon where graphite is | + | # OS environment variables can be used to tell carbon where graphite is |
- | # installed, where to read configuration from and where to write data. | + | # installed, where to read configuration from and where to write data. |
- | # | + | # |
- | # | + | # |
- | # Defaults to ../ | + | # Defaults to ../ |
# | # | ||
# Defaults to $GRAPHITE_ROOT/ | # Defaults to $GRAPHITE_ROOT/ | ||
- | # | + | # |
# Defaults to $GRAPHITE_ROOT/ | # Defaults to $GRAPHITE_ROOT/ | ||
# | # | ||
Zeile 1151: | Zeile 1144: | ||
PID_DIR | PID_DIR | ||
- | # Enable daily log rotation. If disabled, | + | # Enable daily log rotation. If disabled, |
- | # Django : 2015-03-20 | + | # the file if it's rotated out of place (e.g. by logrotate daemon) |
- | # default: ENABLE_LOGROTATION = False | + | # Django : 2015-11-20 |
+ | # default: ENABLE_LOGROTATION = False | ||
ENABLE_LOGROTATION = True | ENABLE_LOGROTATION = True | ||
Zeile 1179: | Zeile 1173: | ||
# stop/ | # stop/ | ||
# relatively low and carbon has cached a lot of updates; it enables the carbon | # relatively low and carbon has cached a lot of updates; it enables the carbon | ||
- | # daemon to shutdown more quickly. | + | # daemon to shutdown more quickly. |
# MAX_UPDATES_PER_SECOND_ON_SHUTDOWN = 1000 | # MAX_UPDATES_PER_SECOND_ON_SHUTDOWN = 1000 | ||
# Softly limits the number of whisper files that get created each minute. | # Softly limits the number of whisper files that get created each minute. | ||
- | # Setting this value low (like at 50) is a good way to ensure your graphite | + | # Setting this value low (e.g. 50) is a good way to ensure |
# system will not be adversely impacted when a bunch of new metrics are | # system will not be adversely impacted when a bunch of new metrics are | ||
- | # sent to it. The trade off is that it will take much longer for those metrics' | + | # sent to it. The trade off is that any metrics |
- | # database files to all get created | + | # value will be silently dropped, |
- | # Setting this value high (like " | + | # until such point as a subsequent metric is received and fits within |
- | # the files quickly but at the risk of slowing | + | # defined rate limit. |
+ | # cause carbon | ||
MAX_CREATES_PER_MINUTE = 50 | MAX_CREATES_PER_MINUTE = 50 | ||
+ | # Set the interface and port for the line (plain text) listener. | ||
+ | # interface to 0.0.0.0 listens on all interfaces. | ||
+ | # disable this listener if it is not required. | ||
LINE_RECEIVER_INTERFACE = 0.0.0.0 | LINE_RECEIVER_INTERFACE = 0.0.0.0 | ||
LINE_RECEIVER_PORT = 2003 | LINE_RECEIVER_PORT = 2003 | ||
+ | |||
+ | # Set the TCP backlog for the listen socket created by the line receiver. You | ||
+ | # shouldn' | ||
+ | # LINE_RECEIVER_BACKLOG = 1024 | ||
# Set this to True to enable the UDP listener. By default this is off | # Set this to True to enable the UDP listener. By default this is off | ||
Zeile 1201: | Zeile 1203: | ||
UDP_RECEIVER_PORT = 2003 | UDP_RECEIVER_PORT = 2003 | ||
+ | # Set the interface and port for the pickle listener. | ||
+ | # 0.0.0.0 listens on all interfaces. | ||
+ | # listener if it is not required. | ||
PICKLE_RECEIVER_INTERFACE = 0.0.0.0 | PICKLE_RECEIVER_INTERFACE = 0.0.0.0 | ||
PICKLE_RECEIVER_PORT = 2004 | PICKLE_RECEIVER_PORT = 2004 | ||
+ | |||
+ | # Set the TCP backlog for the listen socket created by the pickle receiver. You | ||
+ | # shouldn' | ||
+ | # PICKLE_RECEIVER_BACKLOG = 1024 | ||
# Set to false to disable logging of successful connections | # Set to false to disable logging of successful connections | ||
Zeile 1214: | Zeile 1223: | ||
CACHE_QUERY_INTERFACE = 0.0.0.0 | CACHE_QUERY_INTERFACE = 0.0.0.0 | ||
CACHE_QUERY_PORT = 7002 | CACHE_QUERY_PORT = 7002 | ||
+ | |||
+ | # Set the TCP backlog for the listen socket created by the cache query | ||
+ | # listener. You shouldn' | ||
+ | # CACHE_QUERY_BACKLOG = 1024 | ||
# Set this to False to drop datapoints received after the cache | # Set this to False to drop datapoints received after the cache | ||
Zeile 1365: | Zeile 1378: | ||
# datapoint to more than one machine. | # datapoint to more than one machine. | ||
REPLICATION_FACTOR = 1 | REPLICATION_FACTOR = 1 | ||
+ | |||
+ | # For REPLICATION_FACTOR >=2, set DIVERSE_REPLICAS to True to guarantee replicas | ||
+ | # across distributed hosts. With this setting disabled, it's possible that replicas | ||
+ | # may be sent to different caches on the same host. This has been the default | ||
+ | # behavior since introduction of ' | ||
+ | # Note that enabling this on an existing pre-0.9.14 cluster will require rebalancing | ||
+ | # your metrics across the cluster nodes using a tool like Carbonate. | ||
+ | # | ||
# This is a list of carbon daemons we will send any relayed or | # This is a list of carbon daemons we will send any relayed or | ||
Zeile 1388: | Zeile 1409: | ||
MAX_DATAPOINTS_PER_MESSAGE = 500 | MAX_DATAPOINTS_PER_MESSAGE = 500 | ||
MAX_QUEUE_SIZE = 10000 | MAX_QUEUE_SIZE = 10000 | ||
+ | |||
+ | # This is the percentage that the queue must be empty before it will accept | ||
+ | # more messages. | ||
+ | # to tune this to allow for incoming stats. | ||
+ | # flow of 100k stats/ | ||
+ | # to allow stats to start flowing when you've cleared the queue to 95% since | ||
+ | # you should have space to accommodate the next minute' | ||
+ | # even before the relay incrementally clears more of the queue | ||
+ | QUEUE_LOW_WATERMARK_PCT = 0.8 | ||
# Set this to False to drop datapoints when any send queue (sending datapoints | # Set this to False to drop datapoints when any send queue (sending datapoints | ||
# to a downstream carbon daemon) hits MAX_QUEUE_SIZE. If this is True (the | # to a downstream carbon daemon) hits MAX_QUEUE_SIZE. If this is True (the | ||
# default) then sockets over which metrics are received will temporarily stop accepting | # default) then sockets over which metrics are received will temporarily stop accepting | ||
- | # data until the send queues fall below 80% MAX_QUEUE_SIZE. | + | # data until the send queues fall below QUEUE_LOW_WATERMARK_PCT * MAX_QUEUE_SIZE. |
USE_FLOW_CONTROL = True | USE_FLOW_CONTROL = True | ||
Zeile 1419: | Zeile 1449: | ||
# If set true, metric received will be forwarded to DESTINATIONS in addition to | # If set true, metric received will be forwarded to DESTINATIONS in addition to | ||
# the output of the aggregation rules. If set false the carbon-aggregator will | # the output of the aggregation rules. If set false the carbon-aggregator will | ||
- | # only ever send the output of aggregation. | + | # only ever send the output of aggregation. |
- | FORWARD_ALL = True | + | FORWARD_ALL = False |
+ | |||
+ | # Filenames of the configuration files to use for this instance of aggregator. | ||
+ | # Filenames are relative to CONF_DIR. | ||
+ | # | ||
+ | # AGGREGATION_RULES = aggregation-rules.conf | ||
+ | # REWRITE_RULES = rewrite-rules.conf | ||
# This is a list of carbon daemons we will send any relayed or | # This is a list of carbon daemons we will send any relayed or | ||
Zeile 1428: | Zeile 1464: | ||
# | # | ||
# DESTINATIONS = 127.0.0.1: | # DESTINATIONS = 127.0.0.1: | ||
- | # | + | # |
# The format is comma-delimited IP: | # The format is comma-delimited IP: | ||
# optional and refers to the " | # optional and refers to the " | ||
Zeile 1479: | Zeile 1515: | ||
# seconds. Set CARBON_METRIC_INTERVAL to 0 to disable instrumentation | # seconds. Set CARBON_METRIC_INTERVAL to 0 to disable instrumentation | ||
# CARBON_METRIC_PREFIX = carbon | # CARBON_METRIC_PREFIX = carbon | ||
- | # CARBON_METRIC_INTERVAL = 60 | + | # CARBON_METRIC_INTERVAL = 60</ |
+ | |||
+ | === storage-schemas.conf === | ||
+ | Die Definition der Schematas der einzelnen // | ||
+ | |||
+ | Ein weiterer wichtiger Punkt, ist die Reihenfolge der **Sectionen** in der Konfigurationsdatei. Der erste Bereich der zur definierten **Section** passt, gilt. Wir müssen also dafür Sorge tragen, dass unser **icinga2_default** in der Konfigurationsdatei steht bevor der Default-Eintrag **default_1min_for_1day** kommt. Würde dies nicht passen, würden später auf Grund fehlender verdichteter Daten keine Graphen für die Langzeitstatistiken generiert werden können. Wir öffnen also die Datei // | ||
+ | # vim / | ||
+ | <file bash / | ||
+ | # and first match wins. This file is scanned for changes every 60 seconds. | ||
+ | # | ||
+ | # [name] | ||
+ | # pattern = regex | ||
+ | # retentions = timePerPoint: | ||
+ | |||
+ | # Carbon' | ||
+ | # CARBON_METRIC_PREFIX and CARBON_METRIC_INTERVAL settings | ||
+ | [carbon] | ||
+ | pattern = ^carbon\. | ||
+ | retentions = 60:90d | ||
+ | |||
+ | [icinga2_default] | ||
+ | # intervals like PNP4Nagios uses them per default | ||
+ | pattern = ^icinga2\. | ||
+ | retentions = 1m: | ||
+ | |||
+ | [default_1min_for_1day] | ||
+ | pattern = .* | ||
+ | retentions = 60s:1d | ||
</ | </ | ||
Zeile 2097: | Zeile 2160: | ||
* **[[http:// | * **[[http:// | ||
- | ~~DISCUSSION~~ | ||