Coder Social home page Coder Social logo

jayfk / statuspage Goto Github PK

View Code? Open in Web Editor NEW
3.9K 39.0 186.0 1.66 MB

A statuspage generator that lets you host your statuspage for free on Github.

Home Page: https://corestatus.io

License: MIT License

Python 88.89% HTML 11.11%
statuspage monitoring generator

statuspage's Introduction

We are currently alpha-testing a fully automated statuspage GitHub app. Check out corestatus.io if you like to test it out.

Statuspage

ci codecov.io

A statuspage generator that lets you host your statuspage for free on GitHub. Uses issues to display incidents and labels for severity.

Demo

DEMO

See a real status page generated by this here demo site

Quickstart

Install statuspage with pip:

pip install statuspage

There are also binaries for macOS and Linux available, see installation for more.

Now, create an GitHub API token:

  • Go to your Personal Access tokens page.
  • Click on Generate new token.
  • Make sure to check the public_repo and write:repo_hook scope.
  • Copy the token somewhere safe, you won't be able to see it again once you leave the page.

To create a new status page, run:

statuspage create --token=<yourtoken>

You'll be prompted for a repo name and the systems you want to show a status for.

Name: mystatuspage
Systems, eg (Website,API): Website, CDN, API

Please note: This will generate a new repo under that name. Make sure it doesn't exist already.

The command takes a couple of seconds to run. Once ready, it will output links to the issue tracker and your new status page.

Create new issues at https://github.com/<login>/mystatuspage/issues
Visit your new status page at https://<login>.github.com/mystatuspage/

The generator will then print the statuspage update command filled with all the details you need to update your page.

Create an issue

To create a new issue, go to your newly created repo and click on New Issue.

  • Click on the cog icon next to labels on the right.
  • Choose the affected systems (black labels)
  • Choose a severity label (major outage, degraded performance, investigating)
  • Fill in the title, leave a comment and click on Submit new issue.

Add New Issue

Now, update your status page. Go back to your commandline and type:

statuspage update --token=<yourtoken>
Name: mystatuspage

If you change the issue (eg. when you add a new label, create a comment or close the issue), you'll need to run statuspage update again.

Adding and removing systems

In order to add or remove a system, run:

statuspage add_system --token=<token> --name=<repo> --system=<system to add>
statuspage remove_system --token=<token> --name=<repo> --system=<system to remove>

Upgrading from previous versions

First, install the latest version with pip, or grab the latest binary:

pip install statuspage --upgrade

Updating your page to the latest version is now as simple as running:

statuspage upgrade --token=<token> --name=<repo>

followed by an update:

statuspage update --token=<token> --name=<repo>

Translations

The generated status page is translated via JavaScript on the client side using webL10n. It detects the visitors preferred language and translates all strings automatically.

Translations are available for the following languages:

  • en
  • bg
  • de
  • kr
  • nl
  • pt
  • es
  • ru
  • fr
  • pl
  • zh-HK
  • zh-TW
  • zh-CN
  • it
  • fur
  • vn

Want to add a translation? Open translations.ini and add it. Pull requests welcome!

Customizing

Want to change styles, the logo, or the footer? Check out customizing.

Options

Want to create a status page for an organisation, or a private one? See options.

statuspage's People

Contributors

binc0 avatar chenrui333 avatar codepaws avatar codyaray avatar dzhoz0 avatar fleuryk avatar geertw avatar greyarch avatar imkarthikk avatar jakirkham avatar jayfk avatar lirantal avatar marcel-dias avatar martignoni avatar mrrsm avatar nico01f avatar orels1 avatar pasuder avatar peterdavehello avatar pierrelvx avatar pnlmon avatar pyup-bot avatar sobolevn avatar yanrosiiko 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

statuspage's Issues

Automated builds based on travis

Love the idea and project. I was wondering if it makes sense to move the build/deploy process to travis instead? I do the same at hackercouch and it currently runs the deploy on every commit to master.

In order to keep it updated, we also use nightli.es as a backup. Thinking if would be possible to pipe the github event for issues.* on the repo to trigger a build in travis.

Support basic Mardown formatting

It'd be nice and useful to support basic formatting such as bold and italic.

Right now, if these are used in the Github issues, we get raw text on the status page.

New release?

The first tag here appears to be unusable as one cannot run statuspage update. Could we have a new tag that points out a more usable commit?

Could need some a11y love

The difference between "operational" and "outage" is (visually) heavily based on red/green which might be harder to use for people with (so called) color blindness.

I'll see if i find the time to make an alternate suggestion via pull request.

