Coder Social home page Coder Social logo

shukriadams / arewedown Goto Github PK

View Code? Open in Web Editor NEW
204.0 4.0 22.0 1.06 MB

Simple, customizable HTTP uptime and status checking service.

License: GNU General Public License v3.0

Shell 4.42% JavaScript 86.68% Ruby 0.61% CSS 5.13% Handlebars 2.89% Python 0.27%
uptime-monitor uptime-robot uptime nodejs docker dashboard self-hosted

arewedown's Introduction

Screenshot of AreWeDown?

Are We Down? is a simple uptime monitoring system and dashboard. It is ideal for the home/self-hosting user who runs multiple services/networked devices on a private LAN, and who doesn't want the complexity of an enterprise-level monitoring system. It lets you turn any HTTP endpoint into a status indicator. SSH into things and test that way. Gather all your tests into a single or multiple dashboards. And it's easy to set up.

codecov

Features

  • Simple to configure with just a few lines of text in a single YML file.
  • No databases or dependencies on other services.
  • Does HTTP status checks, ssh, ping, Docker container status and more.
  • Sends alerts via email (SMTP) and Slack.
  • Can be extended with your own test scripts using shell scripts, Javascript (NodeJS) or Python3 scripts.
  • Runs on x86 and ARM (Docker images available for the Raspberry Pi 3 or better).
  • Built-in dashboard will run on almost any browser, ideal for a Raspberry Pi in kiosk mode.

NOTE: Are We Down? has no built-in security, never expose it to the public internet. It is perfectly safe running behind a trusted firewall/router, that is what it was intended for.

Install options

  • Docker - Linux x64 + ARMv7.

  • Binaries - Linux + Windows x64 (these are still experimental).

  • NodeJS source - any OS that supports NodeJS 12.x or better.

Config

The most basic setup of Are We Down? can be done with only

watchers:
    mysite:
        host: http://mysite.example.com

This sets up a single watcher that scans the given domain every minute for HTTP status 200, and displays this on a dashboard. See settings for details.

Transports

Alerts can be sent with the following methods :

  • SMTP (good old email)
  • Slack

Watchers

The following built-in tests are available :

  • HTTP status
  • TCP port open
  • Docker container up
  • Jenkins job passing
  • System.d process status

Custom tests

In addition to using built-in tests, you can also write tests in bash, NodeJS or Python3 if you're more into that sort of thing. For details see custom code tests.

Interested in contributing?

See contributing if you'd like to improve this project.

License

AreWeDown? is available under the GPL3.0 license.

arewedown's People

Contributors

lfoppiano avatar shukriadams 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

arewedown's Issues

Docker continuously restarting, no logs created

I've followed exact steps at https://github.com/shukriadams/arewedown#setup-in-docker on a Raspberry Pi Model B+.

Using with example config files with docker-compose 1.29.2 on docker images 0.2.1-arm and 0.2.0-arm.

Container is created but constantly restarts. No logs are created in the ./logs folder.

CONTAINER ID   IMAGE                             COMMAND                  CREATED         STATUS                            PORTS     NAMES
e9747b77ae2c   shukriadams/arewedown:0.2.0-arm   "/bin/sh -c 'cd /etc…"   3 minutes ago   Restarting (132) 24 seconds ago             arewedown

custom root path

I'm trying to deploy this service under a custom root path e.g. /status on a service. I set up a reverse proxy with Apache HTTPD but I cannot map properly http://mysevice/status because the internal URLs are pointing to /.
Maybe I overlooked and there is a way to specify the custom root path? If not would be a nice addition.

Dashboard memory leak over time

I noticed that if I keep the web page opened for several hours with the "reload" activated, at the beginning the memory footprint is about 400MB while at the end it becomes more than 4GB, forcing to manually refresh the page to drop all those wasted memory.

Maybe there is some kind of memory leak at each "reload"?

Feedback on 0.3.0

I'm testing the version 0.3.0 and I have a couple of comments:

  • when opening the application it redirects to /dashboard instead of /rootpath/dashboard (probably due to the remove of the iframe.js?) If I open directly /rootpath/dashboard it works fine
  • there is no log about the rootpath, I would recommend you to add it when the service starts so that it's possible to have the confirmation the configuration is correct at
    let status = `Are We Down? : Listening on port ${settings.port}`
  • the colors in the dashboard are not 100% readable, I would suggest you to make the rows a bit lighter, thus with a more visible contrast with green and red. This is what i see:

image

Docker 64bit armv8 support

Any plans for this?
I can only see v6 and v7 arm tags on dockerhub
Plan to use this on a 64bit RPI400
Can I just build the Dockerfile?

