Sign inSign up

wowgroup/go-sla

By wowgroup

•Updated almost 8 years ago

Docker build of go-sla tool

Image
0

185

wowgroup/go-sla repository overview

⁠SLA

Tool for fetching information from pingdom and calculate uptimes based on SLA rules.

Which services that check stats can be collected for is determined by pulling down configured information from pingdom.

copy and rename the example.sla.json to just sla.json and populate it's list of rules according to the format below.

{
    "day": "",
    "from": "",
    "to": ""
},

day is lowercase weekday (e.g monday, saturday etc) or * for applying to all days in a week. Both from and to should be specified by hh:mm format

Env variables assumed to be populated:

PINGDOM_USR
PINGDOM_PWD
PINGDOM_APP_TOKEN

Without any arguments except service name a date range of today and thirty days backwards will be used.

$ ./sla stats {service_name}

--from and --to flags can be specified like this YYYY-MM-DDTHH:MM:SS, currently both or none of the have to be supplied.

With -s flag enabled it will launch a http server on port 8338 and navigating to the same path as the command will display the results of it.

No caching enabled currently which makes stats take a long time to finish.

$ docker run -it --rm -e PINGDOM_USR={pingdom email} -e PINGDOM_APP_TOKEN={pingdom app token} -e PINGDOM_PWD={pingdom password} wow-group/go-sla:latest stats {service names} --from {datetime from} --to {datetime to}

If you want to serve the http endpoint through docker, just add the -s flag and make sure to map port 8338.

For both modes, add -d flag for debugging purposes.

If you need to find out which services there are just run and use the normalized name for calling the stats command on it.

$ ./sla check

Tag summary

Content type

Image

Digest

Size

3.4 MB

Last updated

almost 8 years ago

docker pull wowgroup/go-sla:0.9.1