mirror of
https://github.com/ilyamak04/DevOps.git
synced 2025-04-04 23:24:51 +02:00
start to study monitoring
This commit is contained in:
parent
44b3d79c50
commit
5574466145
@ -91,7 +91,7 @@ APT работает поверх более низкоуровневого ин
|
||||
- `-xvf` - извлечь архив
|
||||
- `-z` - использовать сжатие `gzip`
|
||||
```bash
|
||||
tar -cvfz backup.tar.gz /var/www
|
||||
tar -xvfz backup.tar.gz /var/www
|
||||
```
|
||||
### Разное
|
||||
|
||||
|
@ -81,4 +81,5 @@ Swap-файл (или swap-раздел) — это специальная об
|
||||
|
||||
---
|
||||
|
||||
`tar xvfz *tar.gz` - распаковать архив .tar.gz
|
||||
|
||||
|
1
monitoring/GRAFANA.MD
Normal file
1
monitoring/GRAFANA.MD
Normal file
@ -0,0 +1 @@
|
||||
[**Установка**](https://grafana.com/docs/grafana/latest/setup-grafana/installation/debian/)
|
36
monitoring/PROMETHEUS.MD
Normal file
36
monitoring/PROMETHEUS.MD
Normal file
@ -0,0 +1,36 @@
|
||||
### Install and Configure
|
||||
- `wget https://github.com/prometheus/prometheus/releases/download/v2.55.0-rc.0/prometheus-2.55.0-rc.0.linux-amd64.tar.gz` - скачиваем прометеус сервер
|
||||
|
||||
- `tar xvfz *.tar.gz`
|
||||
- `sudo mv prometheus /usr/bin/`
|
||||
- `sudo mkdir /etc/prometheus/`
|
||||
- `sudo mkdir /etc/prometheus/data`
|
||||
- `useradd -rs /bin/false prometheus` - создаём системного пользователя для работы с prometheus
|
||||
- `chown prometheus:prometheus /usr/bin/prometheus`
|
||||
- `chown -R prometheus:prometheus /etc/prometheus`
|
||||
- `vi /etc/systemd/system/prometheus.service` - создаём systemd юнит
|
||||
```bash
|
||||
[Unit]
|
||||
Description=Prometheus Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=prometheus
|
||||
Group=prometheus
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
ExecStart=/usr/bin/prometheus \
|
||||
--config.file /etc/prometheus/prometheus.yml \
|
||||
--storage.tsdb.path /etc/prometheus/data
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
- `sudo systemctl daemon-reload` - обновить systemd
|
||||
|
||||
- `sudo systemctl start prometheus`
|
||||
- `sudo systemctl enable prometheus`
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user