Giter Club home page Giter Club logo

statping / statping Goto Github PK

View Code? Open in Web Editor NEW
7.0K 65.0 602.0 29.12 MB

Status Page for monitoring your websites and applications with beautiful graphs, analytics, and plugins. Run on any type of environment.

Home Page: https://demo.statping.com

License: GNU General Public License v3.0

Shell 0.30% Go 45.64% CSS 2.86% Dockerfile 0.06% Makefile 1.73% HTML 0.05% Vue 47.45% SCSS 1.92%
statuspage status-page website-monitor uptime monitoring prometheus application-monitoring server-monitor docker golang-plugin

statping's Introduction

Statping - Web and App Status Monitoring for Any Type of Project
View Wiki | Demo | iPhone | Android
API | Docker | EC2 | Mac | Linux | Windows

Statping - Status Page & Monitoring Server

An easy to use Status Page for your websites and applications. 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.

Master Release GoDoc Slack Docker Pulls



A Future-Proof Status Page

Statping strives to remain future-proof and remain intact if a failure is created. Your Statping service should not be running on the same instance you're trying to monitor. If your server crashes your Status Page should still remaining online to notify your users of downtime.


(dashboard login is admin, password admin)


No Requirements

Statping is built in Go Language so all you need is the precompile binary based on your operating system. You won't need to install anything extra once you have the Statping binary installed. You can even run Statping on a Raspberry Pi.

                                  

Lightweight and Fast

Statping is a very lightweight application and is available for Linux, Mac, and Windows. The Docker image is only ~16Mb so you know that this application won't be filling up your hard drive space. The Status binary for all other OS's is ~17Mb at most.





Mobile App is Gorgeous

The Statping app is available on the App Store and Google Play for free. The app will allow you to view services, receive notifications when a service is offline, update groups, users, services, messages, and more! Start your own Statping server and then connect it to the app by scanning the QR code in settings.



Run on Any Server

Whether you're a Docker fan-boy or a AWS EC2 master, Statping gives you multiple options to simply get running. Our Amazon AMI image is only 8Gb and will automatically update to the most stable version of Statping. Running on an EC2 server might be the most cost effective way to host your own Statping Status Page. The server runs on the smallest EC2 instance (t2.nano) AWS has to offer, which only costs around $4.60 USD a month for your dedicated Status Page. Want to run it on your own Docker server? Awesome! Statping has multiple docker-compose.yml files to work with. Statping can automatically create a SSL Certification for your status page.



Custom SASS Styling

Statping will allow you to completely customize your Status Page using SASS styling with easy to use variables. The Docker image actually contains a prebuilt SASS binary so you won't even need to setup anything!



Slack, Email, Twilio and more

Statping includes email notification via SMTP and Slack integration using Incoming Webhook. Insert the webhook URL into the Settings page in Statping and enable the Slack integration. Anytime a service fails, you're channel that you specified on Slack will receive a message.



User Created Notifiers