Feature Request: Shell command alert mechanism

Some mechanism to fire alerts via a shell script could be used to integrate with third party services without necessarily having to support those services directly.

Some use cases I'm thinking of are making a POST using curl to a Unified Push server for mobile push notifications, or the Twilio API for SMS notifications, as a couple simple examples.

Not sure how it would work with the existing config schema... Maybe it wouldn't need explicit recipients. An idea around how to configure might look like this:

transports:
  shell:
    unified-push: curl -XPOST -d "$message" https://my-unified-push-server.com/arewedown
    sms-alert: curl -XPOST -u 'mytwiliosid:mytwiliokey' -d 'From=5557654321' -d 'To=5551234567 -d "Body=$message" https://api.twilio.com/2010-04-01/Accounts/mytwiliosid/Messages

Each alert could loop through them and populate the $message environment variable before firing the command.

This could also potentially cover #17 since I believe Telegram has an http API that could be invoked the same way (maybe using jq in the command to help construct the payload to post and piping that to curl).

Typo

Hello,

First : Thanks for this project !

There is a typo in settings.js

File : src/lib/settings.js
L162 "spit" should be "split".

Best regards

Using SSH keys for checks

I turn off password logins for SSH sessions by default and instead use SSH keys.

I saw that simple-ssh supports the use of keys. Would you consider adding the use of ssh keys or be open to a PR to do so?

From Field via SMTP not populating correctly

Hi @shukriadams ,

I noticed when something get's up or down my email is sent correctly to the recipients. However theres no sender listed when viewing the email.
Outlook is also telling me sender is unknown..

What could be the problem? Can I help in fixing it?

Kind regards,
Capusjon

ICMP (Ping) possible?

As this is meant as an open source Uptime Robot, one of the features I use there very often is just simple ping tests to know if network devices are online or offline, is this possible to add into AreWeDown? If so I'll likely end up using it and ripping out UptimeRobot from my flow.

thanks!

Custom tests

Hi, I'm trying to use custom tests to check whether a service is running.

I tried by probing the ports but it was not working (probably they are not using tcp), so I tried this:

    mongo:
        cmd: pgrep mongod | grep -c -e '[0-9]\+' | grep "1"

    mysql:
        cmd: pgrep mysqld_safe | grep -q -e '[0-9]\+'

but for both of them I get error 1. Any clue?

Docker ARM image not working on QNAP ARM Cortex-A15

Followed setup steps in readme.

[admin@QNAP ~]# docker-compose logs
Attaching to AreWeDown, Portainer
AreWeDown    | terminate called after throwing an instance of 'std::length_error'
AreWeDown    |   what():  basic_string::_M_replace_aux
AreWeDown    | Aborted
AreWeDown    | terminate called after throwing an instance of 'std::length_error'
AreWeDown    |   what():  basic_string::_M_replace_aux
AreWeDown    | Aborted
AreWeDown    | terminate called after throwing an instance of 'std::length_error'
AreWeDown    |   what():  basic_string::_M_replace_aux
AreWeDown    | Aborted
AreWeDown    | terminate called after throwing an instance of 'std::length_error'
AreWeDown    |   what():  basic_string::_M_replace_aux
AreWeDown    | Aborted
AreWeDown    | terminate called after throwing an instance of 'std::length_error'
AreWeDown    |   what():  basic_string::_M_replace_aux
AreWeDown    | Aborted
AreWeDown    | terminate called after throwing an instance of 'std::length_error'
AreWeDown    |   what():  basic_string::_M_replace_aux
AreWeDown    | Aborted
AreWeDown    | terminate called after throwing an instance of 'std::length_error'
AreWeDown    |   what():  basic_string::_M_replace_aux
AreWeDown    | Aborted

OS info:

[~] # uname -a
Linux QNAP 4.2.8 #2 SMP Thu Jul 4 05:26:06 CST 2019 armv7l unknown

Docker compose file:

version: "3"
services:
  portainer:
    container_name: Portainer
    image: portainer/portainer
    restart: always
    ports:
      - "9000:9000"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /share/Docker/portainer:/data

  arewedown:
    image: shukriadams/arewedown:0.2.0-arm
    container_name: AreWeDown
    restart: unless-stopped
    volumes:
    - /share/Docker/arewedown/config:/etc/arewedown/config
    - /share/Docker/arewedown/logs:/etc/arewedown/logs/:rw
    # - ./scripts:/etc/arewedown/custom-tests # optional, see "custom tests" section of documentation
    ports:
      - "3000:3000"

Permissions on logs path:

[admin@QNAP ~]# ls -la /share/Docker/arewedown/logs
drwxr-xr-x    2 1000     administ        40 May 20 22:32 ./
drwxr-xr-x    4 admin    administ        80 May 20 22:32 ../

