Menu

Post image 1
Post image 2
1 / 2
0

Monitoring and Alerting for Video Platform Infrastructure with Go

DEV Community·ahmet gedik·24 days ago
#YzFU7Cyr
Reading 0:00
15s threshold

Monitoring a Multi-Region Video Vault ViralVidVault serves viral video content from 7 European regions. When the Polish trending page goes down or the Swedish cron job fails, we need to know immediately -- not when a user complains. A custom Go monitor gives us exactly the health visibility we need. Configuration package monitor import "time" type Target struct { Name string `json:"name"` URL string `json:"url"` Interval time . Duration `json:"interval"` Timeout time . Duration `json:"timeout"` ExpectCode int `json:"expect_code"` ExpectBody string `json:"expect_body"` Region string `json:"region"` } type Result struct { Name string `json:"name"` Region string `json:"region"` Status string `json:"status"` StatusCode int `json:"status_code"` Latency time . Duration `json:"latency"` Error string `json:"error,omitempty"` Timestamp time . Time `json:"timestamp"` } var Targets = [] Target { { Name : "homepage" , URL : "https://viralvidvault.com" , Interval : 5 * time . Minute , Timeout : 10 * time .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More