Skip to content

fpiwowarczyk/watchdogGO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

watchdogGO

Watchdog for linux services written in golang. Using AWS DynamoDB to get settings and SNS to send alerts

Setup

Enviromental variables for aws

export AWS_ACCESS_KEY_ID=<YOUR_AWS_ACCESS_KEY>
export AWS_SECRET_ACCESS_KEY=<YOUR_AWS_SECRET>
export AWS_REGION=<YOUR_AWS_REGION>

or put these above in .aws folder into config/credentials file

Enviromental variables for script

export SNSWATCHDOG=arn:aws:sns:region-2:444455556666:MyTopic
export TABLEWATCHDOG=dynamoDB table name 

Run

go run . -id <num of settings id from dynamodb>

OR

go run main.go -id <num of settings id from dynamodb>

OR 

go build && ./watchdogGO

log files will be putted into file watchdog.log and if you subscribe for sns topic you can get notifications as well.

Stop

To stop proces you need to send SIGTERM to process.

About

Just a watchdog

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages