
Show HN: Host your status page on GitHub - jayfk
https://github.com/pyupio/statuspage
======
wanda
I use Github Pages for my status page too.

Not something I use for websites/web apps I develop for clients, but for my
own irrelevant website, I go as far as to cheat and use the following:

    
    
        <img src="https://des.tination.server/img/1px.gif" 
             onload="statusOk()"
             onerror="statusDown()" 
             alt="">
    
        <script>
    
          function statusOk()
          {
            // do something involving green and check marks
          }
    
          function statusDown()
          {
            // do something involving red... and crosses
          }
    
        </script>
    

(Obviously you have to prevent caching)

~~~
computer
People usually don't go to a status page to see if a page is reachable from
their computer. They know that already. They want to know if it's a global
issue, and if the company is aware that it's down, and when it will be back
up.

~~~
BorisMelnik
good point, in our situation people check to see if the mail server is down
etc

~~~
andreasklinger
for more complex usecases you could load an api status json endpoint instead

------
ThePhysicist
You could also poll the Github API direclty on the client side via
Javascript/jQuery (without giving the client an access token obviously) to
display the status information, like that you could simply update issues on a
public Github repo and the information would change accordingly on the site.
With proper E-Tag checking, Github won't even count repeated API queries
against the rate limit, which means that you could have the client
automatically update the information in the frontend every few seconds.

With Gitboard I use the Github API in this way to display issues in a Kanban
board, which works really nicely:
[https://adewes.github.io/gitboard](https://adewes.github.io/gitboard)

~~~
vmorgulis
Very cool idea!

> ... With proper E-Tag checking, Github won't even count repeated API queries
> against the rate limit ...

Does this behavior rely only on the browser side? Did you add something in
javascript?

~~~
ThePhysicist
You need to pass the ETag header in the Ajax request, though jQuery might do
this automatically (have a look at the utils.js in Gitboard:
[http://github.com/adewes/gitboard](http://github.com/adewes/gitboard)). As
long as you set it and the data is unchanged you can poll for it as often as
you want, which us perfect to watch for changes.

~~~
mwpmaybe
jQuery doesn't automatically attach the ETag, but the browser does.

~~~
vmorgulis
So etags should work with JSONP call...

I found that:

[http://fitzgen.github.io/github-api/](http://fitzgen.github.io/github-api/)

~~~
ThePhysicist
I think you don't even need JSONP, just make sure to set the cross-domain
headers and it should work.

------
herbst
Github recently is more offline than my Servers. Not sure if that would really
help.

~~~
brink
At the exact same time, too?

~~~
herbst
Well given the amount both are offline recently, it could have happened.

------
jon-wood
Keep in mind this is at its core just a static site generator, there's nothing
stopping you from pushing the generated site to S3, or even just a random
server, and hosting it there instead if you don't like Github's uptime.

~~~
IgorPartola
There is one thing. Updates to S3 files are not atomic. That is, if you update
a file, you may still get an old version of it for a time. Same with deletes.
The only atomic operation it supports is creating a new object.

~~~
cyphar
I'm not sure you mean atomic, unless you've seen cases where the file you get
from S3 is a mix of the old and new version. Did you mean consistent (which is
what you describe)?

~~~
dchest
If you update index.html and style.css, GitHub pages will apparently publish
them simultaneously (atomically), but with S3 you upload index.html, then
style.css — one of them will be "published" later than the other.

(Analogy: GitHub pages is like creating a new directory, putting files there,
then renaming the directory to the old name; S3 — putting files into the old
directory.)

------
donnfelker
Personally I prefer a service like [http://status.io](http://status.io) \-
it's one less thing I need to maintain/etc.

Not to mention GitHub has had more than its fair share of outages.

------
jbrooksuk
Wow...

This looks _very_ similar to Cachet [1]. Did you take inspiration from it?

[1] [https://cachethq.io](https://cachethq.io)

~~~
jbrooksuk
Anyway, it's a clever idea but GitHub itself suffers a lot of outages. Is this
a good idea?

~~~
lordlarm
99.9% uptime for the last month [1] doesn't qualify as "a lot of outages" in
my opinion.

[1]:
[https://status.github.com/graphs/past_month](https://status.github.com/graphs/past_month)

~~~
BillinghamJ
They seem to be a significant target for DDOS attacks, which seem to have been
quite frequent.

That uptime measure is for the application server, which I suspect does not
include GitHub Pages which is hosted separately on static content servers.

Lastly, 99.9% uptime over a month means 43 minutes of downtime. To me, that
sounds like quite a lot.

~~~
darrenkopp
The likelyhood that you have downtime at the exact same time GitHub does is
fairly low though.

------
alexcroox
Are there any decent open source status page systems that do the monitoring
for you? I'm just looking for a basic ping or JSON response to automatically
update the page for me. I'd like for the page to show there's a problem before
I manually work it out for myself!

~~~
jbrooksuk
If you install Cachet [1] you can install Cachet Monitor [2] which can monitor
URLs for you!

[1] [https://cachethq.io](https://cachethq.io)

[2] [https://github.com/castawaylabs/cachet-
monitor](https://github.com/castawaylabs/cachet-monitor)

~~~
alexcroox
Nice, thank you!

------
javery
But seriously - statuspage.io is amazing for this and super cheap.

~~~
jakejohnson
StatusPage.io is nice but they charge $99/mo for custom CSS and $399/mo for
custom HTML. I don't see that as being cheap.

------
bliti
I built a static status page that you can host anywhere. I use it for various
systems. Its ugly, but works as required. Uses bootstrap and jquery. so you
can go crazy with it. Everything is self contained. No need to maintain it.
Does need an endpoint for the status page to ping. YMMV.

[https://github.com/bliti/status-page](https://github.com/bliti/status-page)

------
stanislavb
And here it is a follow-up post with some shared experience:
[https://medium.com/@stanbright/how-to-set-up-a-free-
status-p...](https://medium.com/@stanbright/how-to-set-up-a-free-status-page-
on-github-5fc92f63d0f6#.amipcrr73)

------
iqonik
Nice "hack". I'm using statuspage.io for the notification side of things but
can see why this is a very decent free alternative.

------
capote
Host my status page on a site that is down about half the time? Hah

~~~
WillAbides
0.0899% == half

~~~
capote
Yeah, that's several orders of magnitude closer to half than I expect it to
be.

