diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index f7b94fb0..4a6aae37 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -20,4 +20,4 @@ A clear and concise description of what you expected to happen. ### Screenshots If applicable, add screenshots to help explain your problem. -[![Slack](https://slack.statping.com/badge.svg)](https://slack.statping.com/) [![GitHub release](https://img.shields.io/github/release/hunterlong/statping.svg)](https://github.com/hunterlong/statping/releases/latest) [![Build Status](https://travis-ci.com/hunterlong/statping.svg?branch=master)](https://travis-ci.com/hunterlong/statping) +[![Slack](https://slack.statping.com/badge.svg)](https://slack.statping.com/) [![GitHub release](https://img.shields.io/github/release/hunterlong/statping.svg)](https://github.com/statping/statping/releases/latest) [![Build Status](https://travis-ci.com/hunterlong/statping.svg?branch=master)](https://travis-ci.com/hunterlong/statping) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index ca16f8d8..7125ba26 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -19,4 +19,4 @@ I'm always frustrated when [...] ### Additional context Add any other context or screenshots about the feature request here. -[![Slack](https://slack.statping.com/badge.svg)](https://slack.statping.com/) [![GitHub release](https://img.shields.io/github/release/hunterlong/statping.svg)](https://github.com/hunterlong/statping/releases/latest) [![Build Status](https://travis-ci.com/hunterlong/statping.svg?branch=master)](https://travis-ci.com/hunterlong/statping) +[![Slack](https://slack.statping.com/badge.svg)](https://slack.statping.com/) [![GitHub release](https://img.shields.io/github/release/hunterlong/statping.svg)](https://github.com/statping/statping/releases/latest) [![Build Status](https://travis-ci.com/hunterlong/statping.svg?branch=master)](https://travis-ci.com/hunterlong/statping) diff --git a/.github/ISSUE_TEMPLATE/issue-report.md b/.github/ISSUE_TEMPLATE/issue-report.md index 647a20ee..5c73a772 100644 --- a/.github/ISSUE_TEMPLATE/issue-report.md +++ b/.github/ISSUE_TEMPLATE/issue-report.md @@ -20,4 +20,4 @@ A clear and concise description of what you expected to happen. ### Screenshots If applicable, add screenshots to help explain your problem. -[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/statup-app/general) [![GitHub release](https://img.shields.io/github/release/hunterlong/statup.svg)](https://github.com/hunterlong/statping/releases/latest) [![Build Status](https://travis-ci.com/hunterlong/statup.svg?branch=master)](https://travis-ci.com/hunterlong/statup) +[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/statup-app/general) [![GitHub release](https://img.shields.io/github/release/hunterlong/statup.svg)](https://github.com/statping/statping/releases/latest) [![Build Status](https://travis-ci.com/hunterlong/statup.svg?branch=master)](https://travis-ci.com/hunterlong/statup) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml new file mode 100644 index 00000000..b1e4f636 --- /dev/null +++ b/.github/workflows/go-test.yml @@ -0,0 +1,21 @@ +on: [push, pull_request] +name: Golang Test +jobs: + test: + env: + GOPATH: ${{ github.workspace }} + GO111MODULE: on + runs-on: ubuntu-latest + steps: + - name: Install Go + uses: actions/setup-go@v1 + with: + go-version: 1.14.x + - name: Checkout code + uses: actions/checkout@v2 + with: + path: ./src/github.com/${{ github.repository }} + - name: Go Mod + run: go mod download + - name: Test + run: go test -p=1 ./... diff --git a/.github/workflows/sentry.yml b/.github/workflows/sentry.yml new file mode 100644 index 00000000..0220aa99 --- /dev/null +++ b/.github/workflows/sentry.yml @@ -0,0 +1,22 @@ +name: ReleaseWorkflow + +on: + release: + types: [published, prereleased] + +jobs: + createSentryRelease: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@master + - name: Create a Sentry.io release + uses: tclindner/sentry-releases-action@v1.0.0 + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_URL: ${{ secrets.SENTRY_URL }} + SENTRY_ORG: Statping + SENTRY_PROJECT: golang + with: + tagName: ${{ github.ref }} + environment: qa diff --git a/.github/workflows/slack-notify.yml b/.github/workflows/slack-notify.yml new file mode 100644 index 00000000..5215051a --- /dev/null +++ b/.github/workflows/slack-notify.yml @@ -0,0 +1,14 @@ +on: push +name: Slack Notification +jobs: + slackNotification: + name: Slack Notification + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Slack Notification + uses: rtCamp/action-slack-notify@v2.0.0 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_URL }} + SLACK_CHANNEL: dev + SLACK_USERNAME: Github diff --git a/.travis.yml b/.travis.yml index c83094b8..400b1a34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,13 +2,13 @@ os: - linux language: go go: 1.13.5 -go_import_path: github.com/hunterlong/statping +go_import_path: github.com/statping/statping cache: directories: - "~/.npm" - "~/.cache" - - "$GOPATH/src/github.com/hunterlong/statping/tmp" - - "$GOPATH/src/github.com/hunterlong/statping/vendor" + - "$GOPATH/src/github.com/statping/statping/tmp" + - "$GOPATH/src/github.com/statping/statping/vendor" sudo: required services: - docker @@ -23,7 +23,7 @@ env: - DB_PASS= - DB_DATABASE=test - GO_ENV=test - - STATPING_DIR=$GOPATH/src/github.com/hunterlong/statping + - STATPING_DIR=$GOPATH/src/github.com/statping/statping matrix: allow_failures: - go: master diff --git a/Dockerfile b/Dockerfile index e3d9b72a..91fc2b73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ ARG VERSION RUN apk add --update --no-cache libstdc++ gcc g++ make git ca-certificates linux-headers wget curl jq RUN curl -L -s https://assets.statping.com/sass -o /usr/local/bin/sass && \ chmod +x /usr/local/bin/sass -WORKDIR /go/src/github.com/hunterlong/statping +WORKDIR /go/src/github.com/statping/statping ADD go.mod go.sum ./ RUN go mod download ENV GO111MODULE on diff --git a/Dockerfile.base b/Dockerfile.base index 9ef68c30..48c96cfc 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -7,7 +7,7 @@ RUN npm install -g yarn RUN curl -L -s https://assets.statping.com/sass -o /usr/local/bin/sass && \ chmod +x /usr/local/bin/sass -WORKDIR /go/src/github.com/hunterlong/statping +WORKDIR /go/src/github.com/statping/statping ADD go.mod go.sum ./ diff --git a/Makefile b/Makefile index 2f7c7024..f363ad17 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,8 @@ XGO=xgo -go $(GOVERSION) --dest=build BUILDVERSION=-ldflags "-X main.VERSION=${VERSION} -X main.COMMIT=$(TRAVIS_COMMIT)" TRVIS_SECRET=lRqWSt5BoekFK6+padJF+b77YkGdispPXEUKNuD7/Hxb7yJMoI8T/n8xZrTHtCZPdjtpy7wIlJCezNoYEZB3l2GnD6Y1QEZEXF7MIxP7hwsB/uSc5/lgdGW0ZLvTBfv6lwI/GjQIklPBW/4xcKJtj4s1YBP7xvqyIb/lDN7TiOqAKF4gqRVVfsxvlkm7j4TiPCXtz17hYQfU8kKBbd+vd3PuZgdWqs//5RwKk3Ld8QR8zoo9xXQVC5NthiyVbHznzczBsHy2cRZZoWxyi7eJM1HrDw8Jn/ivJONIHNv3RgFVn2rAoKu1X8F6FyuvPO0D2hWC62mdO/e0kt4X0mn9/6xlLSKwrHir67UgNVQe3tvlH0xNKh+yNZqR5x9t0V54vNks6Pgbhas5EfLHoWn5cF4kbJzqkXeHjt1msrsqpA3HKbmtwwjJr4Slotfiu22mAhqLSOV+xWV+IxrcNnrEq/Pa+JAzU12Uyxs8swaLJGPRAlWnJwzL9HK5aOpN0sGTuSEsTwj0WxeMMRx25YEq3+LZOgwOy3fvezmeDnKuBZa6MVCoMMpx1CRxMqAOlTGZXHjj+ZPmqDUUBpzAsFSzIdVRgcnDlLy7YRiz3tVWa1G5S07l/VcBN7ZgvCwOWZ0QgOH0MxkoDfhrfoMhNO6MBFDTRKCEl4TroPEhcInmXU8= PUBLISH_BODY='{ "request": { "branch": "master", "message": "Homebrew update version v${VERSION}", "config": { "env": { "VERSION": "${VERSION}", "COMMIT": "$(TRAVIS_COMMIT)" } } } }' -TRAVIS_BUILD_CMD='{ "request": { "branch": "master", "message": "Compile master for Statping v${VERSION}", "config": { "os": [ "linux" ], "language": "go", "go": [ "${GOVERSION}" ], "go_import_path": "github.com/hunterlong/statping", "install": true, "sudo": "required", "services": [ "docker" ], "env": { "VERSION": "${VERSION}", "secure": "${TRVIS_SECRET}" }, "matrix": { "allow_failures": [ { "go": "master" } ], "fast_finish": true }, "before_deploy": [ "git config --local user.name \"hunterlong\"", "git config --local user.email \"info@socialeck.com\"", "git tag v$(VERSION) --force"], "deploy": [ { "provider": "releases", "api_key": "$$TAG_TOKEN", "file_glob": true, "file": "build/*", "skip_cleanup": true, "on": {"branch": "master"} } ], "notifications": { "email": false }, "before_script": ["gem install sass"], "script": [ "travis_wait 30 docker pull crazymax/xgo:$(GOVERSION)", "make release" ], "after_success": [], "after_deploy": [ "make publish-homebrew" ] } } }' -TEST_DIR=$(GOPATH)/src/github.com/hunterlong/statping +TRAVIS_BUILD_CMD='{ "request": { "branch": "master", "message": "Compile master for Statping v${VERSION}", "config": { "os": [ "linux" ], "language": "go", "go": [ "${GOVERSION}" ], "go_import_path": "github.com/statping/statping", "install": true, "sudo": "required", "services": [ "docker" ], "env": { "VERSION": "${VERSION}", "secure": "${TRVIS_SECRET}" }, "matrix": { "allow_failures": [ { "go": "master" } ], "fast_finish": true }, "before_deploy": [ "git config --local user.name \"hunterlong\"", "git config --local user.email \"info@socialeck.com\"", "git tag v$(VERSION) --force"], "deploy": [ { "provider": "releases", "api_key": "$$TAG_TOKEN", "file_glob": true, "file": "build/*", "skip_cleanup": true, "on": {"branch": "master"} } ], "notifications": { "email": false }, "before_script": ["gem install sass"], "script": [ "travis_wait 30 docker pull crazymax/xgo:$(GOVERSION)", "make release" ], "after_success": [], "after_deploy": [ "make publish-homebrew" ] } } }' +TEST_DIR=$(GOPATH)/src/github.com/statping/statping PATH:=/usr/local/bin:$(GOPATH)/bin:$(PATH) all: clean yarn-install compile docker-base docker-vue build-all compress diff --git a/README.md b/README.md index 61b8c6fd..4640bec6 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,13 @@
Statping - Web and App Status Monitoring for Any Type of Project
-View Wiki | Demo | iPhone | Android
API | Docker | EC2 | Mac | Linux | Windows | Plugins
+View Wiki | Demo | iPhone | Android
API | Docker | EC2 | Mac | Linux | Windows | Plugins
- - - + + + @@ -48,7 +48,7 @@ The Statping app is available on the App Store and Google Play for free. The app
## Run on Any Server -Whether you're a Docker fan-boy or a [AWS EC2](https://github.com/hunterlong/statping/wiki/AWS-EC2) master, Statping gives you multiple options to simply get running. Our Amazon AMI image is only 8Gb and will automatically update to the most stable version of Statping. +Whether you're a Docker fan-boy or a [AWS EC2](https://github.com/statping/statping/wiki/AWS-EC2) master, Statping gives you multiple options to simply get running. Our Amazon AMI image is only 8Gb and will automatically update to the most stable version of Statping. Running on an EC2 server might be the most cost effective way to host your own Statping Status Page. The server runs on the smallest EC2 instance (t2.nano) AWS has to offer, which only costs around $4.60 USD a month for your dedicated Status Page. Want to run it on your own Docker server? Awesome! Statping has multiple docker-compose.yml files to work with. Statping can automatically create a SSL Certification for your status page. @@ -63,8 +63,8 @@ Statping will allow you to completely customize your Status Page using SASS styl Statping includes email notification via SMTP and Slack integration using [Incoming Webhook](https://api.slack.com/incoming-webhooks). Insert the webhook URL into the Settings page in Statping and enable the Slack integration. Anytime a service fails, you're channel that you specified on Slack will receive a message. ## User Created Plugins and Notifiers -View the [Plugin Wiki](https://github.com/hunterlong/statping/wiki/Statping-Plugins) to see detailed information about Golang Plugins. Statping isn't just another Status Page for your applications, it's a framework that allows you to create your own plugins to interact with every element of your status page. [Notifier's](https://github.com/hunterlong/statping/wiki/Notifiers) can also be create with only 1 golang file. -Plugin are created in Golang using the [statping/plugin](https://github.com/hunterlong/statping/tree/master/plugin) golang package. The plugin package has a list of interfaces/events to accept into your own plugin application. +View the [Plugin Wiki](https://github.com/statping/statping/wiki/Statping-Plugins) to see detailed information about Golang Plugins. Statping isn't just another Status Page for your applications, it's a framework that allows you to create your own plugins to interact with every element of your status page. [Notifier's](https://github.com/statping/statping/wiki/Notifiers) can also be create with only 1 golang file. +Plugin are created in Golang using the [statping/plugin](https://github.com/statping/statping/tree/master/plugin) golang package. The plugin package has a list of interfaces/events to accept into your own plugin application.@@ -85,7 +85,7 @@ statping export ###### `index.html` will be created in the current directory with CDN URL's for assets. ## Run on Docker -Use the [Statping Docker Image](https://hub.docker.com/r/hunterlong/statping) to create a status page in seconds. Checkout the [Docker Wiki](https://github.com/hunterlong/statping/wiki/Docker) to view more details on how to get started using Docker. +Use the [Statping Docker Image](https://hub.docker.com/r/hunterlong/statping) to create a status page in seconds. Checkout the [Docker Wiki](https://github.com/statping/statping/wiki/Docker) to view more details on how to get started using Docker. ```bash docker run -it -p 8080:8080 hunterlong/statping ``` @@ -107,7 +107,7 @@ LETSENCRYPT_HOST=mydomain.com \ Once your instance has started, it will take a moment to get your SSL certificate. Make sure you have a A or CNAME record on your domain that points to the IP/DNS of your server running Statping. ## Prometheus Exporter -Statping includes a [Prometheus Exporter](https://github.com/hunterlong/statping/wiki/Prometheus-Exporter) so you can have even more monitoring power with your services. The Prometheus exporter can be seen on `/metrics`, simply create another exporter in your prometheus config. Use your Statping API Secret for the Authorization Bearer header, the `/metrics` URL is dedicated for Prometheus and requires the correct API Secret has `Authorization` header. +Statping includes a [Prometheus Exporter](https://github.com/statping/statping/wiki/Prometheus-Exporter) so you can have even more monitoring power with your services. The Prometheus exporter can be seen on `/metrics`, simply create another exporter in your prometheus config. Use your Statping API Secret for the Authorization Bearer header, the `/metrics` URL is dedicated for Prometheus and requires the correct API Secret has `Authorization` header. ```yaml scrape_configs: - job_name: 'statping' @@ -117,7 +117,7 @@ scrape_configs: ``` ## Run on EC2 Server -Running Statping on the smallest EC2 server is very quick using the AWS AMI Image. Checkout the [AWS Wiki](https://github.com/hunterlong/statping/wiki/AWS-EC2) to see a step by step guide on how to get your EC2 Statping service online. +Running Statping on the smallest EC2 server is very quick using the AWS AMI Image. Checkout the [AWS Wiki](https://github.com/statping/statping/wiki/AWS-EC2) to see a step by step guide on how to get your EC2 Statping service online. ##### Create Security Groups Create the AWS Security Groups with the commands below, Statping will expose port 80 and 443. @@ -158,11 +158,11 @@ aws ec2 run-instances \ ``` ## Contributing -Statping accepts Push Requests! Feel free to add your own features and notifiers. You probably want to checkout the [Notifier Wiki](https://github.com/hunterlong/statping/wiki/Notifiers) to get a better understanding on how to create your own notification methods for failing/successful services. Testing on Statping will test each function on MySQL, Postgres, and SQLite. I recommend you run a MySQL and a Postgres Docker image for testing. +Statping accepts Push Requests! Feel free to add your own features and notifiers. You probably want to checkout the [Notifier Wiki](https://github.com/statping/statping/wiki/Notifiers) to get a better understanding on how to create your own notification methods for failing/successful services. Testing on Statping will test each function on MySQL, Postgres, and SQLite. I recommend you run a MySQL and a Postgres Docker image for testing. -[![Go Report Card](https://goreportcard.com/badge/github.com/hunterlong/statping)](https://goreportcard.com/report/github.com/hunterlong/statping) +[![Go Report Card](https://goreportcard.com/badge/github.com/statping/statping)](https://goreportcard.com/report/github.com/statping/statping) [![Build Status](https://travis-ci.com/hunterlong/statping.svg?branch=master)](https://travis-ci.com/hunterlong/statping) [![Cypress.io tests](https://img.shields.io/badge/cypress.io-tests-green.svg?style=flat-square)](https://dashboard.cypress.io/#/projects/bi8mhr/runs) -[![Docker Pulls](https://img.shields.io/docker/pulls/hunterlong/statping.svg)](https://hub.docker.com/r/hunterlong/statping/builds/) [![Godoc](https://godoc.org/github.com/hunterlong/statping?status.svg)](https://godoc.org/github.com/hunterlong/statping)[![Coverage Status](https://coveralls.io/repos/github/hunterlong/statping/badge.svg?branch=master)](https://coveralls.io/github/hunterlong/statping?branch=master) +[![Docker Pulls](https://img.shields.io/docker/pulls/hunterlong/statping.svg)](https://hub.docker.com/r/hunterlong/statping/builds/) [![Godoc](https://godoc.org/github.com/statping/statping?status.svg)](https://godoc.org/github.com/statping/statping)[![Coverage Status](https://coveralls.io/repos/github/hunterlong/statping/badge.svg?branch=master)](https://coveralls.io/github/hunterlong/statping?branch=master)
diff --git a/app.json b/app.json
index bda0bda5..0e864028 100644
--- a/app.json
+++ b/app.json
@@ -1,7 +1,7 @@
{
"name": "Statping",
"description": "Statping Server Monitoring with Status Page",
- "repository": "https://github.com/hunterlong/statping",
+ "repository": "https://github.com/statping/statping",
"logo": "https://raw.githubusercontent.com/hunterlong/statping/master/source/tmpl/banner.png",
"keywords": ["statping", "server", "monitoring", "status page","golang", "go"]
-}
\ No newline at end of file
+}
diff --git a/cmd/assets.go b/cmd/assets.go
index 4590559d..34600cc7 100644
--- a/cmd/assets.go
+++ b/cmd/assets.go
@@ -2,8 +2,8 @@ package main
import (
"fmt"
- "github.com/hunterlong/statping/source"
- "github.com/hunterlong/statping/utils"
+ "github.com/statping/statping/source"
+ "github.com/statping/statping/utils"
"net"
)
diff --git a/cmd/cli.go b/cmd/cli.go
index afd8cc04..ba63ac71 100644
--- a/cmd/cli.go
+++ b/cmd/cli.go
@@ -2,7 +2,7 @@
// Copyright (C) 2018. Hunter Long and the project contributors
// Written by Hunter Long