zatsu_monitor is simple url monitoring tool
Notify message to chatroom only if http status is changed from just before (e.g. 500 -> 200)
Download latest binary from here
https://github.com/sue445/zatsu_monitor/releases
/path/to/zatsu_monitor -config /path/to/config.yml -data /path/to/data_dir
-config
: Path to config yaml file (see after)-data
: Cache dir. latest http status is stored to here
$ ./zatsu_monitor --help
Usage of ./zatsu_monitor:
-config string
Path to config file
-data string
Path to data dir for cache
-version
Whether showing version
# zatsu_monitor.yml
google:
type: slack
check_url: "https://www.google.com/"
api_token: "AAAAAAAA"
# or
# webhook_url: "https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXXX"
channel: "#general"
user_name: "zatsu_monitor"
# check_only_top_of_status_code: true
github:
type: chatwork
check_url: "https://github.com/"
api_token: "AAAAAAAA"
room_id: "111111"
# check_only_top_of_status_code: true
zatsu_monitor supports some notifier
type
: slack (fixed value)check_url
: URL for checking (required)api_token
: Slack API Token (eitherapi_token
orwebhook_url
is required)webhook_url
: Slack Incoming Webhook URL (eitherapi_token
orwebhook_url
is required)channel
: Channel for post (required)user_name
: Name for post (optional. default is zatsu_monitor)
type
: chatwork (fixed value)check_url
: URL for checking (required)api_token
: ChatWork API Token (required)room_id
: RoomID for post (required)
check_only_top_of_status_code
: Whether check only top of the status code (optional. default isfalse
)- e.g) When
check_only_top_of_status_code
istrue
, before status code is 501 and current status code is 502, don't notify
- e.g) When
slack: &common
type: slack
channel: "#general"
api_token: "xoxp-0000000000-0000000000-0000000000-000000"
# or
# webhook_url: "https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXXX"
github:
# inherit common values
<<: *common
# override common values
check_url: "https://github.com/"
channel: "#github"
google:
<<: *common
check_url: "https://www.google.com/"
channel: "#google"
cp .env.example .env
vi .env