screenshot 2016-03-09 11 40 43

(Color Oracle for Mac Screenshot)

btw: great project!

No resolved status

I installed the system yesterday, everything is running fine but I have no label for "resolved" status. Is there any way I can add this status in manually?

Problems with umlauts

Is it possible that the new version of the script doesn't like letters like ä, ö, ü, ß and so on? I noticed further problems when I wanted to use them in issues or e.g. in the config.json.
I also got similar problems using a copyright-character.

Here you can find a screenshot of the error I get everytime when I try to use characters like the ones I mentioned above. Maybe you could help out, @jayfk?
unbenannt

certificate verify failed

When try to create a new status page, i get this message:

Traceback (most recent call last):
  File "<string>", line 233, in <module>
  File "site-packages/click/core.py", line 716, in __call__
  File "site-packages/click/core.py", line 696, in main
  File "site-packages/click/core.py", line 1060, in invoke
  File "site-packages/click/core.py", line 889, in invoke
  File "site-packages/click/core.py", line 534, in invoke
  File "<string>", line 47, in create
  File "<string>", line 155, in run_create
  File "github/AuthenticatedUser.py", line 542, in create_repo
  File "github/Requester.py", line 171, in requestJsonAndCheck
  File "github/Requester.py", line 212, in requestJson
  File "github/Requester.py", line 251, in __requestEncode
  File "github/Requester.py", line 275, in __requestRaw
  File "http/client.py", line 1083, in request
  File "http/client.py", line 1128, in _send_request
  File "http/client.py", line 1079, in endheaders
  File "http/client.py", line 911, in _send_output
  File "http/client.py", line 854, in send
  File "http/client.py", line 1237, in connect
  File "ssl.py", line 376, in wrap_socket
  File "ssl.py", line 747, in __init__
  File "ssl.py", line 983, in do_handshake
  File "ssl.py", line 628, in do_handshake
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:646)
statuspage returned -1

Timezone problems?

Hi,

I'm French and it seems that when I update my status page with new issues : the issues are not on my server's timezone.

(Seems that the default timezone used is UTC instead of UTC+2).

Thanks,
Halfman.

Not loading in Microsoft Edge

The demo status page doesn't appear to work in Microsoft Edge on Windows 10.
http://status.pyup.io/

I haven't installed the tool so I don't know if that's been fixed.

When I look in the dev console of the browser I see that the page keeps requesting the GitHub API in an infinite loop, apparently.

And a notice is shown together with each request:

Lockr didn't successfully save the '{https://api.github.com/repos/jayfk/status.pyup.io/issues?state=all&sort=created&direction=desc: [object Object]}' pair, because the localStorage is full.

unable to create, error is coming

When I run the command, this error was coming:

statuspage create --token=dceb9fa24bf8558d01d34308cffe
-bash: /usr/local/bin/statuspage: cannot execute binary file: Exec format error

then i use the command with sudo
sudo statuspage create --token=dceb9fa24bf8558d01d3430
/usr/local/bin/statuspage: 1: /usr/local/bin/statuspage: Syntax error: "(" unexpected

Allow better translations

I've tried to translate the status page and find this issues:

  • The word operational is hard-coded. It would be nice if it would be in the template.html.
  • Renaming tags has no impact

It would be nice if this would be possible. Unfortunately I know too little about python.

Binary doesn't works on Debian 8

Hi,

I had to clone the repo and build it on Debian to make it work. The binary given in the Readme seems to be compatible for OSX only.

Regards,
Halfman.

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 56487: character maps to <undefined>

So I was running the command to create a status page (statuspage create --token=<insert my token here>)

And during the setup process, it suddenly stopped and gave me this error:

Traceback (most recent call last):
  File "C:\Users\Acer\AppData\Local\Programs\Python\Python35-32\Scripts\statuspage-script.py", line 9, in <module>
    load_entry_point('statuspage==0.8.1', 'console_scripts', 'statuspage')()
  File "c:\users\acer\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\acer\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 696, in main
    rv = self.invoke(ctx)
  File "c:\users\acer\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\acer\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\acer\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "c:\users\acer\appdata\local\programs\python\python35-32\lib\site-packages\statuspage\statuspage.py", line 65, in create
    run_create(name=name, token=token, systems=systems, org=org, private=private)
  File "c:\users\acer\appdata\local\programs\python\python35-32\lib\site-packages\statuspage\statuspage.py", line 276, in run_create
    content=f.read(),
  File "c:\users\acer\appdata\local\programs\python\python35-32\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 56487: character maps to <undefined>

I am on a Windows 32 bit machine running Windows 10 and using Python 3.5.0 32 bit.

Please provide some help as soon as possible.
Thank you.

Simpel comment

Hi @jayfk, you had the good idea of using gh to host your status page, but if I need a remote vps or whatever to generate the code and git push, I could directly host http://www.stashboard.org on my vps.

Why dont you take a different approach and write a all-javascript app that parses the issues from, let's say, https://api.github.com/repos/jayfk/statuspage-demo/issues and displays them like you are doing with statuspage?
You would be using gh's issues manager like in your current app, but everything would be hosted on gh.

Hope this helps, thanks.

HTTPS on Custom Domain

Hi,

Noticed your documentation went all the way up to using custom domains w/ Github Pages. However, there's one more pretty important step that you might have missed out - Getting to HTTPS with the custom domain.

How about LetsEncrypt with Kloudsec CDN?

Full disclosure: I work at Kloudsec

Customizing navbar

Would be neat if we could override the navigation bar used on the status page via config.json and maybe some custom HTML file we include. This would be handy when trying to make it easy to get back to other pages accessible from the home page. Also it would help make the status page feel more similar to the home page.

How to change the names of the labels?

I wondered how it is possible to change the names of the issue labels. I wanted to translate my statuspage to another language, but I wasn't able to figure out, how to change the names of the labels "major outage" and "degraded performance". Any clues how to do that?

Don't update when nothing changes

I'm running statuspage update in a cronjob, but the repo keeps being updated even when nothing changed. It would be nice if a check would be built-in to see if something actually changed.

pip installable/setup.py?

I'm wondering if there is a reason not to make this pip-installable or at least have a setup.py file. While I can see this can be installed as a binary and that can have certain advantages, it also presents certain challenges. For instance, what if someone does not want a lighter weight solution, requires building from source, or desires to install this into an existing dev environment (e.g. virtualenv or similar). The current packaging solution makes any of these latter goals challenging if not impossible to solve. Is this a matter of preference, available time, interest, something else and/or combinations of the aforementioned?

Groups

It would be nice to group servers based on their services. Maybe use pipes? For example:

  • kvm|kvm01-rot01
  • kvm|kvm02-rot01
  • web|web01-rot01

Help Needed

G'day there Jay,

Look i'm so sorry to be a pest with this issue but I am needing some help with the installation of the statuspage.
I have done alot of searching and it is the best solution for what I require and I would love it if you could lend us a hand with the setup with hosting the statuspage on github.
Again sorry to be a pain, I really hope you can get back to me as soon as possible.

Thanks!

Ability to add more services

I have tried adding more labels, so I guess it isn't possible?

// EDIT: I haven't tried manually adding them to the index.html, so maybe that'll work. Just depends on if they stick after updating.

Add a config file

Currently, the only way to customise the generated status page is to edit template.html. That's a bit problematic, because there will be changes in upcoming releases that may alter template.html.

Sorting

Currently, systems aren't being sorted. It would be nice if they would be sorted alphabetically.

image

Not selecting severity while creating an issue causes exception

Thanks a lot for this great utility.

I was just was trying to use statuspage (statuspage==0.8.1). Found that I ran into following exception when trying to run statuspage update.

Generating..
Traceback (most recent call last):
  File "/Users/sandeep/bin/virtualenv/hbank12sep2016/bin/statuspage", line 11, in <module>
sys.exit(cli())
  File "/Users/sandeep/bin/virtualenv/hbank12sep2016/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/Users/sandeep/bin/virtualenv/hbank12sep2016/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/Users/sandeep/bin/virtualenv/hbank12sep2016/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/sandeep/bin/virtualenv/hbank12sep2016/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/sandeep/bin/virtualenv/hbank12sep2016/lib/python2.7/site-packages/click/core.py", line 534, in invoke
  return callback(*args, **kwargs)
  File "/Users/sandeep/bin/virtualenv/hbank12sep2016/lib/python2.7/site-packages/statuspage/statuspage.py", line 73, in update
run_update(name=name, token=token, org=org)
  File "/Users/sandeep/bin/virtualenv/hbank12sep2016/lib/python2.7/site-packages/statuspage/statuspage.py", line 200, in run_update
"systems": systems, "incidents": incidents, "panels": panels, "config": config
  File "/Users/sandeep/bin/virtualenv/hbank12sep2016/lib/python2.7/site-packages/jinja2/environment.py", line 989, in render
return self.environment.handle_exception(exc_info, True)
  File "/Users/sandeep/bin/virtualenv/hbank12sep2016/lib/python2.7/site-packages/jinja2/environment.py", line 754, in handle_exception
reraise(exc_type, exc_value, tb)
  File "<template>", line 38, in top-level template code
jinja2.exceptions.UndefinedError: 'None' has no attribute 'capitalize'

I read through the code and figured that this will happen if severity labels are not selected while creating an issue. Thus severity will be None when being evaluated in template.html and causes an exception when trying to evaluate severity.capitalize. It might be a good idea to check this in the code and give a more user friendly message.

Being able to remove isses

I would like to be able to remove an issue. I've created some test issues, but as you might knw it isn't possible to remove any issues on GitHub itself. Maybe create an extra label called "removed" or "hidden"?

UnicodeDecode Error

Got this problem when I tried to update an issue with a new comment:

Traceback (most recent call last):
  File "/Users/yash/.pyenv/versions/2.7.10/bin/statuspage", line 11, in <module>
    sys.exit(cli())
  File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/statuspage/statuspage.py", line 73, in update
    run_update(name=name, token=token, org=org)
  File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/statuspage/statuspage.py", line 211, in run_update
    if is_same_content(content, base64.b64decode(index.content)):
  File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/statuspage/statuspage.py", line 478, in is_same_content
    return sha1(c1).hexdigest() == sha1(c2).hexdigest()
  File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/statuspage/statuspage.py", line 476, in sha1
    c = c.encode("utf-8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf0 in position 2735: ordinal not in range(128)

Add organisation support

I tried but it blew up. It shouldn't take much to be able to create the repo under a specified organisation, rather than under an individual account.

Rendering GitHub Markdown in log

The activity log appears to be shown in plain text. It would be nice if we could render this in GitHub Markdown. This should help various Markdown elements look nicer and be easier to read on the webpage.

How to delete services?

Hello!
I just wondered how to delete old services, that aren't eisting anymore. I've got a statuspage displaying the statuses of three services, but I don't offer one of those any longer, so I wanna remove it from my statuspage. How can I do that?

Greetings

Email notifications?

Hey,
love what you did! I'm not using it yet but plan on doing it very soon. One thing that is missing IMHO is the ability to subscribe via email to the status updates. I know this is hosted on GitHub pages, so this is a bit tricky. Here is an idea I had. It's a bit hacky, I must admit, and totally incomplete.

  • Have an RSS feed of the incidents
  • Have a MailChimp account, or something similar, and integrate it with statuspage
  • Have something that sends email for new RSS entries

I looked at the MailChimp "RSS to email" feature, but it's not fast enough, it would be a day late, that's useless. It doesn't look like it's possible with IFTTT or Zapier, but I might have missed something.

It would be easy to host a service doing that, but I would prefer not to have to host an app to do that, but have something easy.

Maybe there is nothing that fits the vision you have, but I thought I would share my thoughts and maybe someone can complete those and we can come up with a decent solution :)

Cheers

Status Page for Dummies !

Hey, I would like to put a status page on my website which is on a shared hosting. It is a linux server. Actually there is no need for a status page but I would like to keep one as to make it more professional. So can I do this on shared hosting server ?

Scheduled Downtime

I'd like to be able to specify a time in the future for when scheduled maintenance to occur. I'd want it to automatically switch to a status message at a given time. Perhaps this would work best with the upcoming version based on the github API.

Error while upgrading with 0.3 pre-release

I've tried to upgrade the statuspage with the 0.3 pre release but stumbled upon this error:

$ ./statuspage upgrade --name=StatusPage --token=...
Editing files:  50%|█████████████████████████████████████████▌                                         | 1/2 [00:01<00:01,  1.85s/it]Traceback (most recent call last):
  File "<string>", line 193, in <module>
  File "site-packages/click/core.py", line 716, in __call__
  File "site-packages/click/core.py", line 696, in main
  File "site-packages/click/core.py", line 1060, in invoke
  File "site-packages/click/core.py", line 889, in invoke
  File "site-packages/click/core.py", line 534, in invoke
  File "<string>", line 61, in upgrade
  File "<string>", line 87, in run_upgrade
  File "github/Repository.py", line 1218, in get_file_contents
  File "github/Requester.py", line 171, in requestJsonAndCheck
  File "github/Requester.py", line 179, in __check
github.GithubException.UnknownObjectException: 404 {'documentation_url': 'https://developer.github.com/v3', 'message': 'Not Found'}
statuspage returned -1

Link issue/comments from status log

In the status log, it would be nice if there were links to the underlying issues/comments. So one could click on that element in the log and be taken to the original issue/comment.

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.