View the [Plugin Wiki](https://github.com/statping/statping/wiki/Statping-Plugins) to see detailed information about Golang Plugins. Statping isn't just another Status Page for your applications, it's a framework that allows you to create your own plugins to interact with every element of your status page. [Notifier's](https://github.com/statping/statping/wiki/Notifiers) can also be create with only 1 golang file.







Easy to use Dashboard

Having a straight forward dashboard makes Statping that much better. Monitor your websites and applications with a basic HTTP GET request, or add a POST request with your own JSON to post to the endpoint.



Run on Docker

Use the Statping Docker Image to create a status page in seconds. Checkout the Docker Wiki to view more details on how to get started using Docker.

docker run -it -p 8080:8080 statping/statping

There are multiple ways to startup a Statping server. You want to make sure Statping is on it's own instance that is not on the same server as the applications you wish to monitor. It doesn't look good when your Status Page goes down, I recommend a small EC2 instance so you can set it, and forget it.



Docker Compose

In this folder there is a standard docker-compose file that include nginx, postgres, and Statping.

docker-compose up -d





Docker Compose with Automatic SSL

You can automatically start a Statping server with automatic SSL encryption using this docker-compose file. First point your domain's DNS to the Statping server, and then run this docker-compose command with DOMAIN and EMAIL. Email is for letsencrypt services.

LETSENCRYPT_HOST=mydomain.com \
    [email protected] \
    docker-compose -f docker-compose-ssl.yml up -d

Once your instance has started, it will take a moment to get your SSL certificate. Make sure you have a A or CNAME record on your domain that points to the IP/DNS of your server running Statping.



Prometheus Exporter

Statping includes a Prometheus Exporter so you can have even more monitoring power with your services. The Prometheus exporter can be seen on /metrics, simply create another exporter in your prometheus config. Use your Statping API Secret for the Authorization Bearer header, the /metrics URL is dedicated for Prometheus and requires the correct API Secret has Authorization header.

scrape_configs:
  - job_name: 'statping'
    bearer_token: 'MY API SECRET HERE'
    static_configs:
      - targets: ['statping:8080']





Run on EC2 Server

Running Statping on the smallest EC2 server is very quick using the AWS AMI Image. Checkout the AWS Wiki to see a step by step guide on how to get your EC2 Statping service online.



Create Security Groups

Create the AWS Security Groups with the commands below, Statping will expose port 80 and 443.

aws ec2 create-security-group --group-name StatpingPublicHTTP \
     --description "Statping HTTP Server on port 80 and 443"
# will response back a Group ID. Copy ID and use it for --group-id below.

aws ec2 authorize-security-group-ingress \
     --group-id sg-7e8b830f --protocol tcp \
     --port 80 --cidr 0.0.0.0/0

aws ec2 authorize-security-group-ingress \
     --group-id sg-7e8b830f --protocol tcp \
     --port 443 --cidr 0.0.0.0/0
Create EC2 without SSL
aws ec2 run-instances \
    --image-id ami-7be8a103 \
    --count 1 --instance-type t2.nano \
    --key-name MYKEYHERE \
    --security-group-ids sg-7e8b830f
Create EC2 with Automatic SSL Certification

The AWS-CLI command below will automatically create an EC2 server and create an SSL certificate from Lets Encrypt, for free.

wget https://raw.githubusercontent.com/statping/statping/master/servers/ec2-ssl.sh
# Edit ec2-ssl.sh and insert your domain you want to use, then run command below.
# Use the Security Group ID that you used above for --security-group-ids

aws ec2 run-instances \
    --user-data file://ec2-ssl.sh \
    --image-id ami-7be8a103 \
    --count 1 --instance-type t2.nano \
    --key-name MYKEYHERE \
    --security-group-ids sg-7e8b830f

Contributing

Statping accepts Push Requests to the dev branch! Feel free to add your own features and notifiers. You probably want to checkout the Notifier Wiki to get a better understanding on how to create your own notification methods for failing/successful services. Testing on Statping will test each function on MySQL, Postgres, and SQLite. I recommend running MySQL and Postgres Docker containers for testing. You can find multiple docker-compose files in the dev directory.

Dev Release Go Report Card Build Status Cypress.io tests Docker Pulls GodocCoverage Status

statping's People

Contributors

arakelian avatar britannic avatar craftbyte avatar dependabot[bot] avatar dogrocker avatar fabiopbx avatar giner avatar henricook avatar hugo-vrijswijk avatar hunterlong avatar innovativeinventor avatar isundaylee avatar jimmycasey avatar jtbonhomme avatar kaeltis avatar l0nax avatar m19c avatar naramsim avatar oitimon avatar prem-razorpay avatar robinknaapen avatar robobenklein avatar ryanoolala avatar t4skforce avatar thatinfrastructureguy avatar tony84727 avatar tufanbarisyildirim avatar v4lerio avatar z3cka avatar zeez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

statping's Issues

Custom Footer not functional.

I've added some text to the custom footer field within the settings page but upon saving, nothing has changed. I've cleared cache, reloaded and tried on another machine and browser but no difference.

Service update doesn't work

If I want to update a service, it just shows a blank page, and the update doesn't work.

On the web inspector, I see a HTTP 200

Logs in termina:

WEB: /service/16 (POST) | IP: <MYIP>

Update or Delete service did not remove from worker queues

I update my new service api end point
from a.com to b.com
in /logs it show that Statup try to ping to old service first and then ping to new service.

2018-08-31 13:00:10: Service test Successful: 595.86 ms
2018-08-31 13:00:05: Service test Failing: HTTP Error Get http://localhost: dial tcp [::1]:80: connect: connection refused

event I delete service Statup alway ping to the service.

v.0.52

[Feature request] Slack integration

Hi!

I'm playing with statup and it looks great. I would propose a feature, slack integration.
When a website is not reachable, statup call an incoming webhook to notify users on slack.

Custom port for HTTP check

Hi, loving statup btw! I'm planning to use it to monitor a small set of microservices for an upcoming product and I've hit a few issues early on. I could submit some patches for these but I figured I'd open issues to discuss first.

So my services are deployed using docker compose: https://github.com/TradeWars/deployment - statup lives in the deployment and is connected to the same networks as the services. The problem is, my services are running on non-standard HTTP ports.

So I can use the domain name and hi warehouse but because it's running on port 7788 I get a "connection refused". A quick fix for this one would be to re-use the "TCP Port" field for the client.Get call if it's set - if not, just omit it.

/logs doesn't work

I'm using the latest version for hunterlong/statup (Docker image).

/logs doesn't work, I just get a blank page.

HTTP status: 200

But logs in the terminal are:

WEB: /logs (GET) | IP: <MYIP>
FATAL: file does not exist

High CPU Usage by averaging 99.8%

Describe the bug
/logs/statup.log look so good.

2018/10/09 05:40:55 INFO: Service Website Successful Response: 173.92 ms | Lookup in: 5.29 ms
2018/10/09 05:41:31 INFO: Service Application Successful Response: 127.31 ms | Lookup in: 4.26 ms
2018/10/09 05:43:55 INFO: Service Website Successful Response: 204.02 ms | Lookup in: 3.99 ms
2018/10/09 05:44:31 INFO: Service Application Successful Response: 110.76 ms | Lookup in: 2.44 ms
2018/10/09 05:46:55 INFO: Service Website Successful Response: 247.38 ms | Lookup in: 3.63 ms
2018/10/09 05:47:31 INFO: Service Application Successful Response: 134.06 ms | Lookup in: 14.98 ms

To Reproduce
Steps to reproduce the behavior:

  1. I'm using version: '0.72' image from docker hub.
  2. Running on docker and sqlite.

Unclear docs for Linux installation

I am on Ubuntu 16.04 LTS

I have installed Statup via bash <(curl -s https://assets.statup.io/install.sh) and checked the version as stated... However, I was unable to start Statup because it says ERROR: config.yml file not found - starting in setup mode. What should I do, i'm sure i'm missing something!

Linux Statup Install

I think there might be something wrong with one of your curl flags? Going to check this again when I get home.

curl -L -sS $FILE -o statup.tar.gz && tar xzf statup.tar.gz && rm statup.tar.gz

[Feature request] Notify users about maintenance

I think it would be good that I can notify my users about maintenance.

I have some services with assigned email addresses. For example, XYZ site with customer_xyz email address. I plan to upgrade server or something like that, therefore I would like to define a maintenance window, 6:00 am - 7:00 am. I would send an email about maintenance and statup would use that maintenance window somehow. For example, it says, maintenance from 6:00 am to 7:00 am.

What do you think?

Read configuration from a config file

Is it possible to store/read all the configurations(Services/Admin info) from a Json/YAML config file instead of any database? This will help me in keeping the configuration file in a repo and recreate the containers wherever required

Starting with example docker-compose doesn't work

After I ran docker-compose up -d

Got this error on statup logs

statup      | 2018/07/08 17:36:44 INFO: Starting Statup v0.29.7
statup      | 2018/07/08 17:36:45 INFO: Database connection to 'statup' was successful.
statup      | panic: runtime error: invalid memory address or nil pointer dereference
statup      | [signal SIGSEGV: segmentation violation code=0x1 addr=0x78 pc=0x7f6805]
statup      |
statup      | goroutine 1 [running]:
statup      | upper.io/db.v3/internal/sqladapter.(*Result).buildPaginator(0xc42008b220, 0x7f587e, 0xb438c0, 0xc42008b220, 0xc4202fa040)
statup      | 	/ext-go/1/src/upper.io/db.v3/internal/sqladapter/result.go:386 +0xb5
statup      | upper.io/db.v3/internal/sqladapter.(*Result).All(0xc42008b220, 0xa90da0, 0xc4200f9d80, 0x1, 0xc965a0)
statup      | 	/ext-go/1/src/upper.io/db.v3/internal/sqladapter/result.go:227 +0x2f
statup      | github.com/hunterlong/statup/core.SelectAllCommunications(0x0, 0xc881e0, 0xc4200217a0, 0x88d593, 0xc42027d500)
statup      | 	/ext-go/1/src/github.com/hunterlong/statup/core/communication.go:48 +0x135
statup      | github.com/hunterlong/statup/core.InitApp()
statup      | 	/ext-go/1/src/github.com/hunterlong/statup/core/core.go:62 +0x27
statup      | main.mainProcess()
statup      | 	/ext-go/1/src/github.com/hunterlong/statup/main.go:72 +0x73
statup      | main.main()
statup      | 	/ext-go/1/src/github.com/hunterlong/statup/main.go:44 +0x15d

Here Is sample script I used.

version: '2.3'

services:

  nginx:
    container_name: nginx
    image: jwilder/nginx-proxy
    ports:
      - 0.0.0.0:80:80
      - 0.0.0.0:443:443
    networks:
      - internet
    restart: always
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - ./statup/nginx/certs:/etc/nginx/certs:ro
      - ./statup/nginx/vhost:/etc/nginx/vhost.d
      - ./statup/nginx/html:/usr/share/nginx/html:ro
      - ./statup/nginx/dhparam:/etc/nginx/dhparam
    environment:
      DEFAULT_HOST: localhost

  statup:
    container_name: statup
    image: hunterlong/statup:latest
    restart: always
    networks:
      - internet
      - database
    depends_on:
      - postgres
    volumes:
      - ./statup/app:/app
    environment:
      VIRTUAL_HOST: localhost
      VIRTUAL_PORT: 8080
      DB_CONN: postgres
      DB_HOST: postgres
      DB_USER: statup
      DB_PASS: password123
      DB_DATABASE: statup
      NAME: EC2 Example
      DESCRIPTION: This is a Statup Docker Compose instance

  postgres:
    container_name: postgres
    image: postgres
    restart: always
    networks:
      - database
    volumes:
      - ./statup/postgres:/var/lib/postgresql/data
    environment:
      POSTGRES_PASSWORD: password123
      POSTGRES_USER: statup
      POSTGRES_DB: statup

networks:
  internet:
    driver: bridge
  database:
    driver: bridge

Potential Stability Issue

I have found a bug with the code that could potentially stop the status page from functioning with very little effort. Due to the ease of this being exploited, I have emailed you regarding the issue instead (to the email listed on your GitHub Profile). I have checked with your demo page and the issue is present there.

Please could you take a look into this?

Spikes in cpu usage

Hello again, the latest releases were great, lots improvements. xD

One thing I'm not sure is if the CPU usage when refreshing the homepage it is supposed to be high.

I have 10 services to monitor, and I've noticed some delay when refreshing, then I decided to watch the htop while refreshing and every time I press F5 it goes up to 90% .

I don't remember if the old releases were like that.


If that's expected just close the issue. =]

Not able to connect with Database (SQL) after some time.

After about 2 hours (It depends, i found it's between 1-3 hours), the log starts spitting out 'sql: database is closed'

If that happens you won't be able to see the charts and eventually you can't login.
I've seen the same thing happened on the demo site https://demo.statup.io/

After restarting te .exe everything work just fine agan for some time.
b59c030412dd0f1645f84b3d0c9b96cc
d6624d3865c03789cada78cac82df4ca
schermopname 1046

Love the project and looks AMAZING keep up the AMAZING work <3

[Feature request] Timeout setup

Hello mate, first of all congratulations for the project, it's amazing and I'm using it for my current projects!!

Sometimes I expect my services to have some delays, so the 30 secs timeout the we currently have some times is not enough, it would be awesome to have either a customizable timeout setup or a higher one 🤔

If you agree when I have some spare time I'll create a PR that tries to address that! =D

(Keep up the good work buddy!)

"Online last 24 Hours" is incorrect

Really simple issue to find, the last 24 hours online percentage is actually the total online percentage. I've had uptime monitors running for over a week through this and both graphs match despite not having any reported downtime in the last 24 hours.

Docker Compose in Wiki is broken (on Mac Mojave and Ubuntu 18.04)

Describe the bug
While trying to run docker-compose up, I keep getting the error statup | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds... , and cannot start the application.

To Reproduce
Steps to reproduce the behavior:

  1. I'm using version: Docker Image hunterlong/statup:latest using the Nginx/Postgres Docker Compose file found on https://github.com/hunterlong/statup/wiki/Docker
  2. I tried running docker-compose up, both on Mac Mojave and Ubuntu 18.04 (through Vagrant, clean install)
  3. The statup | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds... pops up

Expected Behavior
I expect Statup to connect to the PostgreSQL database.

Screenshots Not applicable

Gitter GitHub release Build Status

Console output:

vagrant@ubuntu-bionic:~/test$ sudo docker-compose up
postgres is up-to-date
Starting nginx ...
statup is up-to-date
Starting nginx ... done
Attaching to postgres, statup, nginx
nginx       | WARNING: /etc/nginx/dhparam/dhparam.pem was not found. A pre-generated dhparam.pem will be used for now while a new one
nginx       | is being generated in the background.  Once the new dhparam.pem is in place, nginx will be reloaded.
postgres    | The files belonging to this database system will be owned by user "postgres".
postgres    | This user must also own the server process.
postgres    |
postgres    | The database cluster will be initialized with locale "en_US.utf8".
postgres    | The default database encoding has accordingly been set to "UTF8".
postgres    | The default text search configuration will be set to "english".
postgres    |
postgres    | Data page checksums are disabled.
postgres    |
postgres    | fixing permissions on existing directory /var/lib/postgresql/data ... ok
postgres    | creating subdirectories ... ok
postgres    | selecting default max_connections ... 100
postgres    | selecting default shared_buffers ... 128MB
postgres    | selecting dynamic shared memory implementation ... posix
postgres    | creating configuration files ... ok
postgres    | running bootstrap script ... ok
postgres    | performing post-bootstrap initialization ... ok
postgres    | syncing data to disk ... ok
postgres    |
postgres    | Success. You can now start the database server using:
postgres    |
postgres    |     pg_ctl -D /var/lib/postgresql/data -l logfile start
postgres    |
postgres    |
postgres    | WARNING: enabling "trust" authentication for local connections
postgres    | You can change this by editing pg_hba.conf or using the option -A, or
postgres    | --auth-local and --auth-host, the next time you run initdb.
postgres    | waiting for server to start....2018-10-03 13:24:12.545 UTC [40] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres    | 2018-10-03 13:24:12.584 UTC [41] LOG:  database system was shut down at 2018-10-03 13:24:12 UTC
postgres    | 2018-10-03 13:24:12.606 UTC [40] LOG:  database system is ready to accept connections
postgres    |  done
postgres    | server started
postgres    | CREATE DATABASE
postgres    |
statup      | INFO: Starting Statup v0.68
statup      | INFO: DB_CONN environment variable was found, waiting for database...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
postgres    |
postgres    | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
postgres    |
postgres    | 2018-10-03 13:24:12.954 UTC [40] LOG:  received fast shutdown request
postgres    | waiting for server to shut down....2018-10-03 13:24:12.955 UTC [40] LOG:  aborting any active transactions
postgres    | 2018-10-03 13:24:12.956 UTC [40] LOG:  worker process: logical replication launcher (PID 47) exited with exit code 1
postgres    | 2018-10-03 13:24:12.957 UTC [42] LOG:  shutting down
postgres    | 2018-10-03 13:24:12.998 UTC [40] LOG:  database system is shut down
postgres    |  done
postgres    | server stopped
postgres    |
postgres    | PostgreSQL init process complete; ready for start up.
postgres    |
postgres    | 2018-10-03 13:24:13.068 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
postgres    | 2018-10-03 13:24:13.068 UTC [1] LOG:  listening on IPv6 address "::", port 5432
postgres    | 2018-10-03 13:24:13.086 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres    | 2018-10-03 13:24:13.119 UTC [58] LOG:  database system was shut down at 2018-10-03 13:24:12 UTC
postgres    | 2018-10-03 13:24:13.144 UTC [1] LOG:  database system is ready to accept connections
nginx       | forego     | starting dockergen.1 on port 5000
nginx       | forego     | starting nginx.1 on port 5100
nginx       | dockergen.1 | 2018/10/03 13:24:39 Generated '/etc/nginx/conf.d/default.conf' from 3 containers
nginx       | dockergen.1 | 2018/10/03 13:24:39 Watching docker events
nginx       | dockergen.1 | 2018/10/03 13:24:39 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification 'nginx -s reload'
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
nginx       | 2018/10/03 13:24:48 [notice] 44#44: signal process started
nginx       | Generating DH parameters, 2048 bit long safe prime, generator 2
nginx       | This is going to take a long time
nginx       | dhparam generation complete, reloading nginx
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
statup      | INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...

The statup/app/logs/statup.log file:

2018/10/03 13:24:12 INFO: Starting Statup v0.68
2018/10/03 13:24:12 INFO: DB_CONN environment variable was found, waiting for database...
2018/10/03 13:24:12 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:24:17 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:24:22 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:24:27 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:24:32 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:24:37 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:24:42 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:24:47 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:24:52 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:24:57 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:25:02 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:25:07 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:25:12 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:25:17 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:25:22 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:25:27 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:25:32 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:25:37 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:25:42 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:25:47 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:25:52 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:25:57 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:26:02 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:26:07 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:26:12 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:26:17 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:26:22 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:26:27 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:26:32 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:26:37 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:26:42 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:26:47 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:26:52 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:26:57 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:27:02 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:27:07 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...
2018/10/03 13:27:12 INFO: Database connection to 'postgres' is not available, trying again in 5 seconds...

default password

Hi,

What is the default password and username for dashboard when one installs the AMI image for statup. I tried 'admin' with instance ID as password but that did not worked.

Thanks

Fails to run with sqlite

Going through the setup procedure with Sqlite fails with a invalid memory address or nil pointer dereference panic after saving the settings.

I've tried running on Windows and with basic Docker (docker run -it -p 8080:8080 hunterlong/statup).

2018/07/02 14:59:36 INFO: Starting Statup v0.28.6
2018/07/02 14:59:36 WARNING: config.yml file not found - starting in setup mode
2018/07/02 14:59:36 INFO: Statup HTTP Server running on http://localhost:8080
2018/07/02 14:59:44 WEB: /setup (GET) | IP: localhost:8080
Dropping Tables...
2018/07/02 14:59:53 WARNING: no such table: core
2018/07/02 14:59:53 WARNING: no such table: hits
2018/07/02 14:59:53 WARNING: no such table: failures
2018/07/02 14:59:53 WARNING: no such table: users
2018/07/02 14:59:53 WARNING: no such table: checkins
2018/07/02 14:59:53 WARNING: no such table: services
2018/07/02 14:59:53 WARNING: no such table: communication
Creating Tables...
Database Created
2018/07/02 14:59:55 INFO: Inserting Sample Data...
new checkin:  1
2018/07/02 14:59:55 INFO: Sample data has finished importing
2018/07/02 14:59:55 WARNING: upper: no more rows in this result set
2018/07/02 14:59:55 WARNING: upper: no more rows in this result set
2018/07/02 14:59:55 WARNING: upper: no more rows in this result set
2018/07/02 14:59:55 http: panic serving [::1]:53550: runtime error: invalid memory address or nil pointer dereference
goroutine 25 [running]:
net/http.(*conn).serve.func1(0xc0427261e0)
        /usr/local/go/src/net/http/server.go:1726 +0xd7
panic(0x9860a0, 0xe9af80)
        /usr/local/go/src/runtime/panic.go:502 +0x237
github.com/hunterlong/statup/core.LoadDefaultCommunications()
        /ext-go/1/src/github.com/hunterlong/statup/core/communication.go:14 +0x4f
github.com/hunterlong/statup/core.InitApp()
        /ext-go/1/src/github.com/hunterlong/statup/core/core.go:52 +0x38
github.com/hunterlong/statup/handlers.ProcessSetupHandler(0xb2cf60, 0xc04278c2a0, 0xc04277c500)
        /ext-go/1/src/github.com/hunterlong/statup/handlers/setup.go:118 +0x847
net/http.HandlerFunc.ServeHTTP(0xae1310, 0xb2cf60, 0xc04278c2a0, 0xc04277c500)
        /usr/local/go/src/net/http/server.go:1947 +0x4b
github.com/gorilla/mux.(*Router).ServeHTTP(0xc0426e35e0, 0xb2cf60, 0xc04278c2a0, 0xc04277c500)
        /ext-go/1/src/github.com/gorilla/mux/mux.go:162 +0xf4
net/http.serverHandler.ServeHTTP(0xc042712680, 0xb2cf60, 0xc04278c2a0, 0xc0427da000)
        /usr/local/go/src/net/http/server.go:2694 +0xc3
net/http.(*conn).serve(0xc0427261e0, 0xb2d6e0, 0xc042768200)
        /usr/local/go/src/net/http/server.go:1830 +0x658
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:2795 +0x282

Restarting the command afterwards gives a similar error

2018/07/02 15:08:04 INFO: Starting Statup v0.28.6
2018/07/02 15:08:04 INFO: Running Database Upgrade from 'upgrade.sql'...
2018/07/02 15:08:04 INFO: Database Upgraded
2018/07/02 15:08:04 WARNING: upper: no more rows in this result set
2018/07/02 15:08:04 WARNING: upper: no more rows in this result set
2018/07/02 15:08:04 WARNING: upper: no more rows in this result set
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x90 pc=0x89a43f]

goroutine 1 [running]:
github.com/hunterlong/statup/core.LoadDefaultCommunications()
        /ext-go/1/src/github.com/hunterlong/statup/core/communication.go:14 +0x4f
github.com/hunterlong/statup/core.InitApp()
        /ext-go/1/src/github.com/hunterlong/statup/core/core.go:52 +0x38
main.mainProcess()
        /ext-go/1/src/github.com/hunterlong/statup/main.go:68 +0x7a
main.main()
        /ext-go/1/src/github.com/hunterlong/statup/main.go:42 +0x136

New type of service check (healthchecks)

Have you ever considered to add a type of service check that receives pings?

It would be nice for services, like a backup task, when finishes it access an endpoint of statup to show everything is ok. When something goes wrong the backup task would ping the endpoint with /fail.

I know you probably want to keep statup simple and this would add complexity, but it's good to have an issue answering this question.

Great job on statup, it's just beautiful!


I think https://github.com/healthchecks/healthchecks does a good job by providing a simple way to do healthchecks the way I mentioned.

Custom service monitors

First off, I know this project is very new, and wanted to say it's been excellent to use so far!

It would be nice to be able to add custom monitor types via the plugin interface (or some other interface). For example, I would like to monitor website load time using Selenium WebDriver. I have written a custom checker for checkup that does what I need, but I would like to do something similar with statup.

This might be out-of-scope for this project, but just wanted to put the idea out there!

[Question] statuspage?

Hi.

Is there possible to post a "statuspage" on the page.
Like as maintenance/or server is down(automatic via APIv2 by uptimerobot?)

Can you show status up/down based on Prometheus metrics?

Hi, this seems like a great project -- nice work. I'm looking for a status page which would query Prometheus and show up/down/maintenance, etc. based on metrics reported to Prometheus from other systems. Is that on your roadmap? I know you can produce prometheus metrics from statup but I'm interested in producing a status page from prometheus queries.

EC2 Instance crash loop

Crashing loop in

I wanted to try this out in the us-east-2 region. I followed the instructions on the AWS EC2 Wiki (https://github.com/hunterlong/statup/wiki/AWS-EC2)

aws ec2 run-instances \
    --image-id ami-cc7a40a9 \
    --count 1 --instance-type t2.nano \
    --key-name MYKEYHERE \
    --security-group-ids sg-mysecuritygroup

I received a response back that the ec2 instance was being created.
I then opened the AWS console to check the status of the creation and get the public IP address.
Attempting http://public_ip_address didn't return anything, so I SSHed into the host:
ssh ubuntu@public_ip_address

Then sudo docker ps shows this:

CONTAINER ID        IMAGE                      COMMAND                  CREATED             STATUS                          PORTS                                      NAMES
b586bf39e56f        hunterlong/statup:latest   "statup"                 10 minutes ago      Restarting (2) 56 seconds ago                                              statup
f82ecfb61f82        jwilder/nginx-proxy        "/app/docker-entrypo…"   10 minutes ago      Up 8 minutes                    0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   nginx
18018fac688f        postgres                   "docker-entrypoint.s…"   10 minutes ago      Up 8 minutes                    5432/tcp                                   postgres_statup

I then checked the logs via docker logs status inside of the host and found this repeating over and over:

goroutine 1 [running]:
github.com/hunterlong/statup/core.LoadUsingEnv(0x1, 0xadf800, 0xcdbd20)
	/ext-go/1/src/github.com/hunterlong/statup/core/configs.go:69 +0x372
github.com/hunterlong/statup/core.LoadConfig(0xc42002604b, 0x4, 0xc4201b9a60, 0x0, 0x0)
	/ext-go/1/src/github.com/hunterlong/statup/core/configs.go:37 +0x2ad
main.main()
	/ext-go/1/src/github.com/hunterlong/statup/cmd/main.go:75 +0x16c
INFO: Starting Statup v0.67
INFO: DB_CONN environment variable was found, waiting for database...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x8ac3f2]

TCP Service not working

As mentioned in #24 I'm deploying a set of microservices - the core product is a multiplayer game and the game itself runs on TCP/UDP port 7777 - no HTTP here. I tried to use the "TCP" service check type but it seems to fail at the domain level.

One of the HTTP services actually works fine using the container name as the domain, this one specifically - I have http://warehouse in the domain field and it successfully resolves the container's internal IP address, as I can see from the error caused by #24:

HTTP Error Get http://warehouse: dial tcp 172.25.0.5:80: connect: connection refused

However, when I set up a service for the game server which is running in the same network as the "warehouse" service, I get this error:

Could not get IP address for domain gamemode, lookup : no such host

The only difference between these configurations on statup is that the gamemode is using "TCP" type and the others use "HTTP". I had a poke around the code and couldn't find anywhere that switches on Service.Type and all the tests target "http" as the type.

I could implement a specific TCP dialing checker and a switch on Service.Type to do either http.Client or net.Dial.

Slack alerting issue

Hi hunterlong,

First of all congrats for your project. It looks promising 👍
I found an issue with Slack. When you have an alert and configured slack limitations / hour alerts it seems alerts are stored in a buffer or something. Even if the service is back to normal the slack alerts are not purged and are sent to slack.
The result is that one hour after an issue you might receive alerts even if it is resolved.

plugin development documentation and examples

Nice project 👍

The statup plugin support looks nice. It would be helpful for Go newcomers or those that aren't familiar with the plugin package in Go, to have some examples and documentation for developing statup plugins.

If you're open to the idea, I'd be more then happy to submit a PR.

[Feature request] Discord integration

Hi!

I'm Developer of a GTAV/FiveM roleplay and we are playing with statup.
Can statup send a call via the Discord Webhook when a service is down?

I don't think that its look like the slack hooks. You just call an URL and send some JSON

{ "username": "StatUp", "message": "Your website is down" }

Redirect after drag and drop

Describe the bug
The cool new drag-n-drop feature has a pretty strange behaviour. After releasing the item I get a redirect to this website: http://www.arbitrary.com/. Not in each case, but the most.

To Reproduce
Steps to reproduce the behavior:

  1. I'm using version: '0.68' from Docker Hub.
  2. In the dashboard I resort the services and get a redirect to http://www.arbitrary.com/

Expected Behavior
No redirect to a unknown website.

Screenshots
![Screenshot](https://user-images.githubusercontent.com/3321255/46212497-6120f400-c336-11e8-8c30-6d0bdd85906e.png

[Feature request] Option to reorder services

It would be nice to be able to reorder the services once they are created. This way it would be easier to group related services in the list.

Another nice feature would be a grouping option with a title for that specific group of services.

Just some suggestions for an already great project! 👍

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.