This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
сервис_prometheus [2026/10/06 12:17] val [Отправка метрик из приложения] |
сервис_prometheus [2026/10/13 20:03] (current) val [Настройка маршрутизации уведомлений] |
||
|---|---|---|---|
| Line 78: | Line 78: | ||
| email_configs: | email_configs: | ||
| - to: 'student@corpX.un' | - to: 'student@corpX.un' | ||
| - | send_resolved: true | ||
| - | # - name: 'script-receiver' | + | #- name: 'script-receiver' |
| - | # webhook_configs: | + | # webhook_configs: |
| - | # - url: 'http://localhost:9000/hooks/my-alert-script' | + | # - url: 'http://localhost:9000/hooks/my-alert-script' |
| + | # send_resolved: false | ||
| </code><code> | </code><code> | ||
| # amtool check-config /etc/prometheus/alertmanager.yml | # amtool check-config /etc/prometheus/alertmanager.yml | ||
| Line 88: | Line 88: | ||
| # service prometheus-alertmanager restart | # service prometheus-alertmanager restart | ||
| </code> | </code> | ||
| + | ==== Подключение к alertmanager ==== | ||
| + | * http://server.corpX.un:9093/ | ||
| ==== Тестирование alertmanager ==== | ==== Тестирование alertmanager ==== | ||
| <code> | <code> | ||
| Line 96: | Line 97: | ||
| "alertname": "TestAlert", | "alertname": "TestAlert", | ||
| "severity": "critical", | "severity": "critical", | ||
| + | "job": "roundcube_monitor", | ||
| "instance": "test-host" | "instance": "test-host" | ||
| }, | }, | ||
| Line 152: | Line 154: | ||
| # severity: "critical" | # severity: "critical" | ||
| # annotations: | # annotations: | ||
| - | # summary: "Endpoint {{ $labels.instance }} down" | + | # summary: "Сервис Roundcube не доступен" |
| - | # dashboard_url: "http://server.corpX.un:3000/.../refresh=auto" | + | # dashboard_url: "http://server.corpX.un:3000/n/nnnnnnnn/mail-app" |
| </code> | </code> | ||
| Line 172: | Line 174: | ||
| # - "second_rules.yml" | # - "second_rules.yml" | ||
| # - "node_exporter_rules.yml" | # - "node_exporter_rules.yml" | ||
| + | # - "*rules.yml" | ||
| ... | ... | ||
| </code> | </code> | ||
| Line 236: | Line 238: | ||
| static_configs: | static_configs: | ||
| - targets: ['localhost:9100'] | - targets: ['localhost:9100'] | ||
| + | </code> | ||
| + | |||
| + | === collector.systemd === | ||
| + | <code> | ||
| + | # cat /etc/default/prometheus-node-exporter | ||
| + | </code><code> | ||
| + | ... | ||
| + | ARGS="--collector.systemd" | ||
| </code> | </code> | ||
| Line 245: | Line 255: | ||
| 8*rate(node_network_receive_bytes_total{device="eth0",instance="localhost:9100",job="node"}[1m]) | 8*rate(node_network_receive_bytes_total{device="eth0",instance="localhost:9100",job="node"}[1m]) | ||
| + | |||
| + | node_systemd_unit_state | ||
| + | |||
| + | node_systemd_unit_state{instance="localhost:9100",job="node",name="dovecot.service",state="active"} | ||
| </code> | </code> | ||
| Line 538: | Line 552: | ||
| * Web интерфейс к почте [[Web интерфейс к почте#Roundcube]] | * Web интерфейс к почте [[Web интерфейс к почте#Roundcube]] | ||
| * [[Средства программирования shell#Тестирование Web приложения на shell]] | * [[Средства программирования shell#Тестирование Web приложения на shell]] | ||
| - | * [[Технология cgroup]] | ||
| <code> | <code> | ||