TGStat
TGStat
Type to search
Advanced channel search
  • flag English
    Site language
    flag Russian flag English flag Uzbek
  • Sign In
  • Catalog
    Channels and groups catalog Regional compilations Thematic compilations Платные каналы Search for channels
    Add a channel/group
  • Ratings
    Rating of channels Rating of groups Posts rating
    Ratings of brands and people
  • Analytics
  • Search by posts
  • Telegram monitoring
  • Promotion
    Advertising through Yandex Business Advertising in channels through TGStat Agency Advertising on TGStat.ru website
DevOps | Вопросы собесов

16 Aug, 12:05

Open in Telegram Share Report

🤔 Как бы вы настроили уведомления для сервисов которые находятся без интернета полностью локализованы закрыты от всего извне?

Для настройки уведомлений в изолированной сети без доступа к интернету используйте локальные инструменты и системы. Основные методы включают локальные почтовые серверы, мессенджеры и системы управления инцидентами.

🚩Локальный почтовый сервер (SMTP)

1⃣Установка
sudo apt update
sudo apt install postfix

2⃣Настройка
Отредактируйте /etc/postfix/main.cf
myhostname = local.example.com
mydomain = example.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
relay_domains = $mydestination

3⃣Перезапуск Postfix
sudo systemctl restart postfix

4⃣Проверка
echo "Test email" | mail -s "Test Subject" user@example.com

🚩Локальный мессенджер (Mattermost)

1⃣Установка Mattermost
Следуйте [документации](https://docs.mattermost.com/install/self-managed-install.html).

2⃣Настройка
Создайте каналы и пользователей.

3⃣Интеграция с мониторингом
Используйте веб-хуки Mattermost для уведомлений.

🚩Системы управления инцидентами (Zabbix)

1⃣Установка Zabbix
Следуйте [документации](https://www.zabbix.com/download).

2⃣Настройка
Настройте хосты, триггеры и действия.

3⃣Настройка уведомлений
Медиатипы: Настройте Email и SMS. Пользователи: Создайте пользователей и уведомления.

🚩Локальный стек мониторинга (Prometheus, Alertmanager)

1⃣Установка Prometheus
wget https://github.com/prometheus/prometheus/releases/download/v2.26.0/prometheus-2.26.0.linux-amd64.tar.gz
tar xvf prometheus-2.26.0.linux-amd64.tar.gz
cd prometheus-2.26.0.linux-amd64
./prometheus --config.file=prometheus.yml

2⃣Установка Alertmanager
wget https://github.com/prometheus/alertmanager/releases/download/v0.21.0/alertmanager-0.21.0.linux-amd64.tar.gz
tar xvf alertmanager-0.21.0.linux-amd64.tar.gz
cd alertmanager-0.21.0.linux-amd64
./alertmanager --config.file=alertmanager.yml

3⃣Настройка алертинга в Prometheus
groups:
- name: example-alerts
rules:
- alert: HighCPUUsage
expr: avg_over_time(node_cpu_seconds_total{mode="idle"}[5m]) < 20
for: 2m
labels:
severity: critical
annotations:
summary: "High CPU usage detected"
description: "CPU usage is above 80% for more than 2 minutes"

4⃣Настройка Alertmanager
global:
smtp_smarthost: 'localhost:25'
smtp_from: 'alertmanager@local.example.com'
route:
receiver: 'email-notifications'
receivers:
- name: 'email-notifications'
email_configs:
- to: 'admin@local.example.com'
send_resolved: true

Ставь 👍 и забирай 📚 Базу знаний

623 0 6 1
Catalog
Channels and groups catalog Channels compilations Search for channels Add a channel/group
Ratings
Rating of Telegram channels Rating of Telegram groups Posts rating Ratings of brands and people
API
API statistics Search API of posts API Callback
Our channels
@TGStat @TGStat_Chat @telepulse @TGStatAPI
Read
Академия TGStat Telegram Research 2019 Telegram Research 2021 Telegram Research 2023
Contacts
Справочный центр Support Email Jobs
Miscellaneous
Terms and conditions Privacy policy Public offer
Our bots
@TGStat_Bot @SearcheeBot @TGAlertsBot @tg_analytics_bot @TGStatChatBot