Settings file (empty as per readme):

[admin@QNAP ~]# ls -la /share/Docker/arewedown/config/
drwxr-xr-x    2 admin    administ        60 May 20 22:37 ./
drwxr-xr-x    4 admin    administ        80 May 20 22:32 ../
-rw-r--r--    1 admin    administ         0 May 20 22:37 settings.yml

SMTP Gmail configuration does not sem to work

Hi,

thanks for your hard work! I just set it up with docker-compose and created settings.yml.

It doesn't seem when a service is down (I only use URL: tag at the moment) that I get an email.

My conf:

transmissions:
    smtp:
        enabled: true
        server: smtp.gmail.com
        port: 465
        secure: true
        user: [email protected]
        pass: GoogleAppPassword
        from: [email protected]

Any tips?

Limit of monitoring?

This looks really interested, is there a limit to the amount of sites that can be monitored?

ping from docker doesn't seem to work.

I configured a few simple ping tests. Docker log and log inside config folder all give me this error:

{"message":"Unhandled exception running \"net.ping\"","stack":"Error: ping.probe: there was an error while executing the ping program. . Check the path or permissions...\n    at ChildProcess.<anonymous> (/etc/arewedown/node_modules/ping/lib/ping-promise.js:61:19)\n    at Object.onceWrapper (events.js:421:26)\n    at ChildProcess.emit (events.js:314:20)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)\n    at onErrorNT (internal/child_process.js:470:16)\n    at processTicksAndRejections (internal/process/task_queues.js:84:21)","level":"error","timestamp":"2022-05-01T16:27:29.917Z"}
{"message":"Unhandled exception running \"net.ping\"","stack":"Error: ping.probe: there was an error while executing the ping program. . Check the path or permissions...\n    at ChildProcess.<anonymous> (/etc/arewedown/node_modules/ping/lib/ping-promise.js:61:19)\n    at Object.onceWrapper (events.js:421:26)\n    at ChildProcess.emit (events.js:314:20)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)\n    at onErrorNT (internal/child_process.js:470:16)\n    at processTicksAndRejections (internal/process/task_queues.js:84:21)\n    at runNextTicks (internal/process/task_queues.js:66:3)\n    at processTimers (internal/timers.js:494:9)","level":"error","timestamp":"2022-05-01T16:28:00.011Z"}
{"message":"Unhandled exception running \"net.ping\"","stack":"Error: ping.probe: there was an error while executing the ping program. . Check the path or permissions...\n    at ChildProcess.<anonymous> (/etc/arewedown/node_modules/ping/lib/ping-promise.js:61:19)\n    at Object.onceWrapper (events.js:421:26)\n    at ChildProcess.emit (events.js:314:20)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)\n    at onErrorNT (internal/child_process.js:470:16)\n    at processTicksAndRejections (internal/process/task_queues.js:84:21)\n    at runNextTicks (internal/process/task_queues.js:66:3)\n    at processTimers (internal/timers.js:494:9)","level":"error","timestamp":"2022-05-01T16:29:00.009Z"}
{"message":"Unhandled exception running \"net.ping\"","stack":"Error: ping.probe: there was an error while executing the ping program. . Check the path or permissions...\n    at ChildProcess.<anonymous> (/etc/arewedown/node_modules/ping/lib/ping-promise.js:61:19)\n    at Object.onceWrapper (events.js:421:26)\n    at ChildProcess.emit (events.js:314:20)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)\n    at onErrorNT (internal/child_process.js:470:16)\n    at processTicksAndRejections (internal/process/task_queues.js:84:21)","level":"error","timestamp":"2022-05-01T17:26:36.354Z"}
{"message":"Unhandled exception running \"net.ping\"","stack":"Error: ping.probe: there was an error while executing the ping program. . Check the path or permissions...\n    at ChildProcess.<anonymous> (/etc/arewedown/node_modules/ping/lib/ping-promise.js:61:19)\n    at Object.onceWrapper (events.js:421:26)\n    at ChildProcess.emit (events.js:314:20)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)\n    at onErrorNT (internal/child_process.js:470:16)\n    at processTicksAndRejections (internal/process/task_queues.js:84:21)\n    at runNextTicks (internal/process/task_queues.js:66:3)\n    at processTimers (internal/timers.js:494:9)","level":"error","timestamp":"2022-05-01T17:27:00.029Z"}

This is the config:

watchers:
      Pihole-raspberryPi:
          test: net.ping
          host: 10.100.10.251

          # optional
          timeout: 10

Am I missing something? What could be the problem?

Kind regards

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.