statibus | Minimalistic Status Page

Well, I needed a self hosted status page, without any bloat, it needs to be fast and easy to deploy.
Supports Ping, Port and HTTP checks with custom http codes + 60s or 30s check intervals.

It does run on rqlite instead of MySQL, which is basically sqlite but with a shiton of neat features.
You can find it here: https://github.com/rqlite/rqlite

Here is a demo: https://statibus.x8e.net
Here is the code: https://github.com/Ne00n/statibus

May you give me some feedback.
Amen.

«1

Comments

  • @Neoon said:
    May you give me some feedback.

    I haven't tried it myself yet (obviously), but I already have tears of joy in my eyes because of...

    Handmade css, no framework, about 2kb
    Zero Javascript
    
    Thanked by (3)Neoon bugrakoc AlwaysSkint

    dnscry.pt - Public DNSCrypt resolvers hosted by LowEnd providers • Need a free NAT LXC? -> https://microlxc.net/

  • Cool! good job on what you do.
    cant wait to finish mine :D

    Thanked by (1)Neoon
  • Looks really cool, nice work dude B)

    Thanked by (1)Neoon

    Greetings from 🇩🇪 North Rhine-Westphalia, Xenic.

  • MasonMason AdministratorOG

    Dope, looks great! Thanks for sharing.

    Feature request: stack multiple monitors into a group of sorts rather than one continuous list.

    Thanked by (1)Neoon

    Head Janitor @ LES • AboutRulesSupportDonate

  • Looks nice! Any plans for a Docker version? And perhaps notifications via email, telegram etc or an old skool RSS feed?

    Thanked by (1)Neoon
  • YmpkerYmpker OGContent Writer

    Looking nice. Thanks!

    Thanked by (1)Neoon
  • Never knew bout rqlite. Thanks

    Also thanks for your project.

    Thanked by (1)Neoon
  • NeoonNeoon OG
    edited January 2021

    @Mason said:
    Dope, looks great! Thanks for sharing.

    Feature request: stack multiple monitors into a group of sorts rather than one continuous list.

    I added groups, check out the updated version: https://statibus.x8e.net/
    Kinda essential so added.

    @Freek said:
    Looks nice! Any plans for a Docker version? And perhaps notifications via email, telegram etc or an old skool RSS feed?

    I am not a docker friend, if you want to make a docker version you can do that for sure.
    Basic email notifications for the webmaster are planned yea but not such as subscribe for outages.

    Maybe even a rss or json feed for the public.

    Thanked by (1)Mason
  • ehabehab Content Writer

    @Neoon said:
    I am not a docker friend,

  • @ehab said:

    @Neoon said:
    I am not a docker friend,

    Thanked by (1)ehab
  • ehabehab Content Writer

    ok ok i will shut up

  • Looks nice. I'll try to deploy one.

    @Neoon said:
    Supports Ping, Port and HTTP checks with custom http codes + 60s or 30s check intervals.

    UptimeRobot has keyword check that I often use. It retrieves a URI, and alerts if the response contains / does not contain a particular string.

    Webhosting24 aff best VPS; ServerFactory aff best VDS; Cloudie best ASN; Huel aff best brotein.

  • @yoursunny said:
    Looks nice. I'll try to deploy one.

    @Neoon said:
    Supports Ping, Port and HTTP checks with custom http codes + 60s or 30s check intervals.

    UptimeRobot has keyword check that I often use. It retrieves a URI, and alerts if the response contains / does not contain a particular string.

    Sounds easy but what do you do, when the said page is down? Also trigger an alert?

  • @Neoon said:

    @yoursunny said:
    Looks nice. I'll try to deploy one.

    @Neoon said:
    Supports Ping, Port and HTTP checks with custom http codes + 60s or 30s check intervals.

    UptimeRobot has keyword check that I often use. It retrieves a URI, and alerts if the response contains / does not contain a particular string.

    Sounds easy but what do you do, when the said page is down? Also trigger an alert?

    UptimeRobot would also trigger an alert when the URI is not retrievable (connection timeout).
    I use this feature to monitor NDN forwarder status pages. For example, https://savi.testbed.named-data.net (it's an XML document with XSLT) would contain the string "/yoursunny/pushups" if at least one of my repository replicas is connected, so I configure a keyword monitor to tell me when the string disappears.

    Webhosting24 aff best VPS; ServerFactory aff best VDS; Cloudie best ASN; Huel aff best brotein.

  • NeoonNeoon OG
    edited January 2021

    @yoursunny said:

    @Neoon said:

    @yoursunny said:
    Looks nice. I'll try to deploy one.

    @Neoon said:
    Supports Ping, Port and HTTP checks with custom http codes + 60s or 30s check intervals.

    UptimeRobot has keyword check that I often use. It retrieves a URI, and alerts if the response contains / does not contain a particular string.

    Sounds easy but what do you do, when the said page is down? Also trigger an alert?

    UptimeRobot would also trigger an alert when the URI is not retrievable (connection timeout).
    I use this feature to monitor NDN forwarder status pages. For example, https://savi.testbed.named-data.net (it's an XML document with XSLT) would contain the string "/yoursunny/pushups" if at least one of my repository replicas is connected, so I configure a keyword monitor to tell me when the string disappears.

    I added it, currently in experimental branch, which the demo is running on.
    https://github.com/Ne00n/statibus/tree/experimental
    Works basically this way:

    php cli.php service add 1 Website http https://www.worldometers.info/coronavirus/ 2 200 corona

    no timeout + status code or list of status codes need to match and your keyword if you specify it.

    Thanked by (1)yoursunny
  • Small update, a few bug fixes + css fixes for mobile including db init.
    Will add a rss feed later and external checks also some CI, which is needed.

  • @Freek said:
    Looks nice! Any plans for a Docker version? And perhaps notifications via email, telegram etc or an old skool RSS feed?

    I am not a docker friend, if you want to make a docker version you can do that for sure.
    Basic email notifications for the webmaster are planned yea but not such as subscribe for outages.

    Maybe even a rss or json feed for the public.

    Alright, I put it on my to-do list :)

  • MichaelCeeMichaelCee Hosting ProviderOGServices Provider

    Good design. Nice and compact. My current one thinks it's a good idea to have the page scroll and scroll and scroll but I like the data for each server being on the same line. Good job.

  • Kudos on another quality project Neoon ;)

  • I got it installed in two Docker containers. It seems that the cron/uptime.php requires bcmath extension, which is not in the official php:7-alpine image but can be added.
    I don't have a Dockerfile yet - I just typed the commands one by one.

    I hope cli.php group list and cli.php service list commands can output in JSON format instead of print_r format, so that I can automate the setup using jq.
    Alternatively, cli.php group delete and cli.php service add and cli.php service delete commands should accept names in place of IDs.

    Webhosting24 aff best VPS; ServerFactory aff best VDS; Cloudie best ASN; Huel aff best brotein.

  • NeoonNeoon OG
    edited January 2021

    @yoursunny said:
    I got it installed in two Docker containers. It seems that the cron/uptime.php requires bcmath extension, which is not in the official php:7-alpine image but can be added.
    I don't have a Dockerfile yet - I just typed the commands one by one.

    Yea the alpine image is a bitch.

    I hope cli.php group list and cli.php service list commands can output in JSON format instead of print_r format, so that I can automate the setup using jq.

    Well yeah I could change it to output json, should be no problem since its readable too.

    Alternatively, cli.php group delete and cli.php service add and cli.php service delete commands should accept names in place of IDs.

    The ID's are unique, the names are not, so doing that would be suicidal.
    Also the ID's are used for JOINS, I cannot remove them however, I would put out a sql migration to make the names UNIQUE.

    Just to be on the safe side so this would be possible, should be easier to use by then.

  • @yoursunny said:

    I got it installed in two Docker containers. It seems that the cron/uptime.php requires bcmath extension, which is not in the official php:7-alpine image but can be added.
    I don't have a Dockerfile yet - I just typed the commands one by one.

    I hope cli.php group list and cli.php service list commands can output in JSON format instead of print_r format, so that I can automate the setup using jq.
    Alternatively, cli.php group delete and cli.php service add and cli.php service delete commands should accept names in place of IDs.

    Are you interested in collaborating to create a Docker image for this?

    Personally I'm not a fan of alpine images because it doesn't use musl. This page sums it up pretty nicely, but of course it depends on your use case; https://pythonspeed.com/articles/alpine-docker-python/

    Thanked by (1)Asim
  • ehabehab Content Writer

    those who complain about alpone image then you can use

    debian:buster-slim

    Thanked by (2)Asim vyas
  • For domain registrations, create an account at Dynadot (ref) and spend $9.99 within 48 hours to receive $5 DynaDollars!
    Looking for cost-effective Managed/Anycast/DDoS-Protected/Geo DNS Services? Try ClouDNS (aff).

  • Update:

    • RSS Feed
    • Groups and Services can be deleted by name
    • Added CI Tests, to improve code quality, PHP 8 looks fine
    • Check if bcmath and curl extension exists if not throws an error
    • list returns a json response
    • some code + css optimizations
    Thanked by (3)Freek yoursunny Asim
  • edited January 2021

    @Neoon said:

    • Groups and Services can be deleted by name
    • list returns a json response

    Great.

    • Added CI Tests, to improve code quality, PHP 8 looks fine

    DYK Travis CI is no longer free?
    If you aren't paying $69/month, you'd better move to GitHub Actions or CircleCI.


    SQL injection everywhere!
    You need Parameterized Statements (since rqlite v5.5.0).
    And no, having a regex is insufficient.

    https://github.com/Ne00n/statibus/blob/945d447851f3d6509aca78730b381c116406b8fa/class/statibus.php#L21

    $response = $this->rqlite->select('SELECT id FROM groups WHERE name="'.$params[3].'"',True);
    

    https://github.com/Ne00n/statibus/blob/945d447851f3d6509aca78730b381c116406b8fa/content/service.php#L9

    $data = $statibus->sql()->select('SELECT * FROM services JOIN uptime ON uptime.serviceID=services.id WHERE services.id='.$serviceID.' ',True);
    
    Thanked by (2)PHP_Backend Asim

    Webhosting24 aff best VPS; ServerFactory aff best VDS; Cloudie best ASN; Huel aff best brotein.

  • NeoonNeoon OG
    edited January 2021

    @yoursunny said:

    @Neoon said:

    • Groups and Services can be deleted by name
    • list returns a json response

    Great.

    • Added CI Tests, to improve code quality, PHP 8 looks fine

    DYK Travis CI is no longer free?
    If you aren't paying $69/month, you'd better move to GitHub Actions or CircleCI.

    They have a free Plan, works for me.
    Migration from .org is still going on, so I expect it to use OOS credits by then.


    SQL injection everywhere!

    No, cli.php is only available to your locally, means only you have access to these commands.
    Additional, every SQL query runs through SQLite3::escapeString.

    You need Parameterized Statements (since rqlite v5.5.0).

    Thanks for letting me know, I will update the class.
    Since this class has been written 1+ year ago, Parameterized Statements where not implemented by rqlite.

  • DYK Travis CI is no longer free?
    If you aren't paying $69/month, you'd better move to GitHub Actions or CircleCI.

    They have a free Plan, works for me.
    Migration from .org is still going on, so I expect it to use OOS credits by then.

    Travis free plan turns out to be 10000 credits one time. When you run out, it'll never be replenished.
    As for OOS credits, you'll have to haggle with support every time you need more credits. It's not recurring.

    SQL injection everywhere!

    No, cli.php is only available to your locally, means only you have access to these commands.
    Additional, every SQL query runs through SQLite3::escapeString.

    What if my group name happen to contain a quotation sign?
    "idle" servers isn't too crazy, where "idle" needs quotation if the servers are only partially idle.

    Since this class has been written 1+ year ago, Parameterized Statements where not implemented by rqlite.

    ?

    Webhosting24 aff best VPS; ServerFactory aff best VDS; Cloudie best ASN; Huel aff best brotein.

  • HxxxHxxx OG
    edited January 2021

    I was about to mention the SQL injections issue. Glad @yoursunny went ahead .

    At least there is a preg match on services.

    Cool stuff @Neoon , thanks for contributing to the community with your projects. You tend to do nice useful stuff. :)

Sign In or Register to comment.