Prometheus: различия между версиями
Перейти к навигации
Перейти к поиску
Sol (обсуждение | вклад) (Новая страница: «== Data Exporters == === Sphinx Exporter === [https://github.com/iamseth/sphinx_exporter GitHub] == External Data Storages == === InfluxDB === Категор…») |
Sol (обсуждение | вклад) |
||
(не показаны 3 промежуточные версии этого же участника) | |||
Строка 1: | Строка 1: | ||
== Data Exporters == | == Data Exporters == | ||
+ | === Node Exporter === | ||
+ | Собирает метрики системы (загрузку цп, состояние ОП, сети дисков) | ||
+ | |||
+ | По умолчанию слушает '''9100''' порт. | ||
+ | |||
+ | Метрики можно получить curlom | ||
+ | <syntaxhighlight lang="Bash"> | ||
+ | curl http://_target_ip_:9100/metrics | ||
+ | </syntaxhighlight> | ||
+ | ==== system user ==== | ||
+ | <syntaxhighlight lang="Bash"> | ||
+ | useradd -m -d /var/lib/monitoring -r -c "monitoring APPs" monitoring | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== systemd service ==== | ||
+ | <syntaxhighlight lang="Bash"> | ||
+ | vim /etc/systemd/system/node_exporter.service | ||
+ | [Unit] | ||
+ | Description=Node Exporter | ||
+ | Wants=network-online.target | ||
+ | After=network-online.target | ||
+ | |||
+ | [Service] | ||
+ | User=monitoring | ||
+ | Group=monitoring | ||
+ | Type=simple | ||
+ | ExecStartPre=/bin/bash -c 'mkdir -p /var/lib/monitoring/textfile' | ||
+ | ExecStart=/usr/local/bin/node_exporter \ | ||
+ | --collector.textfile.directory=/var/lib/monitoring/textfile \ | ||
+ | --collector.diskstats.ignored-devices="^(ram|loop|fd)\\d+$" | ||
+ | ExecStartPost=/bin/bash -c 'echo "node_nproc $(nproc).0" > /var/lib/monitoring/textfile/nproc.prom 2>/dev/null' | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== bin file ==== | ||
+ | <syntaxhighlight lang="Bash"> | ||
+ | wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz | ||
+ | </syntaxhighlight> | ||
+ | |||
=== Sphinx Exporter === | === Sphinx Exporter === | ||
[https://github.com/iamseth/sphinx_exporter GitHub] | [https://github.com/iamseth/sphinx_exporter GitHub] | ||
+ | |||
+ | === Percona MongoDB Exporter === | ||
+ | |||
+ | [https://github.com/percona/mongodb_exporter GitHub] | ||
+ | |||
+ | === MySQL Server Exporter === | ||
+ | |||
+ | [https://github.com/prometheus/mysqld_exporter GitHub] | ||
+ | |||
+ | === RabbitMQ Exporter === | ||
+ | |||
+ | [https://github.com/kbudde/rabbitmq_exporter GitHub] | ||
+ | |||
+ | === Memcached Exporter === | ||
+ | |||
+ | [https://github.com/prometheus/memcached_exporter GitHub] | ||
+ | |||
+ | === Mongodb Exporter === | ||
+ | |||
+ | [https://github.com/dcu/mongodb_exporter GitHub] | ||
== External Data Storages == | == External Data Storages == |
Текущая версия на 10:51, 21 февраля 2020
Data Exporters
Node Exporter
Собирает метрики системы (загрузку цп, состояние ОП, сети дисков)
По умолчанию слушает 9100 порт.
Метрики можно получить curlom
curl http://_target_ip_:9100/metrics
system user
useradd -m -d /var/lib/monitoring -r -c "monitoring APPs" monitoring
systemd service
vim /etc/systemd/system/node_exporter.service
[Unit]
Description=Node Exporter
Wants=network-online.target
After=network-online.target
[Service]
User=monitoring
Group=monitoring
Type=simple
ExecStartPre=/bin/bash -c 'mkdir -p /var/lib/monitoring/textfile'
ExecStart=/usr/local/bin/node_exporter \
--collector.textfile.directory=/var/lib/monitoring/textfile \
--collector.diskstats.ignored-devices="^(ram|loop|fd)\\d+$"
ExecStartPost=/bin/bash -c 'echo "node_nproc $(nproc).0" > /var/lib/monitoring/textfile/nproc.prom 2>/dev/null'
[Install]
WantedBy=multi-user.target
bin file
wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz