mirror of https://github.com/statping/statping
package name change
parent
a80fc47e90
commit
97ac239e22
|
@ -4,7 +4,7 @@ about: Suggest a feature and let's see what others say
|
|||
|
||||
---
|
||||
|
||||
**What would you like on Statup?**
|
||||
**What would you like on Statping?**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe the solution you'd like**
|
||||
|
|
|
@ -31,7 +31,7 @@ env:
|
|||
- DB_PASS=
|
||||
- DB_DATABASE=test
|
||||
- GO_ENV=test
|
||||
- STATUP_DIR=$GOPATH/src/github.com/hunterlong/statping
|
||||
- STATPING_DIR=$GOPATH/src/github.com/hunterlong/statping
|
||||
|
||||
before_deploy:
|
||||
- git config --local user.name "hunterlong"
|
||||
|
|
|
@ -5,7 +5,7 @@ ENV DEP_VERSION v0.5.0
|
|||
RUN apk add --no-cache libstdc++ gcc g++ make git ca-certificates linux-headers wget curl jq
|
||||
RUN curl -L -s https://github.com/golang/dep/releases/download/$DEP_VERSION/dep-linux-amd64 -o /go/bin/dep && \
|
||||
chmod +x /go/bin/dep
|
||||
RUN curl -L -s https://assets.statup.io/sass -o /usr/local/bin/sass && \
|
||||
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
|
||||
ADD . /go/src/github.com/hunterlong/statping
|
||||
|
@ -13,13 +13,13 @@ RUN make dep
|
|||
RUN make dev-deps
|
||||
RUN make install
|
||||
|
||||
# Statup :latest Docker Image
|
||||
# Statping :latest Docker Image
|
||||
FROM alpine:latest
|
||||
MAINTAINER "Hunter Long (https://github.com/hunterlong)"
|
||||
|
||||
ARG VERSION
|
||||
ENV IS_DOCKER=true
|
||||
ENV STATUP_DIR=/app
|
||||
ENV STATPING_DIR=/app
|
||||
|
||||
RUN apk --no-cache add curl jq
|
||||
|
||||
|
|
2
LICENSE
2
LICENSE
|
@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
|
|||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
Statup Copyright (C) 2018 Hunter Long
|
||||
Statping Copyright (C) 2018 Hunter Long
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
|
20
Makefile
20
Makefile
|
@ -52,7 +52,7 @@ test-plugin: clean
|
|||
mkdir plugins
|
||||
$(GOBUILD) $(BUILDVERSION) -buildmode=plugin -o ./dev/plugin/example.so -v ./dev/plugin
|
||||
mv ./dev/plugin/example.so ./plugins/example.so
|
||||
STATUP_DIR=$(TEST_DIR) go test -v -p=1 $(BUILDVERSION) -coverprofile=coverage.out ./plugin
|
||||
STATPING_DIR=$(TEST_DIR) go test -v -p=1 $(BUILDVERSION) -coverprofile=coverage.out ./plugin
|
||||
|
||||
# build Statping debug app
|
||||
build-debug: compile
|
||||
|
@ -83,7 +83,7 @@ benchmark-view:
|
|||
|
||||
# test Statping golang tetsing files
|
||||
test: clean compile install build-plugin
|
||||
STATUP_DIR=$(TEST_DIR) go test -v -p=1 $(BUILDVERSION) -coverprofile=coverage.out ./...
|
||||
STATPING_DIR=$(TEST_DIR) go test -v -p=1 $(BUILDVERSION) -coverprofile=coverage.out ./...
|
||||
gocov convert coverage.out > coverage.json
|
||||
|
||||
test-api:
|
||||
|
@ -217,14 +217,14 @@ dev-deps:
|
|||
|
||||
# remove files for a clean compile/build
|
||||
clean:
|
||||
rm -rf ./{logs,assets,plugins,statping.db,config.yml,.sass-cache,config.yml,statping,build,.sass-cache,statping.db,index.html,vendor}
|
||||
rm -rf cmd/{logs,assets,plugins,statping.db,config.yml,.sass-cache,*.log}
|
||||
rm -rf core/{logs,assets,plugins,statping.db,config.yml,.sass-cache,*.log}
|
||||
rm -rf handlers/{logs,assets,plugins,statping.db,config.yml,.sass-cache,*.log}
|
||||
rm -rf notifiers/{logs,assets,plugins,statping.db,config.yml,.sass-cache,*.log}
|
||||
rm -rf source/{logs,assets,plugins,statping.db,config.yml,.sass-cache,*.log}
|
||||
rm -rf types/{logs,assets,plugins,statping.db,config.yml,.sass-cache,*.log}
|
||||
rm -rf utils/{logs,assets,plugins,statping.db,config.yml,.sass-cache,*.log}
|
||||
rm -rf ./{logs,assets,plugins,statup.db,config.yml,.sass-cache,config.yml,statping,build,.sass-cache,statup.db,index.html,vendor}
|
||||
rm -rf cmd/{logs,assets,plugins,statup.db,config.yml,.sass-cache,*.log}
|
||||
rm -rf core/{logs,assets,plugins,statup.db,config.yml,.sass-cache,*.log}
|
||||
rm -rf handlers/{logs,assets,plugins,statup.db,config.yml,.sass-cache,*.log}
|
||||
rm -rf notifiers/{logs,assets,plugins,statup.db,config.yml,.sass-cache,*.log}
|
||||
rm -rf source/{logs,assets,plugins,statup.db,config.yml,.sass-cache,*.log}
|
||||
rm -rf types/{logs,assets,plugins,statup.db,config.yml,.sass-cache,*.log}
|
||||
rm -rf utils/{logs,assets,plugins,statup.db,config.yml,.sass-cache,*.log}
|
||||
rm -rf {parts,prime,snap,stage}
|
||||
rm -rf dev/test/cypress/videos
|
||||
rm -f coverage.* sass
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
</p>
|
||||
<p align="center">
|
||||
<b>Statping - Web and App Status Monitoring for Any Type of Project</b><br>
|
||||
<a href="https://github.com/hunterlong/statping/wiki">View Wiki</a> | <a href="https://demo.statup.io">Demo</a> <br> <a href="https://github.com/hunterlong/statping/wiki/API">API</a> | <a href="https://github.com/hunterlong/statping/wiki/Docker">Docker</a> | <a href="https://github.com/hunterlong/statping/wiki/AWS-EC2">EC2</a> | <a href="https://github.com/hunterlong/statping/wiki/Heroku">Heroku</a> | <a href="https://github.com/hunterlong/statping/wiki/Mac">Mac</a> | <a href="https://github.com/hunterlong/statping/wiki/Linux">Linux</a> | <a href="https://github.com/hunterlong/statping/wiki/Windows">Windows</a> | <a href="https://github.com/hunterlong/statping/wiki/Statping-Plugins">Plugins</a>
|
||||
<a href="https://github.com/hunterlong/statping/wiki">View Wiki</a> | <a href="https://demo.statping.com">Demo</a> <br> <a href="https://github.com/hunterlong/statping/wiki/API">API</a> | <a href="https://github.com/hunterlong/statping/wiki/Docker">Docker</a> | <a href="https://github.com/hunterlong/statping/wiki/AWS-EC2">EC2</a> | <a href="https://github.com/hunterlong/statping/wiki/Heroku">Heroku</a> | <a href="https://github.com/hunterlong/statping/wiki/Mac">Mac</a> | <a href="https://github.com/hunterlong/statping/wiki/Linux">Linux</a> | <a href="https://github.com/hunterlong/statping/wiki/Windows">Windows</a> | <a href="https://github.com/hunterlong/statping/wiki/Statping-Plugins">Plugins</a>
|
||||
</p>
|
||||
|
||||
# Statping - Status Page & Monitoring Server
|
||||
|
|
36
cmd/cli.go
36
cmd/cli.go
|
@ -115,15 +115,15 @@ func catchCLI(args []string) error {
|
|||
return fmt.Errorf("could not export settings: %v", err.Error())
|
||||
}
|
||||
//core.CloseDB()
|
||||
if err = utils.SaveFile(dir+"/statup-export.json", data); err != nil {
|
||||
return fmt.Errorf("could not write file statup-export.json: %v", err.Error())
|
||||
if err = utils.SaveFile(dir+"/statping-export.json", data); err != nil {
|
||||
return fmt.Errorf("could not write file statping-export.json: %v", err.Error())
|
||||
}
|
||||
return errors.New("end")
|
||||
case "import":
|
||||
var err error
|
||||
var data []byte
|
||||
if len(args) != 2 {
|
||||
return fmt.Errorf("did not include a JSON file to import\nstatup import filename.json")
|
||||
return fmt.Errorf("did not include a JSON file to import\nstatping import filename.json")
|
||||
}
|
||||
filename := args[1]
|
||||
if data, err = ioutil.ReadFile(filename); err != nil {
|
||||
|
@ -198,26 +198,26 @@ func RunOnce() {
|
|||
|
||||
// HelpEcho prints out available commands and flags for Statping
|
||||
func HelpEcho() {
|
||||
fmt.Printf("Statping v%v - Statping.io\n", VERSION)
|
||||
fmt.Printf("Statping v%v - Statping.com\n", VERSION)
|
||||
fmt.Printf("A simple Application Status Monitor that is opensource and lightweight.\n")
|
||||
fmt.Printf("Commands:\n")
|
||||
fmt.Println(" statup - Main command to run Statping server")
|
||||
fmt.Println(" statup version - Returns the current version of Statping")
|
||||
fmt.Println(" statup run - Check all services 1 time and then quit")
|
||||
fmt.Println(" statup assets - Dump all assets used locally to be edited.")
|
||||
fmt.Println(" statup static - Creates a static HTML file of the index page")
|
||||
fmt.Println(" statup sass - Compile .scss files into the css directory")
|
||||
fmt.Println(" statup test plugins - Test all plugins for required information")
|
||||
fmt.Println(" statup env - Show all environment variables being used for Statping")
|
||||
fmt.Println(" statup update - Attempts to update to the latest version")
|
||||
fmt.Println(" statup export - Exports your Statping settings to a 'statup-export.json' file.")
|
||||
fmt.Println(" statup import <file> - Imports settings from a previously saved JSON file.")
|
||||
fmt.Println(" statup help - Shows the user basic information about Statping")
|
||||
fmt.Println(" statping - Main command to run Statping server")
|
||||
fmt.Println(" statping version - Returns the current version of Statping")
|
||||
fmt.Println(" statping run - Check all services 1 time and then quit")
|
||||
fmt.Println(" statping assets - Dump all assets used locally to be edited.")
|
||||
fmt.Println(" statping static - Creates a static HTML file of the index page")
|
||||
fmt.Println(" statping sass - Compile .scss files into the css directory")
|
||||
fmt.Println(" statping test plugins - Test all plugins for required information")
|
||||
fmt.Println(" statping env - Show all environment variables being used for Statping")
|
||||
fmt.Println(" statping update - Attempts to update to the latest version")
|
||||
fmt.Println(" statping export - Exports your Statping settings to a 'statping-export.json' file.")
|
||||
fmt.Println(" statping import <file> - Imports settings from a previously saved JSON file.")
|
||||
fmt.Println(" statping help - Shows the user basic information about Statping")
|
||||
fmt.Printf("Flags:\n")
|
||||
fmt.Println(" -ip 127.0.0.1 - Run HTTP server on specific IP address (default: localhost)")
|
||||
fmt.Println(" -port 8080 - Run HTTP server on Port (default: 8080)")
|
||||
fmt.Printf("Environment Variables:\n")
|
||||
fmt.Println(" STATUP_DIR - Set a absolute path for the root path of Statping server (logs, assets, SQL db)")
|
||||
fmt.Println(" STATPING_DIR - Set a absolute path for the root path of Statping server (logs, assets, SQL db)")
|
||||
fmt.Println(" DB_CONN - Automatic Database connection (sqlite, postgres, mysql)")
|
||||
fmt.Println(" DB_HOST - Database hostname or IP address")
|
||||
fmt.Println(" DB_USER - Database username")
|
||||
|
@ -237,7 +237,7 @@ func HelpEcho() {
|
|||
|
||||
func checkGithubUpdates() (githubResponse, error) {
|
||||
var gitResp githubResponse
|
||||
url := "https://api.github.com/repos/hunterlong/statup/releases/latest"
|
||||
url := "https://api.github.com/repos/hunterlong/statping/releases/latest"
|
||||
contents, _, err := utils.HttpRequest(url, "GET", nil, nil, nil, time.Duration(10*time.Second))
|
||||
if err != nil {
|
||||
return githubResponse{}, err
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -133,11 +133,11 @@ func EnvToConfig() *DbConfig {
|
|||
}
|
||||
name := os.Getenv("NAME")
|
||||
if name == "" {
|
||||
name = "Statup"
|
||||
name = "Statping"
|
||||
}
|
||||
description := os.Getenv("DESCRIPTION")
|
||||
if description == "" {
|
||||
description = "Statup Monitoring Sample Data"
|
||||
description = "Statping Monitoring Sample Data"
|
||||
}
|
||||
|
||||
adminUser := os.Getenv("ADMIN_USER")
|
||||
|
@ -169,7 +169,7 @@ func EnvToConfig() *DbConfig {
|
|||
return data
|
||||
}
|
||||
|
||||
// SampleData runs all the sample data for a new Statup installation
|
||||
// SampleData runs all the sample data for a new Statping installation
|
||||
func SampleData() error {
|
||||
if err := InsertSampleData(); err != nil {
|
||||
return err
|
||||
|
|
10
core/core.go
10
core/core.go
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -37,7 +37,7 @@ type Core struct {
|
|||
var (
|
||||
Configs *DbConfig // Configs holds all of the config.yml and database info
|
||||
CoreApp *Core // CoreApp is a global variable that contains many elements
|
||||
SetupMode bool // SetupMode will be true if Statup does not have a database connection
|
||||
SetupMode bool // SetupMode will be true if Statping does not have a database connection
|
||||
VERSION string // VERSION is set on build automatically by setting a -ldflag
|
||||
)
|
||||
|
||||
|
@ -58,7 +58,7 @@ func (c *Core) ToCore() *types.Core {
|
|||
return c.Core
|
||||
}
|
||||
|
||||
// InitApp will initialize Statup
|
||||
// InitApp will initialize Statping
|
||||
func InitApp() {
|
||||
SelectCore()
|
||||
InsertNotifierDB()
|
||||
|
@ -68,7 +68,7 @@ func InitApp() {
|
|||
go DatabaseMaintence()
|
||||
}
|
||||
|
||||
// InsertNotifierDB inject the Statup database instance to the Notifier package
|
||||
// InsertNotifierDB inject the Statping database instance to the Notifier package
|
||||
func InsertNotifierDB() error {
|
||||
if DbSession == nil {
|
||||
err := Configs.Connect(false, utils.Directory)
|
||||
|
@ -141,7 +141,7 @@ func (c Core) AllOnline() bool {
|
|||
return true
|
||||
}
|
||||
|
||||
// SelectCore will return the CoreApp global variable and the settings/configs for Statup
|
||||
// SelectCore will return the CoreApp global variable and the settings/configs for Statping
|
||||
func SelectCore() (*Core, error) {
|
||||
if DbSession == nil {
|
||||
return nil, errors.New("database has not been initiated yet.")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -111,7 +111,7 @@ func TestReLoadDbConfig(t *testing.T) {
|
|||
func TestSelectCore(t *testing.T) {
|
||||
core, err := SelectCore()
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, "Statup Sample Data", core.Name)
|
||||
assert.Equal(t, "Statping Sample Data", core.Name)
|
||||
}
|
||||
|
||||
func TestInsertNotifierDB(t *testing.T) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -30,7 +30,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
// DbSession stores the Statup database session
|
||||
// DbSession stores the Statping database session
|
||||
DbSession *gorm.DB
|
||||
DbModels []interface{}
|
||||
)
|
||||
|
@ -215,7 +215,7 @@ func (c *CheckinHit) BeforeCreate() (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
// InsertCore create the single row for the Core settings in Statup
|
||||
// InsertCore create the single row for the Core settings in Statping
|
||||
func (db *DbConfig) InsertCore() (*Core, error) {
|
||||
CoreApp = &Core{Core: &types.Core{
|
||||
Name: db.Project,
|
||||
|
@ -336,7 +336,7 @@ func (db *DbConfig) Save() (*DbConfig, error) {
|
|||
return db, err
|
||||
}
|
||||
|
||||
// CreateCore will initialize the global variable 'CoreApp". This global variable contains most of Statup app.
|
||||
// CreateCore will initialize the global variable 'CoreApp". This global variable contains most of Statping app.
|
||||
func (c *DbConfig) CreateCore() *Core {
|
||||
newCore := &types.Core{
|
||||
Name: c.Project,
|
||||
|
@ -358,7 +358,7 @@ func (c *DbConfig) CreateCore() *Core {
|
|||
return CoreApp
|
||||
}
|
||||
|
||||
// DropDatabase will DROP each table Statup created
|
||||
// DropDatabase will DROP each table Statping created
|
||||
func (db *DbConfig) DropDatabase() error {
|
||||
utils.Log(1, "Dropping Database Tables...")
|
||||
err := DbSession.DropTableIfExists("checkins")
|
||||
|
@ -373,7 +373,7 @@ func (db *DbConfig) DropDatabase() error {
|
|||
return err.Error
|
||||
}
|
||||
|
||||
// CreateDatabase will CREATE TABLES for each of the Statup elements
|
||||
// CreateDatabase will CREATE TABLES for each of the Statping elements
|
||||
func (db *DbConfig) CreateDatabase() error {
|
||||
var err error
|
||||
utils.Log(1, "Creating Database Tables...")
|
||||
|
@ -385,7 +385,7 @@ func (db *DbConfig) CreateDatabase() error {
|
|||
if err := DbSession.Table("core").CreateTable(&types.Core{}); err.Error != nil {
|
||||
return err.Error
|
||||
}
|
||||
utils.Log(1, "Statup Database Created")
|
||||
utils.Log(1, "Statping Database Created")
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -408,9 +408,9 @@ func (db *DbConfig) MigrateDatabase() error {
|
|||
}
|
||||
if err := tx.Table("core").AutoMigrate(&types.Core{}); err.Error != nil {
|
||||
tx.Rollback()
|
||||
utils.Log(3, fmt.Sprintf("Statup Database could not be migrated: %v", tx.Error))
|
||||
utils.Log(3, fmt.Sprintf("Statping Database could not be migrated: %v", tx.Error))
|
||||
return tx.Error
|
||||
}
|
||||
utils.Log(1, "Statup Database Migrated")
|
||||
utils.Log(1, "Statping Database Migrated")
|
||||
return tx.Commit().Error
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Package core contains the main functionality of Statup. This includes everything for
|
||||
// Package core contains the main functionality of Statping. This includes everything for
|
||||
// Services, Hits, Failures, Users, service checking mechanisms, databases, and notifiers
|
||||
// in the notifier package
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Package notifier contains the main functionality for the Statup Notification system
|
||||
// Package notifier contains the main functionality for the Statping Notification system
|
||||
//
|
||||
// Example Notifier
|
||||
//
|
||||
|
@ -12,7 +12,7 @@
|
|||
// var example = &ExampleNotifier{&Notification{
|
||||
// Method: "example",
|
||||
// Title: "Example Notifier",
|
||||
// Description: "This is an example of a notifier for Statup!",
|
||||
// Description: "This is an example of a notifier for Statping!",
|
||||
// Author: "Hunter Long",
|
||||
// AuthorUrl: "https://github.com/hunterlong",
|
||||
// Delay: time.Duration(3 * time.Second),
|
||||
|
@ -63,7 +63,7 @@
|
|||
//
|
||||
// Load the Notifier
|
||||
//
|
||||
// Include the init() function with AddNotifier and your notification struct. This is ran on start of Statup
|
||||
// Include the init() function with AddNotifier and your notification struct. This is ran on start of Statping
|
||||
// and will automatically create a new row in the database so the end user can save their own values.
|
||||
//
|
||||
// func init() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -122,7 +122,7 @@ func OnUpdatedCore(c *types.Core) {
|
|||
}
|
||||
}
|
||||
|
||||
// OnStart is triggered when the Statup service has started
|
||||
// OnStart is triggered when the Statping service has started
|
||||
func OnStart(c *types.Core) {
|
||||
for _, comm := range AllCommunications {
|
||||
if isType(comm, new(CoreEvents)) && isEnabled(comm) && inLimits(comm) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -22,7 +22,7 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// ExampleNotifier is an example on how to use the Statup notifier struct
|
||||
// ExampleNotifier is an example on how to use the Statping notifier struct
|
||||
type ExampleNotifier struct {
|
||||
*Notification
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ var example = &ExampleNotifier{&Notification{
|
|||
}},
|
||||
}}
|
||||
|
||||
// init will be ran when Statup is loaded, AddNotifier will add the notifier instance to the system
|
||||
// init will be ran when Statping is loaded, AddNotifier will add the notifier instance to the system
|
||||
func init() {
|
||||
AddNotifier(example)
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ func (n *ExampleNotifier) OnUpdatedCore(s *types.Core) {
|
|||
|
||||
// OnStart is triggered when statup has been started
|
||||
func (n *ExampleNotifier) OnStart(s *types.Core) {
|
||||
msg := fmt.Sprintf("received a trigger on Statup boot: %v\n", s.Name)
|
||||
msg := fmt.Sprintf("received a trigger on Statping boot: %v\n", s.Name)
|
||||
n.AddQueue(0, msg)
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,7 @@ func ExampleNotification() {
|
|||
}},
|
||||
}}
|
||||
|
||||
// AddNotifier accepts a Notifier to load into the Statup Notification system
|
||||
// AddNotifier accepts a Notifier to load into the Statping Notification system
|
||||
err := AddNotifier(example)
|
||||
fmt.Println(err)
|
||||
// Output: <nil>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -30,12 +30,12 @@ import (
|
|||
var (
|
||||
// AllCommunications holds all the loaded notifiers
|
||||
AllCommunications []types.AllNotifiers
|
||||
// db holds the Statup database connection
|
||||
// db holds the Statping database connection
|
||||
db *gorm.DB
|
||||
timezone float32
|
||||
)
|
||||
|
||||
// Notification contains all the fields for a Statup Notifier.
|
||||
// Notification contains all the fields for a Statping Notifier.
|
||||
type Notification struct {
|
||||
Id int64 `gorm:"primary_key;column:id" json:"id"`
|
||||
Method string `gorm:"column:method" json:"method"`
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -113,7 +113,7 @@ func TestAddQueue(t *testing.T) {
|
|||
func TestNotification_Update(t *testing.T) {
|
||||
notifier, err := SelectNotification(example)
|
||||
assert.Nil(t, err)
|
||||
notifier.Host = "http://demo.statup.io/api"
|
||||
notifier.Host = "http://demo.statping.com/api"
|
||||
notifier.Port = 9090
|
||||
notifier.Username = "admin"
|
||||
notifier.Password = "password123"
|
||||
|
@ -127,9 +127,9 @@ func TestNotification_Update(t *testing.T) {
|
|||
|
||||
selected, err := SelectNotification(example)
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, "http://demo.statup.io/api", selected.GetValue("host"))
|
||||
assert.Equal(t, "http://demo.statup.io/api", example.Notification.Host)
|
||||
assert.Equal(t, "http://demo.statup.io/api", example.Host)
|
||||
assert.Equal(t, "http://demo.statping.com/api", selected.GetValue("host"))
|
||||
assert.Equal(t, "http://demo.statping.com/api", example.Notification.Host)
|
||||
assert.Equal(t, "http://demo.statping.com/api", example.Host)
|
||||
assert.Equal(t, "USBdu82HDiiuw9327yGYDGw", selected.GetValue("api_key"))
|
||||
assert.Equal(t, "USBdu82HDiiuw9327yGYDGw", example.ApiKey)
|
||||
assert.False(t, selected.Enabled.Bool)
|
||||
|
@ -171,7 +171,7 @@ func TestNotification_GetValue(t *testing.T) {
|
|||
notifier, err := SelectNotification(example)
|
||||
assert.Nil(t, err)
|
||||
val := notifier.GetValue("Host")
|
||||
assert.Equal(t, "http://demo.statup.io/api", val)
|
||||
assert.Equal(t, "http://demo.statping.com/api", val)
|
||||
}
|
||||
|
||||
func TestOnSave(t *testing.T) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -23,7 +23,7 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// InsertSampleData will create the example/dummy services for a brand new Statup installation
|
||||
// InsertSampleData will create the example/dummy services for a brand new Statping installation
|
||||
func InsertSampleData() error {
|
||||
utils.Log(1, "Inserting Sample Data...")
|
||||
s1 := ReturnService(&types.Service{
|
||||
|
@ -37,7 +37,7 @@ func InsertSampleData() error {
|
|||
Order: 1,
|
||||
})
|
||||
s2 := ReturnService(&types.Service{
|
||||
Name: "Statup Github",
|
||||
Name: "Statping Github",
|
||||
Domain: "https://github.com/hunterlong/statping",
|
||||
ExpectedStatus: 200,
|
||||
Interval: 30,
|
||||
|
@ -150,7 +150,7 @@ func InsertSampleHits() error {
|
|||
// insertSampleCore will create a new Core for the seed
|
||||
func insertSampleCore() error {
|
||||
core := &types.Core{
|
||||
Name: "Statup Sample Data",
|
||||
Name: "Statping Sample Data",
|
||||
Description: "This data is only used to testing",
|
||||
ApiKey: "sample",
|
||||
ApiSecret: "samplesecret",
|
||||
|
@ -208,7 +208,7 @@ func insertMessages() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// InsertLargeSampleData will create the example/dummy services for testing the Statup server
|
||||
// InsertLargeSampleData will create the example/dummy services for testing the Statping server
|
||||
func InsertLargeSampleData() error {
|
||||
if err := insertSampleCore(); err != nil {
|
||||
return err
|
||||
|
@ -238,7 +238,7 @@ func InsertLargeSampleData() error {
|
|||
|
||||
s7 := ReturnService(&types.Service{
|
||||
Name: "Demo Page",
|
||||
Domain: "https://demo.statup.io",
|
||||
Domain: "https://demo.statping.com",
|
||||
ExpectedStatus: 200,
|
||||
Interval: 30,
|
||||
Type: "http",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -65,7 +65,7 @@ func TestUpdateService(t *testing.T) {
|
|||
service := SelectService(1)
|
||||
service2 := SelectService(2)
|
||||
assert.Equal(t, "Google", service.Name)
|
||||
assert.Equal(t, "Statup Github", service2.Name)
|
||||
assert.Equal(t, "Statping Github", service2.Name)
|
||||
assert.True(t, service.Online)
|
||||
assert.True(t, service2.Online)
|
||||
service.Name = "Updated Google"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,4 +3,4 @@ MAINTAINER "Hunter Long (https://github.com/hunterlong)"
|
|||
RUN apk --no-cache add libstdc++ ca-certificates
|
||||
WORKDIR /app
|
||||
ADD sass /usr/local/bin/
|
||||
ADD ./build/alpine-linux-amd64 /usr/local/bin/statup
|
||||
ADD ./build/alpine-linux-amd64 /usr/local/bin/statping
|
|
@ -1,15 +1,15 @@
|
|||
FROM cypress/browsers:chrome67
|
||||
MAINTAINER "Hunter Long (https://github.com/hunterlong)"
|
||||
# Statup 'test' image for running a full test using the production environment
|
||||
# Statping 'test' image for running a full test using the production environment
|
||||
|
||||
WORKDIR $HOME/statup
|
||||
WORKDIR $HOME/statping
|
||||
ADD dev/test .
|
||||
|
||||
RUN npm install node-sass
|
||||
ENV SASS=node-sass
|
||||
RUN npm install
|
||||
|
||||
ADD ./statup-linux-amd64 /usr/local/bin/statup
|
||||
RUN statup version
|
||||
ADD ./statping-linux-amd64 /usr/local/bin/statping
|
||||
RUN statping version
|
||||
|
||||
RUN npm run test-docker
|
|
@ -1,7 +1,7 @@
|
|||
ARG VERSION
|
||||
FROM golang:1.11-alpine
|
||||
MAINTAINER "Hunter Long (https://github.com/hunterlong)"
|
||||
# Statup 'test' image for running a full test using the production environment
|
||||
# Statping 'test' image for running a full test using the production environment
|
||||
|
||||
ENV DEP_VERSION=v0.5.0
|
||||
RUN apk add --no-cache libstdc++ gcc g++ make git ca-certificates linux-headers wget curl jq
|
||||
|
@ -9,7 +9,7 @@ RUN apk add --no-cache libstdc++ gcc g++ make git ca-certificates linux-headers
|
|||
RUN curl -L -s https://github.com/golang/dep/releases/download/$DEP_VERSION/dep-linux-amd64 -o /go/bin/dep && \
|
||||
chmod +x /go/bin/dep
|
||||
|
||||
RUN curl -L -s https://assets.statup.io/sass -o /usr/local/bin/sass && \
|
||||
RUN curl -L -s https://assets.statping.io/sass -o /usr/local/bin/sass && \
|
||||
chmod +x /usr/local/bin/sass
|
||||
|
||||
WORKDIR /go/src/github.com/hunterlong/statping
|
||||
|
@ -28,4 +28,4 @@ EXPOSE 8080
|
|||
|
||||
HEALTHCHECK --interval=5s --timeout=5s --retries=5 CMD curl -s "http://localhost:8080/health" | jq -r -e ".online==true"
|
||||
|
||||
ENTRYPOINT statup
|
||||
ENTRYPOINT statping
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* [Subdirectories](#pkg-subdirectories)
|
||||
|
||||
## <a name="pkg-overview">Overview</a>
|
||||
Package core contains the main functionality of Statup. This includes everything for
|
||||
Package core contains the main functionality of Statping. This includes everything for
|
||||
Services, Hits, Failures, Users, service checking mechanisms, databases, and notifiers
|
||||
in the notifier package
|
||||
|
||||
|
@ -167,13 +167,13 @@ More info on: <a href="https://github.com/hunterlong/statping">https://github.co
|
|||
var (
|
||||
Configs *DbConfig // Configs holds all of the config.yml and database info
|
||||
CoreApp *Core // CoreApp is a global variable that contains many elements
|
||||
SetupMode bool // SetupMode will be true if Statup does not have a database connection
|
||||
SetupMode bool // SetupMode will be true if Statping does not have a database connection
|
||||
VERSION string // VERSION is set on build automatically by setting a -ldflag
|
||||
)
|
||||
```
|
||||
``` go
|
||||
var (
|
||||
// DbSession stores the Statup database session
|
||||
// DbSession stores the Statping database session
|
||||
DbSession *gorm.DB
|
||||
)
|
||||
```
|
||||
|
@ -273,7 +273,7 @@ ExportIndexHTML returns the HTML of the index page as a string
|
|||
``` go
|
||||
func InitApp()
|
||||
```
|
||||
InitApp will initialize Statup
|
||||
InitApp will initialize Statping
|
||||
|
||||
|
||||
|
||||
|
@ -281,7 +281,7 @@ InitApp will initialize Statup
|
|||
``` go
|
||||
func InsertLargeSampleData() error
|
||||
```
|
||||
InsertLargeSampleData will create the example/dummy services for testing the Statup server
|
||||
InsertLargeSampleData will create the example/dummy services for testing the Statping server
|
||||
|
||||
|
||||
|
||||
|
@ -289,7 +289,7 @@ InsertLargeSampleData will create the example/dummy services for testing the Sta
|
|||
``` go
|
||||
func InsertNotifierDB() error
|
||||
```
|
||||
InsertNotifierDB inject the Statup database instance to the Notifier package
|
||||
InsertNotifierDB inject the Statping database instance to the Notifier package
|
||||
|
||||
|
||||
|
||||
|
@ -297,7 +297,7 @@ InsertNotifierDB inject the Statup database instance to the Notifier package
|
|||
``` go
|
||||
func InsertSampleData() error
|
||||
```
|
||||
InsertSampleData will create the example/dummy services for a brand new Statup installation
|
||||
InsertSampleData will create the example/dummy services for a brand new Statping installation
|
||||
|
||||
|
||||
|
||||
|
@ -329,7 +329,7 @@ ReturnUser returns *core.user based off a *types.user
|
|||
``` go
|
||||
func SampleData() error
|
||||
```
|
||||
SampleData runs all the sample data for a new Statup installation
|
||||
SampleData runs all the sample data for a new Statping installation
|
||||
|
||||
|
||||
|
||||
|
@ -571,7 +571,7 @@ NewCore return a new *core.Core struct
|
|||
``` go
|
||||
func SelectCore() (*Core, error)
|
||||
```
|
||||
SelectCore will return the CoreApp global variable and the settings/configs for Statup
|
||||
SelectCore will return the CoreApp global variable and the settings/configs for Statping
|
||||
|
||||
|
||||
### <a name="UpdateCore">func</a> [UpdateCore](https://github.com/hunterlong/statping/tree/master/core/core.go?s=2246:2285#L82)
|
||||
|
@ -741,7 +741,7 @@ ToString will convert the DateScanObj into a JSON string for the charts to rende
|
|||
``` go
|
||||
type DbConfig types.DbConfig
|
||||
```
|
||||
DbConfig stores the config.yml file for the statup configuration
|
||||
DbConfig stores the config.yml file for the statping configuration
|
||||
|
||||
|
||||
|
||||
|
@ -795,7 +795,7 @@ Connect will attempt to connect to the sqlite, postgres, or mysql database
|
|||
``` go
|
||||
func (c *DbConfig) CreateCore() *Core
|
||||
```
|
||||
CreateCore will initialize the global variable 'CoreApp". This global variable contains most of Statup app.
|
||||
CreateCore will initialize the global variable 'CoreApp". This global variable contains most of Statping app.
|
||||
|
||||
|
||||
|
||||
|
@ -804,7 +804,7 @@ CreateCore will initialize the global variable 'CoreApp". This global variable c
|
|||
``` go
|
||||
func (db *DbConfig) CreateDatabase() error
|
||||
```
|
||||
CreateDatabase will CREATE TABLES for each of the Statup elements
|
||||
CreateDatabase will CREATE TABLES for each of the Statping elements
|
||||
|
||||
|
||||
|
||||
|
@ -813,7 +813,7 @@ CreateDatabase will CREATE TABLES for each of the Statup elements
|
|||
``` go
|
||||
func (db *DbConfig) DropDatabase() error
|
||||
```
|
||||
DropDatabase will DROP each table Statup created
|
||||
DropDatabase will DROP each table Statping created
|
||||
|
||||
|
||||
|
||||
|
@ -822,7 +822,7 @@ DropDatabase will DROP each table Statup created
|
|||
``` go
|
||||
func (db *DbConfig) InsertCore() (*Core, error)
|
||||
```
|
||||
InsertCore create the single row for the Core settings in Statup
|
||||
InsertCore create the single row for the Core settings in Statping
|
||||
|
||||
|
||||
|
||||
|
@ -1478,7 +1478,7 @@ More info on: <a href="https://github.com/hunterlong/statping">https://github.co
|
|||
``` go
|
||||
func DesktopInit(ip string, port int)
|
||||
```
|
||||
DesktopInit will run the Statup server on a specific IP and port using SQLite database
|
||||
DesktopInit will run the Statping server on a specific IP and port using SQLite database
|
||||
|
||||
|
||||
|
||||
|
@ -1495,7 +1495,7 @@ to bypass the admin authenticate to the dashboard features.
|
|||
``` go
|
||||
func Router() *mux.Router
|
||||
```
|
||||
Router returns all of the routes used in Statup
|
||||
Router returns all of the routes used in Statping
|
||||
|
||||
|
||||
|
||||
|
@ -1638,9 +1638,9 @@ Set a cached content by key
|
|||
* [Index](#pkg-index)
|
||||
|
||||
## <a name="pkg-overview">Overview</a>
|
||||
Package notifiers holds all the notifiers for Statup, which also includes
|
||||
Package notifiers holds all the notifiers for Statping, which also includes
|
||||
user created notifiers that have been accepted in a Push Request. Read the wiki
|
||||
to see a full example of a notifier with all events, visit Statup's
|
||||
to see a full example of a notifier with all events, visit Statping's
|
||||
notifier example code: <a href="https://github.com/hunterlong/statping/wiki/Notifier-Example">https://github.com/hunterlong/statping/wiki/Notifier-Example</a>
|
||||
|
||||
This package shouldn't contain any exports, to see how notifiers work
|
||||
|
@ -1674,7 +1674,7 @@ and learn how to create your own custom notifier.
|
|||
* [Index](#pkg-index)
|
||||
|
||||
## <a name="pkg-overview">Overview</a>
|
||||
Package plugin contains the interfaces to build your own Golang Plugin that will receive triggers on Statup events.
|
||||
Package plugin contains the interfaces to build your own Golang Plugin that will receive triggers on Statping events.
|
||||
|
||||
|
||||
|
||||
|
@ -1726,7 +1726,7 @@ func LoadPlugins()
|
|||
* [Subdirectories](#pkg-subdirectories)
|
||||
|
||||
## <a name="pkg-overview">Overview</a>
|
||||
Package source holds all the assets for Statup. This includes
|
||||
Package source holds all the assets for Statping. This includes
|
||||
CSS, JS, SCSS, HTML and other website related content.
|
||||
This package uses Rice to compile all assets into a single 'rice-box.go' file.
|
||||
|
||||
|
@ -1898,7 +1898,7 @@ UsingAssets returns true if the '/assets' folder is found in the directory
|
|||
* [Index](#pkg-index)
|
||||
|
||||
## <a name="pkg-overview">Overview</a>
|
||||
Package types contains all of the structs for objects in Statup including services, hits, failures, Core, and others.
|
||||
Package types contains all of the structs for objects in Statping including services, hits, failures, Core, and others.
|
||||
|
||||
More info on: <a href="https://github.com/hunterlong/statping">https://github.com/hunterlong/statping</a>
|
||||
|
||||
|
@ -2111,7 +2111,7 @@ type Core struct {
|
|||
}
|
||||
|
||||
```
|
||||
Core struct contains all the required fields for Statup. All application settings
|
||||
Core struct contains all the required fields for Statping. All application settings
|
||||
will be saved into 1 row in the 'core' table. You can use the core.CoreApp
|
||||
global variable to interact with the attributes to the application, such as services.
|
||||
|
||||
|
@ -2127,7 +2127,7 @@ global variable to interact with the attributes to the application, such as serv
|
|||
## <a name="Databaser">type</a> [Databaser](https://github.com/hunterlong/statping/tree/master/types/plugin.go?s=806:860#L55)
|
||||
``` go
|
||||
type Databaser interface {
|
||||
StatupDatabase(*gorm.DB)
|
||||
StatpingDatabase(*gorm.DB)
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -2774,13 +2774,13 @@ UserInterface interfaces the database functions
|
|||
* [Examples](#pkg-examples)
|
||||
|
||||
## <a name="pkg-overview">Overview</a>
|
||||
Package utils contains common methods used in most packages in Statup.
|
||||
Package utils contains common methods used in most packages in Statping.
|
||||
This package contains multiple function like:
|
||||
Logging, encryption, type conversions, setting utils.Directory as the current directory,
|
||||
running local CMD commands, and creating/deleting files/folder.
|
||||
|
||||
You can overwrite the utils.Directory global variable by including
|
||||
STATUP_DIR environment variable to be an absolute path.
|
||||
STATPING_DIR environment variable to be an absolute path.
|
||||
|
||||
More info on: <a href="https://github.com/hunterlong/statping">https://github.com/hunterlong/statping</a>
|
||||
|
||||
|
@ -2841,7 +2841,7 @@ var (
|
|||
```
|
||||
``` go
|
||||
var (
|
||||
// Directory returns the current path or the STATUP_DIR environment variable
|
||||
// Directory returns the current path or the STATPING_DIR environment variable
|
||||
Directory string
|
||||
)
|
||||
```
|
||||
|
@ -2946,7 +2946,7 @@ Http returns a log for a HTTP request
|
|||
``` go
|
||||
func InitLogs() error
|
||||
```
|
||||
InitLogs will create the '/logs' directory and creates a file '/logs/statup.log' for application logging
|
||||
InitLogs will create the '/logs' directory and creates a file '/logs/statping.log' for application logging
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@ version: '2.3'
|
|||
|
||||
services:
|
||||
|
||||
statup:
|
||||
container_name: statup
|
||||
image: hunterlong/statup:latest
|
||||
statping:
|
||||
container_name: statping
|
||||
image: hunterlong/statping:latest
|
||||
restart: always
|
||||
networks:
|
||||
- internet
|
||||
|
@ -12,7 +12,7 @@ services:
|
|||
depends_on:
|
||||
- postgres
|
||||
volumes:
|
||||
- ./statup:/app
|
||||
- ./statping:/app
|
||||
environment:
|
||||
VIRTUAL_HOST: localhost
|
||||
VIRTUAL_PORT: 8080
|
||||
|
@ -20,11 +20,11 @@ services:
|
|||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
|
||||
DB_CONN: postgres
|
||||
DB_HOST: postgres
|
||||
DB_USER: statup
|
||||
DB_USER: statping
|
||||
DB_PASS: password123
|
||||
DB_DATABASE: statup
|
||||
DB_DATABASE: statping
|
||||
NAME: EC2 Example
|
||||
DESCRIPTION: This is a Statup Docker Compose instance
|
||||
DESCRIPTION: This is a Statping Docker Compose instance
|
||||
|
||||
nginx:
|
||||
container_name: nginx
|
||||
|
@ -56,8 +56,8 @@ services:
|
|||
- ./postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_PASSWORD: password123
|
||||
POSTGRES_USER: statup
|
||||
POSTGRES_DB: statup
|
||||
POSTGRES_USER: statping
|
||||
POSTGRES_DB: statping
|
||||
|
||||
letsencrypt:
|
||||
container_name: letsencrypt
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
statup:
|
||||
container_name: statup
|
||||
image: hunterlong/statup
|
||||
statping:
|
||||
container_name: statping
|
||||
image: hunterlong/statping
|
||||
restart: always
|
||||
ports:
|
||||
- 8080:8080
|
||||
|
|
|
@ -10,7 +10,7 @@ type PluginObj types.PluginInfo
|
|||
var Plugin = PluginObj{
|
||||
Info: &types.Info{
|
||||
Name: "Example Plugin",
|
||||
Description: "This is an example plugin for Statup Status Page application. It can be implemented pretty quick!",
|
||||
Description: "This is an example plugin for Statping Status Page application. It can be implemented pretty quick!",
|
||||
},
|
||||
Routes: []*types.PluginRoute{{
|
||||
Url: "/setuper",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "0ff1dcd6-54f3-44a7-9c18-cc3c8e7df357",
|
||||
"name": "Local Statup",
|
||||
"name": "Local Statping",
|
||||
"values": [
|
||||
{
|
||||
"key": "endpoint",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Statup
|
||||
* Statping
|
||||
* Copyright (C) 2018. Hunter Long and the project contributors
|
||||
* Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
*
|
||||
|
@ -17,7 +17,7 @@
|
|||
|
||||
context('Setup Process', () => {
|
||||
|
||||
// it('should go to setup Statup with Postgres', () => {
|
||||
// it('should go to setup Statping with Postgres', () => {
|
||||
// cy.visit('http://localhost:8080')
|
||||
// cy.get('select[name=db_connection]').select('postgres')
|
||||
// cy.get('input[name="db_host"]').clear().type(Cypress.env('DB_HOST'))
|
||||
|
@ -44,7 +44,7 @@ context('Setup Process', () => {
|
|||
// cy.get('.card').should('have.length', 5)
|
||||
// })
|
||||
|
||||
it('should go to setup Statup with SQLite', () => {
|
||||
it('should go to setup Statping with SQLite', () => {
|
||||
cy.visit('http://localhost:8080')
|
||||
cy.get('select[name=db_connection]').select('sqlite')
|
||||
cy.get('input[name="project"]').clear().type('Demo Tester')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Statup
|
||||
* Statping
|
||||
* Copyright (C) 2018. Hunter Long and the project contributors
|
||||
* Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Statup
|
||||
* Statping
|
||||
* Copyright (C) 2018. Hunter Long and the project contributors
|
||||
* Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
*
|
||||
|
@ -34,8 +34,8 @@ context('Dashboard Tests', () => {
|
|||
it('should view help', () => {
|
||||
cy.visit('http://localhost:8080/settings')
|
||||
cy.get(':nth-child(6) > .nav-link').click()
|
||||
cy.title().should('eq', 'Statup | Help')
|
||||
cy.get('.col-12 > :nth-child(1)').should('contain', 'Statup')
|
||||
cy.title().should('eq', 'Statping | Help')
|
||||
cy.get('.col-12 > :nth-child(1)').should('contain', 'Statping')
|
||||
})
|
||||
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Statup
|
||||
* Statping
|
||||
* Copyright (C) 2018. Hunter Long and the project contributors
|
||||
* Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
*
|
||||
|
@ -27,7 +27,7 @@ context('Service Tests', () => {
|
|||
it('should view services', () => {
|
||||
cy.visit('http://localhost:8080/services')
|
||||
cy.get('tr').should('have.length', 6)
|
||||
cy.title().should('eq', 'Statup | Services')
|
||||
cy.title().should('eq', 'Statping | Services')
|
||||
})
|
||||
|
||||
it('should create HTTP GET service', () => {
|
||||
|
@ -40,7 +40,7 @@ context('Service Tests', () => {
|
|||
cy.get('input[name="interval"]').clear().type('25')
|
||||
cy.get('input[name="timeout"]').clear().type('30')
|
||||
cy.get('form').submit()
|
||||
cy.title().should('eq', 'Statup | Services')
|
||||
cy.title().should('eq', 'Statping | Services')
|
||||
cy.get('tr').should('have.length', 7)
|
||||
})
|
||||
|
||||
|
@ -50,12 +50,12 @@ context('Service Tests', () => {
|
|||
cy.get('input[name="name"]').clear().type('JSON Regex Test')
|
||||
cy.get('select[name="check_type"]').select('http')
|
||||
cy.get('input[name="domain"]').clear().type('https://jsonplaceholder.typicode.com/posts')
|
||||
cy.get('textarea[name="post_data"]').clear().type(`(title)": "((\\"|[statup])*)"`)
|
||||
cy.get('textarea[name="post_data"]').clear().type(`(title)": "((\\"|[statping])*)"`)
|
||||
cy.get('input[name="expected_status"]').clear().type('201')
|
||||
cy.get('input[name="interval"]').clear().type('15')
|
||||
cy.get('input[name="timeout"]').clear().type('45')
|
||||
cy.get('form').submit()
|
||||
cy.title().should('eq', 'Statup | Services')
|
||||
cy.title().should('eq', 'Statping | Services')
|
||||
cy.get('tr').should('have.length', 8)
|
||||
})
|
||||
|
||||
|
@ -68,38 +68,38 @@ context('Service Tests', () => {
|
|||
cy.get('input[name="interval"]').clear().type('25')
|
||||
cy.get('input[name="timeout"]').clear().type('15')
|
||||
cy.get('form').submit()
|
||||
cy.title().should('eq', 'Statup | Services')
|
||||
cy.title().should('eq', 'Statping | Services')
|
||||
cy.get('tr').should('have.length', 9)
|
||||
})
|
||||
|
||||
it('should view HTTP GET service', () => {
|
||||
cy.visit('http://localhost:8080/service/6')
|
||||
cy.title().should('eq', 'Statup | Google.com Service')
|
||||
cy.title().should('eq', 'Statping | Google.com Service')
|
||||
})
|
||||
|
||||
it('should view HTTP POST service', () => {
|
||||
cy.visit('http://localhost:8080/service/7')
|
||||
cy.title().should('eq', 'Statup | JSON Regex Test Service')
|
||||
cy.title().should('eq', 'Statping | JSON Regex Test Service')
|
||||
})
|
||||
|
||||
it('should view TCP service', () => {
|
||||
cy.visit('http://localhost:8080/service/8')
|
||||
cy.title().should('eq', 'Statup | Google DNS Service')
|
||||
cy.title().should('eq', 'Statping | Google DNS Service')
|
||||
})
|
||||
|
||||
it('should update HTTP service', () => {
|
||||
cy.visit('http://localhost:8080/service/6')
|
||||
cy.title().should('eq', 'Statup | Google.com Service')
|
||||
cy.title().should('eq', 'Statping | Google.com Service')
|
||||
cy.get('#service_name').clear().type('Google Updated')
|
||||
cy.get('#service_interval').clear().type('60')
|
||||
cy.get(':nth-child(3) > form').submit()
|
||||
cy.title().should('eq', 'Statup | Google Updated Service')
|
||||
cy.title().should('eq', 'Statping | Google Updated Service')
|
||||
cy.get('#service_name').should('have.value', 'Google Updated')
|
||||
});
|
||||
|
||||
it('should check the updated service', () => {
|
||||
cy.visit('http://localhost:8080/service/6')
|
||||
cy.title().should('eq', 'Statup | Google Updated Service')
|
||||
cy.title().should('eq', 'Statping | Google Updated Service')
|
||||
cy.get('#service_name').should('have.value', 'Google Updated')
|
||||
cy.get('#service_interval').should('have.value', '60')
|
||||
})
|
||||
|
@ -107,7 +107,7 @@ context('Service Tests', () => {
|
|||
it('should delete a service', () => {
|
||||
cy.visit('http://localhost:8080/services')
|
||||
cy.get(':nth-child(5) > .text-right > .btn-group > .btn-danger').click()
|
||||
cy.title().should('eq', 'Statup | Services')
|
||||
cy.title().should('eq', 'Statping | Services')
|
||||
cy.get('tr').should('have.length', 8)
|
||||
})
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Statup
|
||||
* Statping
|
||||
* Copyright (C) 2018. Hunter Long and the project contributors
|
||||
* Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
*
|
||||
|
@ -31,7 +31,7 @@ context('Settings Forms', () => {
|
|||
cy.get('input[name="domain"]').clear().type('http://0.0.0.0:8080')
|
||||
cy.get('textarea[name="footer"]').clear().type('This is a custom footer')
|
||||
cy.get('#v-pills-home > form').submit()
|
||||
cy.title().should('eq', 'Statup | Settings')
|
||||
cy.title().should('eq', 'Statping | Settings')
|
||||
cy.get('input[name="project"]').should('have.value', 'Project Updated')
|
||||
cy.get('input[name="description"]').should('have.value', 'This is an awesome page')
|
||||
cy.get('input[name="domain"]').should('have.value', 'http://0.0.0.0:8080')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Statup
|
||||
* Statping
|
||||
* Copyright (C) 2018. Hunter Long and the project contributors
|
||||
* Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
*
|
||||
|
@ -27,7 +27,7 @@ context('User Testing', () => {
|
|||
it('should view users', () => {
|
||||
cy.visit('http://localhost:8080/users')
|
||||
cy.get('tr').should('have.length', 2)
|
||||
cy.title().should('eq', 'Statup | Users')
|
||||
cy.title().should('eq', 'Statping | Users')
|
||||
})
|
||||
|
||||
it('should create a new user', () => {
|
||||
|
@ -50,7 +50,7 @@ context('User Testing', () => {
|
|||
|
||||
// it('should logout and login with new password', () => {
|
||||
// cy.visit('http://localhost:8080/logout')
|
||||
// cy.title().should('eq', 'Statup | Users')
|
||||
// cy.title().should('eq', 'Statping | Users')
|
||||
// cy.get('#user_2 > .btn-group > .btn-danger').click()
|
||||
// cy.get('tr').should('have.length', 2)
|
||||
// cy.visit('http://localhost:8080/login')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Statup
|
||||
* Statping
|
||||
* Copyright (C) 2018. Hunter Long and the project contributors
|
||||
* Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Statup
|
||||
* Statping
|
||||
* Copyright (C) 2018. Hunter Long and the project contributors
|
||||
* Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Statup
|
||||
* Statping
|
||||
* Copyright (C) 2018. Hunter Long and the project contributors
|
||||
* Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "statup-testing",
|
||||
"name": "statping-testing",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "statup-testing",
|
||||
"name": "statping-testing",
|
||||
"version": "1.0.0",
|
||||
"description": "Statup Application Testing using Cypress!",
|
||||
"description": "Statping Application Testing using Cypress!",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"cypress": "^3.1.0"
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
RELEASE_MASTER='{ "request": { "branch": "master", "config": { "script": "make docker-run-test", "services": ["docker"], "before_script": [], "after_deploy": [], "after_success": ["make publish-homebrew", "make publish-latest"], "deploy": [], "before_deploy": [], "env": { "VERSION": "$(VERSION)" } } } }'
|
||||
|
||||
curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Travis-API-Version: 3" -H "Authorization: token $(TRAVIS_API)" -d $(RELEASE_MASTER) https://api.travis-ci.com/repo/hunterlong%2Fstatup/requests
|
||||
curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Travis-API-Version: 3" -H "Authorization: token $(TRAVIS_API)" -d $(RELEASE_MASTER) https://api.travis-ci.com/repo/hunterlong%2Fstatping/requests
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
statup > /dev/null &
|
||||
statping > /dev/null &
|
||||
|
||||
./node_modules/.bin/start-server-and-test start http://localhost:8080/robots.txt cy:run
|
|
@ -3,11 +3,11 @@
|
|||
DIR=`pwd`
|
||||
DOCKER=`which docker`
|
||||
|
||||
$DOCKER build -t hunterlong/statup:dev -f ../Dockerfile ../../
|
||||
$DOCKER run -it -d -p 8080:8080 -v $DIR/app:/app --name statup_dev hunterlong/statup:dev
|
||||
$DOCKER build -t hunterlong/statping:dev -f ../Dockerfile ../../
|
||||
$DOCKER run -it -d -p 8080:8080 -v $DIR/app:/app --name statping_dev hunterlong/statping:dev
|
||||
|
||||
./node_modules/.bin/start-server-and-test start http://localhost:8080/robots.txt cy:run
|
||||
|
||||
$DOCKER stop statup_dev || true && $DOCKER rm -f statup_dev || true
|
||||
$DOCKER stop statping_dev || true && $DOCKER rm -f statping_dev || true
|
||||
|
||||
sudo rm -rf $DIR/app
|
20
doc.go
20
doc.go
|
@ -1,24 +1,24 @@
|
|||
// Package statup is a server monitoring application that includs a status page server. Visit the Statup repo at
|
||||
// Package statping is a server monitoring application that includs a status page server. Visit the Statping repo at
|
||||
// https://github.com/hunterlong/statping to get a full understanding of what this application can do.
|
||||
//
|
||||
// Install Statup
|
||||
// Install Statping
|
||||
//
|
||||
// Statup is available for Mac, Linux and Windows 64x. You can download the tar.gz file or use a couple other methods. Download
|
||||
// Statping is available for Mac, Linux and Windows 64x. You can download the tar.gz file or use a couple other methods. Download
|
||||
// the latest release at https://github.com/hunterlong/statping/releases/latest or view below. If you're on windows, download
|
||||
// the zip file from the latest releases link.
|
||||
//
|
||||
// // MacOS using homebrew
|
||||
// brew tap hunterlong/statup
|
||||
// brew install statup
|
||||
// brew tap hunterlong/statping
|
||||
// brew install statping
|
||||
//
|
||||
// // Linux installation
|
||||
// bash <(curl -s https://assets.statup.io/install.sh)
|
||||
// statup version
|
||||
// bash <(curl -s https://assets.statping.com/install.sh)
|
||||
// statping version
|
||||
//
|
||||
// Docker
|
||||
//
|
||||
// Statup can be built in many way, the best way is to use Docker!
|
||||
// docker run -it -p 8080:8080 hunterlong/statup
|
||||
// Statping can be built in many way, the best way is to use Docker!
|
||||
// docker run -it -p 8080:8080 hunterlong/statping
|
||||
//
|
||||
// Enjoy Statup and tell me any issues you might be having on Github. https://github.com/hunterlong
|
||||
// Enjoy Statping and tell me any issues you might be having on Github. https://github.com/hunterlong
|
||||
package statping
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -32,7 +32,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
cookieKey = "statup_auth"
|
||||
cookieKey = "statping_auth"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -43,7 +43,7 @@ var (
|
|||
// RunHTTPServer will start a HTTP server on a specific IP and port
|
||||
func RunHTTPServer(ip string, port int) error {
|
||||
host := fmt.Sprintf("%v:%v", ip, port)
|
||||
utils.Log(1, "Statup HTTP Server running on http://"+host)
|
||||
utils.Log(1, "Statping HTTP Server running on http://"+host)
|
||||
//for _, p := range core.CoreApp.AllPlugins {
|
||||
// info := p.GetInfo()
|
||||
// for _, route := range p.Routes() {
|
||||
|
@ -128,7 +128,7 @@ var handlerFuncs = func(w http.ResponseWriter, r *http.Request) template.FuncMap
|
|||
return core.CoreApp.UseCdn.Bool
|
||||
},
|
||||
"QrAuth": func() string {
|
||||
return fmt.Sprintf("statup://setup?domain=%v&api=%v", core.CoreApp.Domain, core.CoreApp.ApiSecret)
|
||||
return fmt.Sprintf("statping://setup?domain=%v&api=%v", core.CoreApp.Domain, core.CoreApp.ApiSecret)
|
||||
},
|
||||
"Type": func(g interface{}) []string {
|
||||
fooType := reflect.TypeOf(g)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -47,7 +47,7 @@ func TestSetupHandler(t *testing.T) {
|
|||
Router().ServeHTTP(rr, req)
|
||||
body := rr.Body.String()
|
||||
assert.Equal(t, 200, rr.Code)
|
||||
assert.Contains(t, body, "<title>Statup | Setup</title>")
|
||||
assert.Contains(t, body, "<title>Statping | Setup</title>")
|
||||
}
|
||||
|
||||
func TestProcessSetupHandler(t *testing.T) {
|
||||
|
@ -64,7 +64,7 @@ func TestProcessSetupHandler(t *testing.T) {
|
|||
form.Add("sample_data", "on")
|
||||
form.Add("description", "This is an awesome test")
|
||||
form.Add("domain", "http://localhost:8080")
|
||||
form.Add("email", "info@statup.io")
|
||||
form.Add("email", "info@statping.com")
|
||||
req, err := http.NewRequest("POST", "/setup", strings.NewReader(form.Encode()))
|
||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
assert.Nil(t, err)
|
||||
|
@ -131,7 +131,7 @@ func TestDashboardHandler(t *testing.T) {
|
|||
Router().ServeHTTP(rr, req)
|
||||
body := rr.Body.String()
|
||||
assert.Equal(t, 200, rr.Code)
|
||||
assert.Contains(t, body, "<title>Statup | Dashboard</title>")
|
||||
assert.Contains(t, body, "<title>Statping | Dashboard</title>")
|
||||
assert.Contains(t, body, "</footer>")
|
||||
}
|
||||
|
||||
|
@ -168,7 +168,7 @@ func TestServicesHandler(t *testing.T) {
|
|||
Router().ServeHTTP(rr, req)
|
||||
body := rr.Body.String()
|
||||
assert.Equal(t, 200, rr.Code)
|
||||
assert.Contains(t, body, "<title>Statup | Services</title>")
|
||||
assert.Contains(t, body, "<title>Statping | Services</title>")
|
||||
//assert.Contains(t, body, "</footer>️")
|
||||
assert.True(t, isRouteAuthenticated(req))
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ func TestUsersHandler(t *testing.T) {
|
|||
Router().ServeHTTP(rr, req)
|
||||
body := rr.Body.String()
|
||||
assert.Equal(t, 200, rr.Code)
|
||||
assert.Contains(t, body, "<title>Statup | Users</title>")
|
||||
assert.Contains(t, body, "<title>Statping | Users</title>")
|
||||
assert.Contains(t, body, "<td>admin</td>")
|
||||
assert.NotContains(t, body, "<td>changedusername</td>")
|
||||
assert.Contains(t, body, "</footer>")
|
||||
|
@ -194,9 +194,9 @@ func TestUsersEditHandler(t *testing.T) {
|
|||
Router().ServeHTTP(rr, req)
|
||||
body := rr.Body.String()
|
||||
assert.Equal(t, 200, rr.Code)
|
||||
assert.Contains(t, body, "<title>Statup | admin</title>")
|
||||
assert.Contains(t, body, "<title>Statping | admin</title>")
|
||||
assert.Contains(t, body, "<h3>User admin</h3>")
|
||||
assert.Contains(t, body, "value=\"info@statup.io\"")
|
||||
assert.Contains(t, body, "value=\"info@statping.com\"")
|
||||
//assert.Contains(t, body, "</footer>️")
|
||||
assert.True(t, isRouteAuthenticated(req))
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ func TestSettingsHandler(t *testing.T) {
|
|||
Router().ServeHTTP(rr, req)
|
||||
body := rr.Body.String()
|
||||
assert.Equal(t, 200, rr.Code)
|
||||
assert.Contains(t, body, "<title>Statup | Settings</title>")
|
||||
assert.Contains(t, body, "<title>Statping | Settings</title>")
|
||||
//assert.Contains(t, body, "</footer>️")
|
||||
assert.True(t, isRouteAuthenticated(req))
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ func TestHelpHandler(t *testing.T) {
|
|||
Router().ServeHTTP(rr, req)
|
||||
body := rr.Body.String()
|
||||
assert.Equal(t, 200, rr.Code)
|
||||
assert.Contains(t, body, "<title>Statup | Help</title>")
|
||||
assert.Contains(t, body, "<title>Statping | Help</title>")
|
||||
//assert.Contains(t, body, "</footer>️")
|
||||
assert.True(t, isRouteAuthenticated(req))
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ func TestServicesHandler2(t *testing.T) {
|
|||
Router().ServeHTTP(rr, req)
|
||||
body := rr.Body.String()
|
||||
assert.Equal(t, 200, rr.Code)
|
||||
assert.Contains(t, body, "<title>Statup | Services</title>")
|
||||
assert.Contains(t, body, "<title>Statping | Services</title>")
|
||||
assert.Contains(t, body, "JSON Users Test")
|
||||
assert.Contains(t, body, "JSON API Tester")
|
||||
//assert.Contains(t, body, "</footer>️")
|
||||
|
@ -286,7 +286,7 @@ func TestLogsHandler(t *testing.T) {
|
|||
Router().ServeHTTP(rr, req)
|
||||
body := rr.Body.String()
|
||||
assert.Equal(t, 200, rr.Code)
|
||||
assert.Contains(t, body, "<title>Statup | Logs</title>")
|
||||
assert.Contains(t, body, "<title>Statping | Logs</title>")
|
||||
//assert.Contains(t, body, "</footer>️")
|
||||
assert.True(t, isRouteAuthenticated(req))
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ func TestViewSettingsHandler(t *testing.T) {
|
|||
Router().ServeHTTP(rr, req)
|
||||
body := rr.Body.String()
|
||||
assert.Equal(t, 200, rr.Code)
|
||||
assert.Contains(t, body, "<title>Statup | Settings</title>")
|
||||
assert.Contains(t, body, "<title>Statping | Settings</title>")
|
||||
assert.Contains(t, body, "Awesome Status")
|
||||
//assert.Contains(t, body, "</footer>️")
|
||||
assert.True(t, isRouteAuthenticated(req))
|
||||
|
@ -358,7 +358,7 @@ func TestPrometheusHandler(t *testing.T) {
|
|||
Router().ServeHTTP(rr, req)
|
||||
body := rr.Body.String()
|
||||
assert.Equal(t, 200, rr.Code)
|
||||
assert.Contains(t, body, "statup_total_services 5")
|
||||
assert.Contains(t, body, "statping_total_services 5")
|
||||
assert.True(t, isRouteAuthenticated(req))
|
||||
}
|
||||
|
||||
|
@ -382,7 +382,7 @@ func TestViewNotificationSettingsHandler(t *testing.T) {
|
|||
Router().ServeHTTP(rr, req)
|
||||
body := rr.Body.String()
|
||||
assert.Equal(t, 200, rr.Code)
|
||||
assert.Contains(t, body, "<title>Statup | Settings</title>")
|
||||
assert.Contains(t, body, "<title>Statping | Settings</title>")
|
||||
assert.Contains(t, body, `value="exampleuser" id="smtp_username"`)
|
||||
assert.Contains(t, body, `value="587" id="smtp_port"`)
|
||||
assert.Contains(t, body, `value="info@betatude.com" id="outgoing_email_address"`)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -44,7 +44,7 @@ func trayHandler(w http.ResponseWriter, r *http.Request) {
|
|||
ExecuteResponse(w, r, "tray.html", core.CoreApp, nil)
|
||||
}
|
||||
|
||||
// DesktopInit will run the Statup server on a specific IP and port using SQLite database
|
||||
// DesktopInit will run the Statping server on a specific IP and port using SQLite database
|
||||
func DesktopInit(ip string, port int) {
|
||||
var err error
|
||||
exists := utils.FileExists(utils.Directory + "/statup.db")
|
||||
|
@ -65,8 +65,8 @@ func DesktopInit(ip string, port int) {
|
|||
|
||||
config := &core.DbConfig{
|
||||
DbConn: "sqlite",
|
||||
Project: "Statup",
|
||||
Description: "Statup running as an App!",
|
||||
Project: "Statping",
|
||||
Description: "Statping running as an App!",
|
||||
Domain: "http://localhost",
|
||||
Username: "admin",
|
||||
Password: "admin",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -23,13 +23,13 @@ import (
|
|||
)
|
||||
|
||||
//
|
||||
// Use your Statup Secret API Key for Authentication
|
||||
// Use your Statping Secret API Key for Authentication
|
||||
//
|
||||
// scrape_configs:
|
||||
// - job_name: 'statup'
|
||||
// - job_name: 'statping'
|
||||
// bearer_token: MY API SECRET HERE
|
||||
// static_configs:
|
||||
// - targets: ['statup:8080']
|
||||
// - targets: ['statping:8080']
|
||||
//
|
||||
|
||||
func prometheusHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
@ -38,8 +38,8 @@ func prometheusHandler(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
metrics := []string{}
|
||||
system := fmt.Sprintf("statup_total_failures %v\n", core.CountFailures())
|
||||
system += fmt.Sprintf("statup_total_services %v", len(core.CoreApp.Services))
|
||||
system := fmt.Sprintf("statping_total_failures %v\n", core.CountFailures())
|
||||
system += fmt.Sprintf("statping_total_services %v", len(core.CoreApp.Services))
|
||||
metrics = append(metrics, system)
|
||||
for _, ser := range core.CoreApp.Services {
|
||||
v := ser.Select()
|
||||
|
@ -47,11 +47,11 @@ func prometheusHandler(w http.ResponseWriter, r *http.Request) {
|
|||
if !v.Online {
|
||||
online = 0
|
||||
}
|
||||
met := fmt.Sprintf("statup_service_failures{id=\"%v\" name=\"%v\"} %v\n", v.Id, v.Name, len(v.Failures))
|
||||
met += fmt.Sprintf("statup_service_latency{id=\"%v\" name=\"%v\"} %0.0f\n", v.Id, v.Name, (v.Latency * 100))
|
||||
met += fmt.Sprintf("statup_service_online{id=\"%v\" name=\"%v\"} %v\n", v.Id, v.Name, online)
|
||||
met += fmt.Sprintf("statup_service_status_code{id=\"%v\" name=\"%v\"} %v\n", v.Id, v.Name, v.LastStatusCode)
|
||||
met += fmt.Sprintf("statup_service_response_length{id=\"%v\" name=\"%v\"} %v", v.Id, v.Name, len([]byte(v.LastResponse)))
|
||||
met := fmt.Sprintf("statping_service_failures{id=\"%v\" name=\"%v\"} %v\n", v.Id, v.Name, len(v.Failures))
|
||||
met += fmt.Sprintf("statping_service_latency{id=\"%v\" name=\"%v\"} %0.0f\n", v.Id, v.Name, (v.Latency * 100))
|
||||
met += fmt.Sprintf("statping_service_online{id=\"%v\" name=\"%v\"} %v\n", v.Id, v.Name, online)
|
||||
met += fmt.Sprintf("statping_service_status_code{id=\"%v\" name=\"%v\"} %v\n", v.Id, v.Name, v.LastStatusCode)
|
||||
met += fmt.Sprintf("statping_service_response_length{id=\"%v\" name=\"%v\"} %v", v.Id, v.Name, len([]byte(v.LastResponse)))
|
||||
metrics = append(metrics, met)
|
||||
}
|
||||
output := strings.Join(metrics, "\n")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -30,7 +30,7 @@ var (
|
|||
router *mux.Router
|
||||
)
|
||||
|
||||
// Router returns all of the routes used in Statup
|
||||
// Router returns all of the routes used in Statping
|
||||
func Router() *mux.Router {
|
||||
dir := utils.Directory
|
||||
CacheStorage = NewStorage()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -23,7 +23,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
commandTest = "curl -I https://statup.io/"
|
||||
commandTest = "curl -I https://statping.com/"
|
||||
)
|
||||
|
||||
func TestCommandNotifier(t *testing.T) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -86,7 +86,7 @@ func (u *discord) OnSuccess(s *types.Service) {
|
|||
|
||||
// OnSave triggers when this notifier has been saved
|
||||
func (u *discord) OnSave() error {
|
||||
msg := fmt.Sprintf(`{"content": "The discord notifier on Statup was just updated."}`)
|
||||
msg := fmt.Sprintf(`{"content": "The discord notifier on Statping was just updated."}`)
|
||||
u.AddQueue(0, msg)
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -25,7 +25,7 @@ import (
|
|||
|
||||
var (
|
||||
DISCORD_URL = os.Getenv("DISCORD_URL")
|
||||
discordMessage = `{"content": "The discord notifier on Statup has been tested!"}`
|
||||
discordMessage = `{"content": "The discord notifier on Statping has been tested!"}`
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Package notifiers holds all the notifiers for Statup, which also includes
|
||||
// Package notifiers holds all the notifiers for Statping, which also includes
|
||||
// user created notifiers that have been accepted in a Push Request. Read the wiki
|
||||
// to see a full example of a notifier with all events, visit Statup's
|
||||
// to see a full example of a notifier with all events, visit Statping's
|
||||
// notifier example code: https://github.com/hunterlong/statping/wiki/Notifier-Example
|
||||
//
|
||||
// This package shouldn't contain any exports, to see how notifiers work
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -34,7 +34,7 @@ const (
|
|||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Statup email</title>
|
||||
<title>Statping email</title>
|
||||
</head>
|
||||
<body style="-webkit-text-size-adjust: none; box-sizing: border-box; color: #74787E; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; height: 100%; line-height: 1.4; margin: 0; width: 100% !important;" bgcolor="#F2F4F6">
|
||||
<style type="text/css">
|
||||
|
@ -77,9 +77,9 @@ const (
|
|||
<p style="box-sizing: border-box; color: #74787E; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 16px; line-height: 1.5em; margin-top: 0;" align="left">
|
||||
|
||||
{{ if .Online }}
|
||||
Your Statup service <a target="_blank" href="{{.Domain}}">{{.Name}}</a> is back online. This service has been triggered with a HTTP status code of '{{.LastStatusCode}}' and is currently online based on your requirements. Your service was reported online at {{.CreatedAt}}. </p>
|
||||
Your Statping service <a target="_blank" href="{{.Domain}}">{{.Name}}</a> is back online. This service has been triggered with a HTTP status code of '{{.LastStatusCode}}' and is currently online based on your requirements. Your service was reported online at {{.CreatedAt}}. </p>
|
||||
{{ else }}
|
||||
Your Statup service <a target="_blank" href="{{.Domain}}">{{.Name}}</a> has been triggered with a HTTP status code of '{{.LastStatusCode}}' and is currently offline based on your requirements. This failure was created on {{.CreatedAt}}. </p>
|
||||
Your Statping service <a target="_blank" href="{{.Domain}}">{{.Name}}</a> has been triggered with a HTTP status code of '{{.LastStatusCode}}' and is currently offline based on your requirements. This failure was created on {{.CreatedAt}}. </p>
|
||||
{{ end }}
|
||||
|
||||
{{if .LastResponse }}
|
||||
|
@ -89,7 +89,7 @@ Last Response</h1>
|
|||
{{ .LastResponse }} </p> {{end}}
|
||||
<table class="body-sub" style="border-top-color: #EDEFF2; border-top-style: solid; border-top-width: 1px; box-sizing: border-box; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; margin-top: 25px; padding-top: 25px;">
|
||||
<td style="box-sizing: border-box; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; word-break: break-word;"> <a href="/service/{{.Id}}" class="button button--blue" target="_blank" style="-webkit-text-size-adjust: none; background: #3869D4; border-color: #3869d4; border-radius: 3px; border-style: solid; border-width: 10px 18px; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16); box-sizing: border-box; color: #FFF; display: inline-block; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; text-decoration: none;">View Service</a> </td>
|
||||
<td style="box-sizing: border-box; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; word-break: break-word;"> <a href="/dashboard" class="button button--blue" target="_blank" style="-webkit-text-size-adjust: none; background: #3869D4; border-color: #3869d4; border-radius: 3px; border-style: solid; border-width: 10px 18px; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16); box-sizing: border-box; color: #FFF; display: inline-block; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; text-decoration: none;">Statup Dashboard</a> </td>
|
||||
<td style="box-sizing: border-box; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; word-break: break-word;"> <a href="/dashboard" class="button button--blue" target="_blank" style="-webkit-text-size-adjust: none; background: #3869D4; border-color: #3869d4; border-radius: 3px; border-style: solid; border-width: 10px 18px; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16); box-sizing: border-box; color: #FFF; display: inline-block; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; text-decoration: none;">Statping Dashboard</a> </td>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -32,7 +32,7 @@ type mobilePush struct {
|
|||
var mobile = &mobilePush{¬ifier.Notification{
|
||||
Method: "mobile",
|
||||
Title: "Mobile Notifications",
|
||||
Description: `Receive push notifications on your Android or iPhone devices using the Statup App. You can scan the Authentication QR Code found in Settings to get the mobile app setup in seconds.
|
||||
Description: `Receive push notifications on your Android or iPhone devices using the Statping App. You can scan the Authentication QR Code found in Settings to get the mobile app setup in seconds.
|
||||
<p align="center"><a href="https://play.google.com/store/apps/details?id=com.statup"><img src="https://img.cjx.io/google-play.svg"></a> <a href="https://testflight.apple.com/join/TuBIj25Q"><img src="https://img.cjx.io/app-store-badge.svg"></a></p>`,
|
||||
Author: "Hunter Long",
|
||||
AuthorUrl: "https://github.com/hunterlong",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -29,8 +29,8 @@ import (
|
|||
|
||||
const (
|
||||
slackMethod = "slack"
|
||||
failingTemplate = `{ "attachments": [ { "fallback": "Service {{.Service.Name}} - is currently failing", "text": "Your Statup service <{{.Service.Domain}}|{{.Service.Name}}> has just received a Failure notification based on your expected results. {{.Service.Name}} responded with a HTTP Status code of {{.Service.LastStatusCode}}.", "fields": [ { "title": "Expected Status Code", "value": "{{.Service.ExpectedStatus}}", "short": true }, { "title": "Received Status Code", "value": "{{.Service.LastStatusCode}}", "short": true } ], "color": "#FF0000", "thumb_url": "https://statup.io", "footer": "Statup", "footer_icon": "https://img.cjx.io/statuplogo32.png" } ] }`
|
||||
successTemplate = `{ "attachments": [ { "fallback": "Service {{.Service.Name}} - is now back online", "text": "Your Statup service <{{.Service.Domain}}|{{.Service.Name}}> is now back online and meets your expected responses.", "color": "#00FF00", "thumb_url": "https://statup.io", "footer": "Statup", "footer_icon": "https://img.cjx.io/statuplogo32.png" } ] }`
|
||||
failingTemplate = `{ "attachments": [ { "fallback": "Service {{.Service.Name}} - is currently failing", "text": "Your Statping service <{{.Service.Domain}}|{{.Service.Name}}> has just received a Failure notification based on your expected results. {{.Service.Name}} responded with a HTTP Status code of {{.Service.LastStatusCode}}.", "fields": [ { "title": "Expected Status Code", "value": "{{.Service.ExpectedStatus}}", "short": true }, { "title": "Received Status Code", "value": "{{.Service.LastStatusCode}}", "short": true } ], "color": "#FF0000", "thumb_url": "https://statping.com", "footer": "Statping", "footer_icon": "https://img.cjx.io/statuplogo32.png" } ] }`
|
||||
successTemplate = `{ "attachments": [ { "fallback": "Service {{.Service.Name}} - is now back online", "text": "Your Statping service <{{.Service.Domain}}|{{.Service.Name}}> is now back online and meets your expected responses.", "color": "#00FF00", "thumb_url": "https://statping.com", "footer": "Statping", "footer_icon": "https://img.cjx.io/statuplogo32.png" } ] }`
|
||||
slackText = `{"text":"{{.}}"}`
|
||||
)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -28,7 +28,7 @@ var (
|
|||
TWILIO_SECRET = os.Getenv("TWILIO_SECRET")
|
||||
TWILIO_FROM = os.Getenv("TWILIO_FROM")
|
||||
TWILIO_TO = os.Getenv("TWILIO_TO")
|
||||
twilioMessage = "The Twilio notifier on Statup has been tested!"
|
||||
twilioMessage = "The Twilio notifier on Statping has been tested!"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -134,7 +134,7 @@ func (w *webhooker) sendHttpWebhook(body string) (*http.Response, error) {
|
|||
if w.ApiKey != "" {
|
||||
req.Header.Add("Content-Type", w.ApiKey)
|
||||
}
|
||||
req.Header.Set("User-Agent", "Statup")
|
||||
req.Header.Set("User-Agent", "Statping")
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
// Package plugin contains the interfaces to build your own Golang Plugin that will receive triggers on Statup events.
|
||||
// Package plugin contains the interfaces to build your own Golang Plugin that will receive triggers on Statping events.
|
||||
package plugin
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
@ -31,7 +31,7 @@ import (
|
|||
//
|
||||
// v0.1
|
||||
//
|
||||
// https://statup.io
|
||||
// https://statping.com
|
||||
//
|
||||
//
|
||||
// An expandable plugin framework that will still
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Statup
|
||||
// Statping
|
||||
// Copyright (C) 2018. Hunter Long and the project contributors
|
||||
// Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
//
|
||||
|
|
|
@ -7,14 +7,14 @@ It doesn't look good when your Status Page goes down, I recommend a small EC2 in
|
|||
# Install on Linux
|
||||
Installing on Linux is a pretty easy task. Simply run the command below to have the `statup` command ready to rock.
|
||||
```bash
|
||||
bash <(curl -s https://statup.io/install.sh)
|
||||
bash <(curl -s https://statping.com/install.sh)
|
||||
statup version
|
||||
```
|
||||
|
||||
# Install on Mac
|
||||
Installing on Mac/OSX is also very easy,
|
||||
```bash
|
||||
bash <(curl -s https://statup.io/install.sh)
|
||||
bash <(curl -s https://statping.com/install.sh)
|
||||
statup version
|
||||
```
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ services:
|
|||
DB_PASS: root
|
||||
DB_DATABASE: statup
|
||||
NAME: EC2 Example
|
||||
DESCRIPTION: This is a Statup Docker Compose instance
|
||||
DESCRIPTION: This is a Statping Docker Compose instance
|
||||
|
||||
postgres_statup:
|
||||
container_name: postgres_statup
|
||||
|
|
|
@ -40,7 +40,7 @@ services:
|
|||
DB_PASS: password123
|
||||
DB_DATABASE: statup
|
||||
NAME: EC2 Example
|
||||
DESCRIPTION: This is a Statup Docker Compose instance
|
||||
DESCRIPTION: This is a Statping Docker Compose instance
|
||||
|
||||
postgres_statup:
|
||||
container_name: postgres_statup
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Steps for Automatic SSL with Statup
|
||||
# Steps for Automatic SSL with Statping
|
||||
#
|
||||
# 1. Create EC2 Instance while including this file has "--data-file"
|
||||
# 2. Once EC2 is created, view System Logs in EC2 instance.
|
||||
|
@ -17,7 +17,7 @@ LETSENCRYPT_EMAIL="noreply@MYEMAIL.com"
|
|||
###################################################
|
||||
|
||||
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
|
||||
printf "Statup will try to create an SSL for domain: $LETSENCRYPT_HOST\n"
|
||||
printf "Statping will try to create an SSL for domain: $LETSENCRYPT_HOST\n"
|
||||
printf "\nexport LETSENCRYPT_HOST=$LETSENCRYPT_HOST\n" >> /home/ubuntu/.profile
|
||||
printf "export LETSENCRYPT_EMAIL=$LETSENCRYPT_EMAIL\n" >> /home/ubuntu/.profile
|
||||
sudo printf "\nexport LETSENCRYPT_HOST=$LETSENCRYPT_HOST\n" >> /root/.profile
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[Unit]
|
||||
Description=Statup Server
|
||||
Description=Statping Server
|
||||
After=network.target
|
||||
After=systemd-user-sessions.service
|
||||
After=network-online.target
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
#
|
||||
# Statup Status Page Server
|
||||
# Statping Status Page Server
|
||||
# for EC2
|
||||
#
|
||||
# This script run everytime the EC2 is booted. It will maintain the most latest version of Statup
|
||||
# This script run everytime the EC2 is booted. It will maintain the most latest version of Statping
|
||||
# while removing old docker containers and images to reduce hard drive usage for long term use.
|
||||
#
|
||||
#
|
||||
|
@ -60,8 +60,8 @@ then
|
|||
printf "A RECORD => $EC_IP \n"
|
||||
printf "CNAME RECORD => $EC2_ENDPOINT\n"
|
||||
printf "================================================================================================================\n"
|
||||
printf "Your Statup Server is ready! Go to the URL below to begin.\n"
|
||||
printf "Statup URL: $EC2_ENDPOINT\n"
|
||||
printf "Your Statping Server is ready! Go to the URL below to begin.\n"
|
||||
printf "Statping URL: $EC2_ENDPOINT\n"
|
||||
printf "================================================================================================================\n"
|
||||
else
|
||||
printf "Domain found for SSL certificate - $LETSENCRYPT_HOST\n"
|
||||
|
@ -73,8 +73,8 @@ else
|
|||
printf "Once you set your DNS records, Lets Encrypt will automatically\n"
|
||||
printf "create a SSL certificate for you and redirect you to HTTPS\n\n"
|
||||
printf "================================================================================================================\n"
|
||||
printf "Your Statup Server is ready! Go to the URL below to begin.\n"
|
||||
printf "Statup URL: $EC2_ENDPOINT\n"
|
||||
printf "Your Statping Server is ready! Go to the URL below to begin.\n"
|
||||
printf "Statping URL: $EC2_ENDPOINT\n"
|
||||
printf "SSL Domain: $LETSENCRYPT_HOST\n"
|
||||
printf "================================================================================================================\n"
|
||||
fi
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
name: statup
|
||||
version-script: cat version.txt
|
||||
version: "stable"
|
||||
summary: Statup Server Monitoring with Status Page
|
||||
summary: Statping Server Monitoring with Status Page
|
||||
description: >
|
||||
An easy to use Status Page for your websites and applications.
|
||||
Statup will automatically fetch the application and render a beautiful
|
||||
Statping will automatically fetch the application and render a beautiful
|
||||
status page with tons of features for you to build an even better status page.
|
||||
This Status Page generator allows you to use MySQL, Postgres, or SQLite
|
||||
on multiple operating systems.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Package source holds all the assets for Statup. This includes
|
||||
// Package source holds all the assets for Statping. This includes
|
||||
// CSS, JS, SCSS, HTML and other website related content.
|
||||
// This package uses Rice to compile all assets into a single 'rice-box.go' file.
|
||||
//
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue