반응형
우분투 24.04 서버에서 updo를 설치하는 방법
Updo는 여러 서버와 웹 서비스를 자동으로 점검하여 장애 여부를 빠르게 알려주는 초간단 모니터링 도구입니다.
소스에서 직접 빌드하는 방법
sudo apt update
sudo apt install -y golang
Updo 다운로드
git clone https://github.com/Owloops/updo.git
cd updo
빌드
go mod download
go build
전역 명령 등록
sudo mv updo /usr/local/bin/
실행 예제
단일 사이트 모니터링
updo monitor https://www.scbyun.com
더보기
---
로그 유지
터미널 출력 로그
updo monitor --config /config/config.toml >> /var/log/updo.log 2>&1
JSON 출력 로그
updo monitor --config /config/config.toml --output json >> /var/log/updo.json
---

설정 파일 이용
mkdir -p /etc/updo
config.toml 편집
vim /etc/updo/config.toml
더보기
---
cat example-config.toml
[global]
refresh_interval = 5
timeout = 10
follow_redirects = true
accept_redirects = false
receive_alert = false
count = 0
skip = ["GitHub-API"]
# regions = ["us-east-1", "eu-central-1", "ap-southeast-1"]
[[targets]]
url = "https://www.github.com"
name = "GitHub"
refresh_interval = 5
assert_text = "GitHub"
[[targets]]
url = "https://stackoverflow.com"
name = "StackOverflow"
refresh_interval = 2
assert_text = "Stack Overflow"
[[targets]]
url = "https://api.github.com/repos/octocat/Hello-World"
name = "GitHub-API"
timeout = 15
method = "GET"
headers = ["User-Agent: updo-monitor/1.0", "Accept: application/vnd.github.v3+json"]
[[targets]]
url = "https://httpbin.org/status/200"
name = "HTTPBin-OK"
refresh_interval = 30
[[targets]]
url = "https://httpbin.org/delay/2"
name = "HTTPBin-Slow"
refresh_interval = 5
timeout = 15
[[targets]]
url = "https://jsonplaceholder.typicode.com/posts/1"
name = "JSONPlaceholder"
refresh_interval = 20
headers = ["Accept: application/json"]
assert_text = "userId"
[[targets]]
url = "https://www.cloudflare.com"
name = "Cloudflare"
refresh_interval = 5
follow_redirects = false
receive_alert = false
[[targets]]
url = "https://httpbin.org/post"
name = "POST-Test"
refresh_interval = 90
method = "POST"
headers = ["Content-Type: application/json"]
body = '{"test": "data", "timestamp": "2024-01-01"}'
[[targets]]
url = "https://httpbin.org/redirect/1"
name = "No-Redirects"
refresh_interval = 45
follow_redirects = false
[[targets]]
url = "https://news.ycombinator.com"
name = "Hacker News"
refresh_interval = 15
assert_text = "Hacker News"
[[targets]]
url = "http://192.168.1.1"
name = "Router-Redirect-Check"
refresh_interval = 30
follow_redirects = false
accept_redirects = true
---
[global]
refresh_interval = 10
timeout = 5
[[targets]]
url = "https://www.scbyun.com"
name = "SCBYUN"
실행
updo monitor --config /etc/updo/config.toml
Systemd 서비스 등록
sudo vim /etc/systemd/system/updo.service
[Unit]
Description=Updo Monitoring Service
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/updo monitor --config /etc/updo/config.toml
Restart=always
[Install]
WantedBy=multi-user.target
적용
sudo systemctl daemon-reload
sudo systemctl enable --now updo
상태 확인
systemctl status updo
참고URL
- GitHub : Owloops/updo
728x90
반응형
'리눅스' 카테고리의 다른 글
| 우분투 24.04 서버에서 Uptime Kuma를 설치하는 방법 (0) | 2025.11.26 |
|---|---|
| stdbuf 명령어 (0) | 2025.11.25 |
| 우분투에서 NFS Server를 설치하고 NFS 볼륨을 마운트하는 방법 (1) | 2025.11.24 |
| 라라벨에서 현재 사용 중인 Redis 모듈이 PhpRedis인지 Predis인지 확인하는 방법 (1) | 2025.11.24 |
| 라라벨 개발 환경을 도커 컨테이너로 구성하는 방법 (0) | 2025.11.20 |