rename repo

master
hunterlong 2020-04-11 16:41:30 -07:00
parent d318df3ad2
commit 26ce00c164
22 changed files with 70 additions and 70 deletions

22
API.md

@ -1,7 +1,7 @@
Statping includes a RESTFUL API so you can view, update, and edit your services with easy to use routes. You can currently view, update and delete services, view, create, update users, and get detailed information about the Statping instance. To make life easy, try out a Postman or Swagger JSON file and use it on your Statping Server. Statping includes a RESTFUL API so you can view, update, and edit your services with easy to use routes. You can currently view, update and delete services, view, create, update users, and get detailed information about the Statping instance. To make life easy, try out a Postman or Swagger JSON file and use it on your Statping Server.
<p align="center"> <p align="center">
<a href="https://documenter.getpostman.com/view/1898229/RzfiJUd6">Postman</a> | <a href="https://github.com/hunterlong/statping/blob/master/source/tmpl/postman.json">Postman JSON Export</a> | <a href="https://github.com/hunterlong/statping/blob/master/dev/swagger.json">Swagger Export</a> <a href="https://documenter.getpostman.com/view/1898229/RzfiJUd6">Postman</a> | <a href="https://github.com/statping/statping/blob/master/source/tmpl/postman.json">Postman JSON Export</a> | <a href="https://github.com/statping/statping/blob/master/dev/swagger.json">Swagger Export</a>
</p> </p>
## Authentication ## Authentication
@ -19,21 +19,21 @@ The services API endpoint will show you detailed information about services and
### Viewing All Services ### Viewing All Services
- Endpoint: `/api/services` - Endpoint: `/api/services`
- Method: `GET` - Method: `GET`
- Response: Array of [Services](https://github.com/hunterlong/statping/wiki/API#service-response) - Response: Array of [Services](https://github.com/statping/statping/wiki/API#service-response)
- Response Type: `application/json` - Response Type: `application/json`
- Request Type: `application/json` - Request Type: `application/json`
### Viewing Service ### Viewing Service
- Endpoint: `/api/services/{id}` - Endpoint: `/api/services/{id}`
- Method: `GET` - Method: `GET`
- Response: [Service](https://github.com/hunterlong/statping/wiki/API#service-response) - Response: [Service](https://github.com/statping/statping/wiki/API#service-response)
- Response Type: `application/json` - Response Type: `application/json`
- Request Type: `application/json` - Request Type: `application/json`
### Updating Service ### Updating Service
- Endpoint: `/api/services/{id}` - Endpoint: `/api/services/{id}`
- Method: `POST` - Method: `POST`
- Response: [Service](https://github.com/hunterlong/statping/wiki/API#service-response) - Response: [Service](https://github.com/statping/statping/wiki/API#service-response)
- Response Type: `application/json` - Response Type: `application/json`
- Request Type: `application/json` - Request Type: `application/json`
@ -57,7 +57,7 @@ POST Data:
### Create New Service ### Create New Service
- Endpoint: `/api/services` - Endpoint: `/api/services`
- Method: `POST` - Method: `POST`
- Response: [Service](https://github.com/hunterlong/statping/wiki/API#service-response) - Response: [Service](https://github.com/statping/statping/wiki/API#service-response)
- Response Type: `application/json` - Response Type: `application/json`
- Request Type: `application/json` - Request Type: `application/json`
@ -81,7 +81,7 @@ POST Data:
### Deleting Service ### Deleting Service
- Endpoint: `/api/services/{id}` - Endpoint: `/api/services/{id}`
- Method: `DELETE` - Method: `DELETE`
- Response: [Object Response](https://github.com/hunterlong/statping/wiki/API#object-response) - Response: [Object Response](https://github.com/statping/statping/wiki/API#object-response)
- Response Type: `application/json` - Response Type: `application/json`
- Request Type: `application/json` - Request Type: `application/json`
@ -101,21 +101,21 @@ The users API endpoint will show you users that are registered inside your Statp
### View All Users ### View All Users
- Endpoint: `/api/users` - Endpoint: `/api/users`
- Method: `GET` - Method: `GET`
- Response: Array of [Users](https://github.com/hunterlong/statping/wiki/API#user-response) - Response: Array of [Users](https://github.com/statping/statping/wiki/API#user-response)
- Response Type: `application/json` - Response Type: `application/json`
- Request Type: `application/json` - Request Type: `application/json`
### Viewing User ### Viewing User
- Endpoint: `/api/users/{id}` - Endpoint: `/api/users/{id}`
- Method: `GET` - Method: `GET`
- Response: [User](https://github.com/hunterlong/statping/wiki/API#user-response) - Response: [User](https://github.com/statping/statping/wiki/API#user-response)
- Response Type: `application/json` - Response Type: `application/json`
- Request Type: `application/json` - Request Type: `application/json`
### Creating New User ### Creating New User
- Endpoint: `/api/users` - Endpoint: `/api/users`
- Method: `POST` - Method: `POST`
- Response: [User](https://github.com/hunterlong/statping/wiki/API#user-response) - Response: [User](https://github.com/statping/statping/wiki/API#user-response)
- Response Type: `application/json` - Response Type: `application/json`
- Request Type: `application/json` - Request Type: `application/json`
@ -132,7 +132,7 @@ POST Data:
### Updating User ### Updating User
- Endpoint: `/api/users/{id}` - Endpoint: `/api/users/{id}`
- Method: `POST` - Method: `POST`
- Response: [User](https://github.com/hunterlong/statping/wiki/API#user-response) - Response: [User](https://github.com/statping/statping/wiki/API#user-response)
- Response Type: `application/json` - Response Type: `application/json`
- Request Type: `application/json` - Request Type: `application/json`
@ -149,7 +149,7 @@ POST Data:
### Deleting User ### Deleting User
- Endpoint: `/api/services/{id}` - Endpoint: `/api/services/{id}`
- Method: `DELETE` - Method: `DELETE`
- Response: [Object Response](https://github.com/hunterlong/statping/wiki/API#object-response) - Response: [Object Response](https://github.com/statping/statping/wiki/API#object-response)
- Response Type: `application/json` - Response Type: `application/json`
- Request Type: `application/json` - Request Type: `application/json`

@ -11,8 +11,8 @@ Choose the correct AMI Image ID based on your AWS region.
# Upgrading Statping # Upgrading Statping
You can upgrade the Statping executable by running the commands below on your EC2 instance. You can upgrade the Statping executable by running the commands below on your EC2 instance.
``` ```
VERSION=$(curl -s "https://github.com/hunterlong/statping/releases/latest" | grep -o 'tag/[v.0-9]*' | awk -F/ '{print $2}') VERSION=$(curl -s "https://github.com/statping/statping/releases/latest" | grep -o 'tag/[v.0-9]*' | awk -F/ '{print $2}')
wget https://github.com/hunterlong/statping/releases/download/$VERSION/statping-linux-x64.tar.gz wget https://github.com/statping/statping/releases/download/$VERSION/statping-linux-x64.tar.gz
tar -xvzf statping-linux-x64.tar.gz tar -xvzf statping-linux-x64.tar.gz
chmod +x statping chmod +x statping
mv statping /usr/local/bin/statping mv statping /usr/local/bin/statping

@ -2,7 +2,7 @@ Building from the Go Language source code is pretty easy if you already have Go
### Git n' Go Get ### Git n' Go Get
```bash ```bash
git clone https://github.com/hunterlong/statping.git git clone https://github.com/statping/statping.git
cd statup cd statup
go get -v go get -v
``` ```

@ -1,4 +1,4 @@
You can import multiple services based on a CSV file with the format below. You can view an example CSV file at [source/tmpl/bulk_import.csv](https://github.com/hunterlong/statping/blob/master/source/tmpl/bulk_import.csv). Visit the Statping Settings page and scroll to the bottom to upload your CSV file and import multiple services with ease! You can import multiple services based on a CSV file with the format below. You can view an example CSV file at [source/tmpl/bulk_import.csv](https://github.com/statping/statping/blob/master/source/tmpl/bulk_import.csv). Visit the Statping Settings page and scroll to the bottom to upload your CSV file and import multiple services with ease!
You can also download the example CSV file with the [Statping - Bulk Import Services](https://docs.google.com/spreadsheets/d/1vcWM1ecyVFyCrQ-cmNAs5I52B9vq8wzWOw5jvpmUcJI/edit?usp=sharing) link. You can also download the example CSV file with the [Statping - Bulk Import Services](https://docs.google.com/spreadsheets/d/1vcWM1ecyVFyCrQ-cmNAs5I52B9vq8wzWOw5jvpmUcJI/edit?usp=sharing) link.

@ -5,7 +5,7 @@ brew install cloudfoundry/tap/cf-cli
``` ```
### Statping Yaml Config ### Statping Yaml Config
You can include multiple environment variables to the configg file. If you include `DB_CONN` Statping will attempt to automatically connect to that database. View the [Full List of Environment Variables](https://github.com/hunterlong/statping/wiki/Config-with-.env-File) to fully customize this config. You can include multiple environment variables to the configg file. If you include `DB_CONN` Statping will attempt to automatically connect to that database. View the [Full List of Environment Variables](https://github.com/statping/statping/wiki/Config-with-.env-File) to fully customize this config.
```yaml ```yaml
applications: applications:
- name: statping - name: statping

@ -6,7 +6,7 @@ auto-include many customized parameters to get everything working correctly.
# Dependencies # Dependencies
Statping has a couple of required dependencies when testing and compiling the Statping has a couple of required dependencies when testing and compiling the
binary. The [Makefile](https://github.com/hunterlong/statping/blob/master/Makefile) binary. The [Makefile](https://github.com/statping/statping/blob/master/Makefile)
will make these tasks a lot easier. Take a look at the Makefile to see what will make these tasks a lot easier. Take a look at the Makefile to see what
commands are running. Run the command below to get setup right away. commands are running. Run the command below to get setup right away.
@ -96,7 +96,7 @@ Please remember to also add the Changelog Entry to describe what you have
changed by using[changelog-go](https://gitlab.com/l0nax/changelog-go). changed by using[changelog-go](https://gitlab.com/l0nax/changelog-go).
If your PR is related to an Issue (ie. on a bug fix or when adding a new notifier) If your PR is related to an Issue (ie. on a bug fix or when adding a new notifier)
don't forget adding the related GitHub Issue ID like this: `[#270](https://github.com/hunterlong/statping/issues/270)` don't forget adding the related GitHub Issue ID like this: `[#270](https://github.com/statping/statping/issues/270)`
Check out the example below. Check out the example below.
Adding _one_ changelog entry should be done in a separate Commit - not only Adding _one_ changelog entry should be done in a separate Commit - not only
because this is a good Committing practice, also because it's separated by your because this is a good Committing practice, also because it's separated by your
@ -108,7 +108,7 @@ where all changes of a new Version are documented.
###### Example for fixing a bug in the UI ###### Example for fixing a bug in the UI
```bash ```bash
~] changelog new "Fix zooming out on graph doesn't load additional data ([#270](https://github.com/hunterlong/statping/issues/270))" ~] changelog new "Fix zooming out on graph doesn't load additional data ([#270](https://github.com/statping/statping/issues/270))"
[0] New Feature (Added) [0] New Feature (Added)
[1] Bug Fix (Fixed) [1] Bug Fix (Fixed)
[2] Feature change (Changed) [2] Feature change (Changed)

@ -5,11 +5,11 @@ Statping is a pretty cool server for monitoring your services. The way we deploy
3. SASS will generate a compiled version of the CSS. 3. SASS will generate a compiled version of the CSS.
4. Statping Help page is generated by cloning the Wiki repo using `go generate`. 4. Statping Help page is generated by cloning the Wiki repo using `go generate`.
5. Travis-CI tests the Golang application. 5. Travis-CI tests the Golang application.
6. Travis-CI tests the Statping API using [Postman](https://github.com/hunterlong/statping/blob/master/source/tmpl/postman.json). 6. Travis-CI tests the Statping API using [Postman](https://github.com/statping/statping/blob/master/source/tmpl/postman.json).
7. If all tests are successful, Travis-CI will compile the binaries using [xgo](https://github.com/karalabe/xgo). 7. If all tests are successful, Travis-CI will compile the binaries using [xgo](https://github.com/karalabe/xgo).
8. Binaries are code signed using the official [PGP key](https://github.com/hunterlong/statping/wiki/PGP-Signature) and compressed. 8. Binaries are code signed using the official [PGP key](https://github.com/statping/statping/wiki/PGP-Signature) and compressed.
9. [Docker](https://cloud.docker.com/repository/docker/hunterlong/statping/builds) receives a trigger to build for the `latest` tag. 9. [Docker](https://cloud.docker.com/repository/docker/hunterlong/statping/builds) receives a trigger to build for the `latest` tag.
10. Travis-CI uploads the [latest release](https://github.com/hunterlong/statping/releases) as a tagged version on Github. 10. Travis-CI uploads the [latest release](https://github.com/statping/statping/releases) as a tagged version on Github.
11. Travis-CI updates the [homebrew-statping](https://github.com/hunterlong/homebrew-statping) repo with the latest version. 11. Travis-CI updates the [homebrew-statping](https://github.com/hunterlong/homebrew-statping) repo with the latest version.
And that's it! Statping is ready to be shipped and installed. And that's it! Statping is ready to be shipped and installed.

@ -1,4 +1,4 @@
This page includes multiple docker-compose.yml setups for you to run. There are many environment variables for additional settings and features, checkout the [Environment Variables Wiki](https://github.com/hunterlong/statping/wiki/Environment-Variables) to see them all. This page includes multiple docker-compose.yml setups for you to run. There are many environment variables for additional settings and features, checkout the [Environment Variables Wiki](https://github.com/statping/statping/wiki/Environment-Variables) to see them all.
### Database Configurations ### Database Configurations
- [SQLite](#basic-sqlite-connection) - [SQLite](#basic-sqlite-connection)
@ -181,7 +181,7 @@ nginx-ssl:
``` ```
# Grafana Dashboard with Prometheus # Grafana Dashboard with Prometheus
Grafana is an awesome metric visualizer that allows you to create some awesome dashboards. We've already created a [Grafana Dashboard](https://grafana.com/grafana/dashboards/6950) that you can easy import! Checkout the [Grafana Wiki](https://github.com/hunterlong/statping/wiki/Prometheus-Exporter) and the [Prometheus Exporter Wiki](https://github.com/hunterlong/statping/wiki/Prometheus-Exporter) for more details. Grafana is an awesome metric visualizer that allows you to create some awesome dashboards. We've already created a [Grafana Dashboard](https://grafana.com/grafana/dashboards/6950) that you can easy import! Checkout the [Grafana Wiki](https://github.com/statping/statping/wiki/Prometheus-Exporter) and the [Prometheus Exporter Wiki](https://github.com/statping/statping/wiki/Prometheus-Exporter) for more details.
##### `prometheus.yml` config file ##### `prometheus.yml` config file
This file should be mounted to `/etc/prometheus/prometheus.yml` in the Prometheus container. This file should be mounted to `/etc/prometheus/prometheus.yml` in the Prometheus container.

@ -22,7 +22,7 @@ docker run -d \
``` ```
# Attach a SSL Certificate # Attach a SSL Certificate
When you mount `server.crt` and `server.key` to the `/app` directory, Statping will run a HTTPS server on port 443. Checkout the [SSL Wiki](https://github.com/hunterlong/statping/wiki/SSL) documentation to see more information about this. When you mount `server.crt` and `server.key` to the `/app` directory, Statping will run a HTTPS server on port 443. Checkout the [SSL Wiki](https://github.com/statping/statping/wiki/SSL) documentation to see more information about this.
```bash ```bash
docker run -d \ docker run -d \
-p 443:443 \ -p 443:443 \

@ -7,7 +7,7 @@ You can use MySQL, Postgres, or SQLite as a database for your Statping status pa
Statping is an extremely easy to setup website monitoring tool without fussing with dependencies or packages. Simply download and install the precompile binary for your operating system. Statping works on Windows, Mac, Linux, Docker, and even the Raspberry Pi. Statping is an extremely easy to setup website monitoring tool without fussing with dependencies or packages. Simply download and install the precompile binary for your operating system. Statping works on Windows, Mac, Linux, Docker, and even the Raspberry Pi.
# Plugins # Plugins
Statping is an awesome Status Page generator that allows you to create your own plugins with Golang Plugins! You don't need to request a PR or even tell us about your plugin. Plugin's are compiled and then send as a binary to the Statping `/plugins` folder. Test your plugins using the `statup test plugin` command, checkout the [Plugin Wiki](https://github.com/hunterlong/statping/wiki/Statping-Plugins) to see detailed information about creating plugins. Statping is an awesome Status Page generator that allows you to create your own plugins with Golang Plugins! You don't need to request a PR or even tell us about your plugin. Plugin's are compiled and then send as a binary to the Statping `/plugins` folder. Test your plugins using the `statup test plugin` command, checkout the [Plugin Wiki](https://github.com/statping/statping/wiki/Statping-Plugins) to see detailed information about creating plugins.
# No Maintenance # No Maintenance
Many other website monitoring applications will collect data until the server fails because of hard drive is 100% full. Statping will automatically delete records to make sure your server will stay UP for years. The EC2 AMI Image is a great way to host your status page without worrying about it crashing one day. Statping will automatically upgrade its software when you reboot your computer. Many other website monitoring applications will collect data until the server fails because of hard drive is 100% full. Statping will automatically delete records to make sure your server will stay UP for years. The EC2 AMI Image is a great way to host your status page without worrying about it crashing one day. Statping will automatically upgrade its software when you reboot your computer.
@ -16,4 +16,4 @@ Many other website monitoring applications will collect data until the server fa
Receive email notifications if your website or application goes offline. Statping includes SMTP connections so you can use AWS SES, or any other SMTP emailing service. Go in the Email Settings in Settings to configure these options. Receive email notifications if your website or application goes offline. Statping includes SMTP connections so you can use AWS SES, or any other SMTP emailing service. Go in the Email Settings in Settings to configure these options.
# Prometheus Exporter # Prometheus Exporter
If you want a deeper view of your applications status, you can use Grafana and Prometheus to graph all types of data about your services. Read more about the [Prometheus Exporter](https://github.com/hunterlong/statping/wiki/Prometheus-Exporter) If you want a deeper view of your applications status, you can use Grafana and Prometheus to graph all types of data about your services. Read more about the [Prometheus Exporter](https://github.com/statping/statping/wiki/Prometheus-Exporter)

@ -1,7 +1,7 @@
Statping implements the [GraphQL](https://graphql.org/) API interface so you can customize the exact data you need within a query. The GraphQL endpoint is at `/graphql` on your Statping instance and is only available for Authenticated users or while sending the `Authorization` API Secret. Statping implements the [GraphQL](https://graphql.org/) API interface so you can customize the exact data you need within a query. The GraphQL endpoint is at `/graphql` on your Statping instance and is only available for Authenticated users or while sending the `Authorization` API Secret.
<p align="center"> <p align="center">
<a href="https://github.com/hunterlong/statping/blob/master/handlers/graphql/schema.graphql">View schema.graphql</a> <a href="https://github.com/statping/statping/blob/master/handlers/graphql/schema.graphql">View schema.graphql</a>
</p> </p>
*** ***
@ -54,4 +54,4 @@ Retrieve the `id`, `name`, and `public` parameters from `service` #2.
*** ***
The code for handling GraphQL requests is in [handlers/graphql](https://github.com/hunterlong/statping/tree/master/handlers/graphql) and is using [gqlgen](https://github.com/99designs/gqlgen) to automatically generate the schema based on the golang structs. The code for handling GraphQL requests is in [handlers/graphql](https://github.com/statping/statping/tree/master/handlers/graphql) and is using [gqlgen](https://github.com/99designs/gqlgen) to automatically generate the schema based on the golang structs.

@ -1,6 +1,6 @@
You can now instantly deploy your Statping instance on a free Heroku container. Simply click the deploy button below and get up in running within seconds. This Heroku deployment is based on the Statping Docker image so you will have all the great features including SASS and all the notifiers without any setup. You can now instantly deploy your Statping instance on a free Heroku container. Simply click the deploy button below and get up in running within seconds. This Heroku deployment is based on the Statping Docker image so you will have all the great features including SASS and all the notifiers without any setup.
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/hunterlong/statping/tree/master) [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/statping/statping/tree/master)
View the live Heroku Statping instance at: [https://statping.herokuapp.com](https://statping.herokuapp.com) View the live Heroku Statping instance at: [https://statping.herokuapp.com](https://statping.herokuapp.com)

@ -51,11 +51,11 @@ systemctl start statping
You're Statping server will now automatically restart when your server restarts. You're Statping server will now automatically restart when your server restarts.
## Raspberry Pi ## Raspberry Pi
You can even run Statping on your Raspberry Pi by installing the precompiled binary from [Latest Releases](https://github.com/hunterlong/statping/releases/latest). For the Raspberry Pi 3 you'll want to download the `statping-linux-arm7.tar.gz` file. Be sure to change `VERSION` to the latest version in Releases, and include the 'v'. You can even run Statping on your Raspberry Pi by installing the precompiled binary from [Latest Releases](https://github.com/statping/statping/releases/latest). For the Raspberry Pi 3 you'll want to download the `statping-linux-arm7.tar.gz` file. Be sure to change `VERSION` to the latest version in Releases, and include the 'v'.
``` ```
VERSION=$(curl -sL "https://github.com/hunterlong/statping/releases/latest" | grep -o 'tag/[v.0-9]*' | awk -F/ '{print $2}' | head -n1) VERSION=$(curl -sL "https://github.com/statping/statping/releases/latest" | grep -o 'tag/[v.0-9]*' | awk -F/ '{print $2}' | head -n1)
wget https://github.com/hunterlong/statping/releases/download/$VERSION/statping-linux-arm7.tar.gz wget https://github.com/statping/statping/releases/download/$VERSION/statping-linux-arm7.tar.gz
tar -xvzf statping-linux-arm7.tar.gz tar -xvzf statping-linux-arm7.tar.gz
chmod +x statping chmod +x statping
mv statping /usr/local/bin/statping mv statping /usr/local/bin/statping
@ -64,4 +64,4 @@ statping version
``` ```
## Alpine Linux ## Alpine Linux
The Docker image is using the Statping Alpine binary since it's so incredibly small. You can run it on your own alpine image by downloading `statping-linux-alpine.tar.gz` from [Latest Releases](https://github.com/hunterlong/statping/releases/latest). The Docker image is using the Statping Alpine binary since it's so incredibly small. You can run it on your own alpine image by downloading `statping-linux-alpine.tar.gz` from [Latest Releases](https://github.com/statping/statping/releases/latest).

@ -1,4 +1,4 @@
Here's a simple list of Makefile commands you can run using `make`. The [Makefile](https://github.com/hunterlong/statping/blob/master/Makefile) may change often, so i'll try to keep this Wiki up-to-date. Here's a simple list of Makefile commands you can run using `make`. The [Makefile](https://github.com/statping/statping/blob/master/Makefile) may change often, so i'll try to keep this Wiki up-to-date.
- Ubuntu `apt-get install build-essential` - Ubuntu `apt-get install build-essential`
- MacOSX `sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer` - MacOSX `sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer`

@ -6,8 +6,8 @@ package notifiers
import ( import (
"errors" "errors"
"fmt" "fmt"
"github.com/hunterlong/statping/types" "github.com/statping/statping/types"
"github.com/hunterlong/statping/core/notifier" "github.com/statping/statping/core/notifier"
"time" "time"
) )

@ -5,8 +5,8 @@
Statping includes multiple Notifiers to alert you when your services are offline. You can also create your own notifier and send a Push Request to this repo! Creating a custom notifier is pretty easy as long as you follow the requirements. A notifier will automatically be installed into the users Statping database, and form values will save without any hassles. 💃 Statping includes multiple Notifiers to alert you when your services are offline. You can also create your own notifier and send a Push Request to this repo! Creating a custom notifier is pretty easy as long as you follow the requirements. A notifier will automatically be installed into the users Statping database, and form values will save without any hassles. 💃
<p align="center"> <p align="center">
<a href="https://github.com/hunterlong/statping/wiki/Notifier-Example">Example Code</a> | <a href="https://github.com/hunterlong/statping/wiki/Notifier-Events">Events</a> | <a href="https://github.com/hunterlong/statping/tree/master/notifiers">View Notifiers</a><br> <a href="https://github.com/statping/statping/wiki/Notifier-Example">Example Code</a> | <a href="https://github.com/statping/statping/wiki/Notifier-Events">Events</a> | <a href="https://github.com/statping/statping/tree/master/notifiers">View Notifiers</a><br>
<a href="https://godoc.org/github.com/hunterlong/statping/core/notifier"><img src="https://godoc.org/github.com/golang/gddo?status.svg"></a> <a href="https://godoc.org/github.com/statping/statping/core/notifier"><img src="https://godoc.org/github.com/golang/gddo?status.svg"></a>
</p> </p>
## Notifier Requirements ## Notifier Requirements
@ -16,7 +16,7 @@ Statping includes multiple Notifiers to alert you when your services are offline
- Should have a form for user to input their variables/keys. `Form: []notifier.NotificationForm` - Should have a form for user to input their variables/keys. `Form: []notifier.NotificationForm`
## Notifier Interface (required) ## Notifier Interface (required)
Statping has the `Notifier` interface which you'll need to include in your notifier. Statping includes many other events/triggers for your notifier, checkout <a href="https://github.com/hunterlong/statping/wiki/Notifier-Events">Notifier Events</a> to see all of them. Statping has the `Notifier` interface which you'll need to include in your notifier. Statping includes many other events/triggers for your notifier, checkout <a href="https://github.com/statping/statping/wiki/Notifier-Events">Notifier Events</a> to see all of them.
```go ```go
// Notifier interface is required to create a new Notifier // Notifier interface is required to create a new Notifier
type Notifier interface { type Notifier interface {
@ -113,7 +113,7 @@ You can completely custom your notifications to include a detailed form.
- `Placeholder` optional field for inserting small hint under the input - `Placeholder` optional field for inserting small hint under the input
# Adding Notifiers # Adding Notifiers
To add a notifier to the Statping application, simply append your Notifier in the `AttachNotifiers()` function inside of [core/core.go](https://github.com/hunterlong/statping/blob/master/core/core.go). To add a notifier to the Statping application, simply append your Notifier in the `AttachNotifiers()` function inside of [core/core.go](https://github.com/statping/statping/blob/master/core/core.go).
```go ```go
// AttachNotifiers will attach all the notifier's into the system // AttachNotifiers will attach all the notifier's into the system
@ -131,4 +131,4 @@ func AttachNotifiers() error {
) )
} }
``` ```
###### [AttachNotifiers](https://github.com/hunterlong/statping/blob/master/core/core.go#L183) ###### [AttachNotifiers](https://github.com/statping/statping/blob/master/core/core.go#L183)

@ -1,7 +1,7 @@
You can check if the Statping binary you downloaded is authentic by running a few commands. You can check if the Statping binary you downloaded is authentic by running a few commands.
### Steps to Authenticate ### Steps to Authenticate
1. Download the Statping `tar.gz` file from [Latest Releases](https://github.com/hunterlong/statping/releases/latest) and extract the `statping` binary and the `statup.asc` file. 1. Download the Statping `tar.gz` file from [Latest Releases](https://github.com/statping/statping/releases/latest) and extract the `statping` binary and the `statup.asc` file.
2. Run command: `gpg --verify statping.asc` 2. Run command: `gpg --verify statping.asc`
3. You should see `Good signature from "Hunter Long <info@statping.com>" [ultimate]`. 3. You should see `Good signature from "Hunter Long <info@statping.com>" [ultimate]`.

@ -1,24 +1,24 @@
Since Statping is built in Go Language we can use the [Go Plugin](https://golang.org/pkg/plugin/) feature to create dynamic plugins that run on load. Statping has an event anytime anything happens, you can create your own plugins and do any type of function. To implement your own ideas into Statping, use the plugin using the [statup/plugin](https://github.com/hunterlong/statping/blob/master/plugin/main.go) package. Since Statping is built in Go Language we can use the [Go Plugin](https://golang.org/pkg/plugin/) feature to create dynamic plugins that run on load. Statping has an event anytime anything happens, you can create your own plugins and do any type of function. To implement your own ideas into Statping, use the plugin using the [statup/plugin](https://github.com/statping/statping/blob/master/plugin/main.go) package.
``` ```
go get github.com/hunterlong/statping/plugin go get github.com/statping/statping/plugin
``` ```
## Example Plugin ## Example Plugin
Start off with the [Example Statping Plugin](https://github.com/hunterlong/statping_plugin) that includes all the interfaces and some custom options for you to expand on. You can include any type of function in your own plugin! Start off with the [Example Statping Plugin](https://github.com/statping/statping_plugin) that includes all the interfaces and some custom options for you to expand on. You can include any type of function in your own plugin!
<p align="center"> <p align="center">
<img width="95%" src="https://img.cjx.io/statuppluginrun.gif"> <img width="95%" src="https://img.cjx.io/statuppluginrun.gif">
</p> </p>
## Building Plugins ## Building Plugins
Plugins don't need a push request and they can be private! You'll need to compile your plugin to the Golang `.so` binary format. Once you've built your plugin, insert it into the `plugins` folder in your Statping directory and reboot the application. Clone the [Example Statping Plugin](https://github.com/hunterlong/statping_plugin) repo and try to build it yourself! Plugins don't need a push request and they can be private! You'll need to compile your plugin to the Golang `.so` binary format. Once you've built your plugin, insert it into the `plugins` folder in your Statping directory and reboot the application. Clone the [Example Statping Plugin](https://github.com/statping/statping_plugin) repo and try to build it yourself!
#### Build Requirements #### Build Requirements
- You must have `main.go` - You must have `main.go`
- You must create the Plugin variable on `init()` - You must create the Plugin variable on `init()`
```bash ```bash
git clone https://github.com/hunterlong/statping_plugin git clone https://github.com/statping/statping_plugin
cd statup-plugin cd statup-plugin
go build -buildmode=plugin -o example.so go build -buildmode=plugin -o example.so
``` ```
@ -36,7 +36,7 @@ statup test plugins
Your plugin should be able to parse and receive events before distributing it. The test tools creates a temporary database (SQLite) that your plugin can interact with. Statping uses [upper.io/db.v3](https://upper.io/db.v3) for database interactions. The database is passed to your plugin `OnLoad(db sqlbuilder.Database)`, so you can use the `db` variable passed here. Your plugin should be able to parse and receive events before distributing it. The test tools creates a temporary database (SQLite) that your plugin can interact with. Statping uses [upper.io/db.v3](https://upper.io/db.v3) for database interactions. The database is passed to your plugin `OnLoad(db sqlbuilder.Database)`, so you can use the `db` variable passed here.
## Statping Plugin Interface ## Statping Plugin Interface
Please remember Golang plugin's are very new and Statping plugin package may change and 'could' brake your plugin. Checkout the [statup/plugin package](https://github.com/hunterlong/statping/blob/master/plugin/main.go) to see the most current interfaces. Please remember Golang plugin's are very new and Statping plugin package may change and 'could' brake your plugin. Checkout the [statup/plugin package](https://github.com/statping/statping/blob/master/plugin/main.go) to see the most current interfaces.
```go ```go
type PluginActions interface { type PluginActions interface {
GetInfo() Info GetInfo() Info
@ -96,7 +96,7 @@ func (p pkg) OnLoad(db sqlbuilder.Database) {
## Interacting with Database ## Interacting with Database
The Example Statping Plugin includes a variable `Database` that will allow you to interact with the Statping database. Checkout [database.go](https://github.com/hunterlong/statping_plugin/blob/master/database.go) to see a full example of Create, Read, Update and then Deleting a custom Communication entry into the database. The Example Statping Plugin includes a variable `Database` that will allow you to interact with the Statping database. Checkout [database.go](https://github.com/statping/statping_plugin/blob/master/database.go) to see a full example of Create, Read, Update and then Deleting a custom Communication entry into the database.
```go ```go
// Insert a new communication into database // Insert a new communication into database
// once inserted, return the Communication // once inserted, return the Communication
@ -111,7 +111,7 @@ func (c *Communication) Create() *Communication {
``` ```
## Custom HTTP Routes ## Custom HTTP Routes
Plugin's can include their own HTTP route to accept GET/POST requests. Route are loaded after Statping loads all of it's Routes. Checkout [routes.go](https://github.com/hunterlong/statping_plugin/blob/master/routes.go) on the example plugin to see a full example of how to use it. Plugin's can include their own HTTP route to accept GET/POST requests. Route are loaded after Statping loads all of it's Routes. Checkout [routes.go](https://github.com/statping/statping_plugin/blob/master/routes.go) on the example plugin to see a full example of how to use it.
```go ```go
// You must have a Routes() method in your plugin // You must have a Routes() method in your plugin
func (p *pkg) Routes() []plugin.Routing { func (p *pkg) Routes() []plugin.Routing {

@ -1,5 +1,5 @@
# Installing on Windows # Installing on Windows
Currently, Statping only works on Windows 64-bit computers. Just download the exe file from [Latest Releases](https://github.com/hunterlong/statping/releases/latest) and run it in your command prompt. It will create a HTTP server on port 8080, so you can visit `http://localhost:8080` to see your Statping Status Page. Currently, Statping only works on Windows 64-bit computers. Just download the exe file from [Latest Releases](https://github.com/statping/statping/releases/latest) and run it in your command prompt. It will create a HTTP server on port 8080, so you can visit `http://localhost:8080` to see your Statping Status Page.
# Compiling SCSS for Custom Theme # Compiling SCSS for Custom Theme
Statping requires `sass` to be installed to the local machine to compile SCSS into CSS if you want to use the Custom Theme features. Statping requires `sass` to be installed to the local machine to compile SCSS into CSS if you want to use the Custom Theme features.
@ -20,4 +20,4 @@ To ensure Statping is always running, it can be installed to run as a service on
7. Run Statping. 7. Run Statping.
## Known Issues with Windows ## Known Issues with Windows
Unfortunately, Statping only works on Windows 64-bit processors. If you have more than 4gb of ram, there's a good chance you already have a 64-bit processor. Download the [Latest Releases](https://github.com/hunterlong/statping/releases/latest) of Statping, extract the ZIP file, then double click on the `statping.exe` file. You can use a SQLite database for a quick setup, or connect to a local/remote Postgres or MySQL database server. Unfortunately, Statping only works on Windows 64-bit processors. If you have more than 4gb of ram, there's a good chance you already have a 64-bit processor. Download the [Latest Releases](https://github.com/statping/statping/releases/latest) of Statping, extract the ZIP file, then double click on the `statping.exe` file. You can use a SQLite database for a quick setup, or connect to a local/remote Postgres or MySQL database server.

@ -1,3 +1,3 @@
<p align="center"> <p align="center">
<a href="https://statping.com">Statping.com</a> | <a href="https://demo.statping.com">Demo</a> | <a href="https://hub.docker.com/r/hunterlong/statping">Docker</a> | <a href="https://github.com/hunterlong/statping/wiki/Notifiers">Notifiers</a> | <a href="https://github.com/hunterlong/statping/wiki/API">API</a> <a href="https://statping.com">Statping.com</a> | <a href="https://demo.statping.com">Demo</a> | <a href="https://hub.docker.com/r/hunterlong/statping">Docker</a> | <a href="https://github.com/statping/statping/wiki/Notifiers">Notifiers</a> | <a href="https://github.com/statping/statping/wiki/API">API</a>
</p> </p>

@ -76,7 +76,7 @@ Email: `info@statping.com`
Docker: [hunterlong/statping](https://cloud.docker.com/repository/docker/hunterlong/statping/builds) Docker: [hunterlong/statping](https://cloud.docker.com/repository/docker/hunterlong/statping/builds)
[![GoDoc](https://godoc.org/github.com/golang/gddo?status.png)](https://godoc.org/github.com/hunterlong/statping) [![GoDoc](https://godoc.org/github.com/golang/gddo?status.png)](https://godoc.org/github.com/statping/statping)
[![Build Status](https://travis-ci.com/hunterlong/statping.svg?branch=master)](https://travis-ci.com/hunterlong/statping) [![Build Status](https://travis-ci.com/hunterlong/statping.svg?branch=master)](https://travis-ci.com/hunterlong/statping)
@ -84,13 +84,13 @@ Docker: [hunterlong/statping](https://cloud.docker.com/repository/docker/hunterl
[![Maintainability](https://api.codeclimate.com/v1/badges/f16a0ede604a50a8c9d2/maintainability)](https://codeclimate.com/github/hunterlong/statping/maintainability) [![Maintainability](https://api.codeclimate.com/v1/badges/f16a0ede604a50a8c9d2/maintainability)](https://codeclimate.com/github/hunterlong/statping/maintainability)
[![Sourcegraph](https://img.shields.io/sourcegraph/rrc/github.com/hunterlong/statping.svg)](https://sourcegraph.com/github.com/hunterlong/statping) [![Sourcegraph](https://img.shields.io/sourcegraph/rrc/github.com/statping/statping.svg)](https://sourcegraph.com/github.com/statping/statping)
[![GitHub release](https://img.shields.io/github/release/hunterlong/statping.svg)](https://github.com/hunterlong/statping/releases/latest) [![GitHub release](https://img.shields.io/github/release/hunterlong/statping.svg)](https://github.com/statping/statping/releases/latest)
[![Docker Build Status](https://img.shields.io/docker/build/hunterlong/statping.svg)](https://hub.docker.com/r/hunterlong/statping/builds/) [![Docker Build Status](https://img.shields.io/docker/build/hunterlong/statping.svg)](https://hub.docker.com/r/hunterlong/statping/builds/)
[![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)
[![Coverage Status](https://coveralls.io/repos/github/hunterlong/statping/badge.svg?branch=master)](https://coveralls.io/github/hunterlong/statping?branch=master) [![Coverage Status](https://coveralls.io/repos/github/hunterlong/statping/badge.svg?branch=master)](https://coveralls.io/github/hunterlong/statping?branch=master)

@ -1,4 +1,4 @@
The `config.yml` file contains all of the Statping database settings and API keys/secrets. When Statping loads, it will attempt to open this file to parse it's core values. You can view the Go type file on [types/types.go](https://github.com/hunterlong/statping/blob/master/types/types.go#L40). The `config.yml` file contains all of the Statping database settings and API keys/secrets. When Statping loads, it will attempt to open this file to parse it's core values. You can view the Go type file on [types/types.go](https://github.com/statping/statping/blob/master/types/types.go#L40).
### `config.yml` Parameters ### `config.yml` Parameters
- **connection**: sqlite (sqlite, mysql, postgres) - **connection**: sqlite (sqlite, mysql, postgres)
@ -14,6 +14,6 @@ The `config.yml` file contains all of the Statping database settings and API key
The `location` setting will contain core files/folders for Statping like, `logs`, `assets`, and should contain the `config.yml` file. The `location` setting will contain core files/folders for Statping like, `logs`, `assets`, and should contain the `config.yml` file.
## Using Environment Variables instead of `config.yml` ## Using Environment Variables instead of `config.yml`
You technically don't need this `config.yml` file to run Statping. You can also run the Statping server by including environment variables when you start the server. You can view all the available variables by viewing the [Config with .env](https://github.com/hunterlong/statping/wiki/Config-with-.env-File) Wiki page. You technically don't need this `config.yml` file to run Statping. You can also run the Statping server by including environment variables when you start the server. You can view all the available variables by viewing the [Config with .env](https://github.com/statping/statping/wiki/Config-with-.env-File) Wiki page.
**Statping will auto run with environment variables if** `DB_CONN` **is set!** **Statping will auto run with environment variables if** `DB_CONN` **is set!**