Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/webkom/census
https://github.com/webkom/census
Last synced: 27 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/webkom/census
- Owner: webkom
- License: mit
- Archived: true
- Created: 2014-08-09T05:42:33.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-11T14:25:53.000Z (almost 9 years ago)
- Last Synced: 2024-08-03T18:13:57.825Z (4 months ago)
- Language: HTML
- Homepage: census.abakus.no
- Size: 50.8 KB
- Stars: 2
- Watchers: 7
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ntnu - census - Simple server status reports (Tools)
README
# census [![Build status](https://ci.frigg.io/badges/webkom/census/)](https://ci.frigg.io/webkom/census/last/) [![Coverage status](https://ci.frigg.io/badges/coverage/webkom/census/)](https://ci.frigg.io/webkom/census/last/)
Headcount for our servers. It is a little web project based on express.js, which
lists servers based on pings to its API. The servers themselves need to report
to be shown in the list. However, it is not necessary to attach more than hostname
and a username in the POST request.If more than 15 minutes pass without a report, your server will show up as dead.
### Reporting
The easiest way to report to Census is to set up a cron job that reports every ten mintues to Census.
```bash
curl -X POST https://census.abakus.no/api/report --data "hostname={hostname}&username={username}"
```## Setup
```bash
git clone [email protected]:webkom/census.git
cd census
npm install
gulp
```### Authentication
This project requires users to be authenticated in order to see info like IP and
servers that does not belong to the organisation. The project uses passport for
authentication. You can easily add you own strategy by setting the environment
variable `PASSPORT_STRATEGY` to a package or path that require can reach. The
strategy needs to be wrapped in a function like [passport-abakus](https://github.com/webkom/passport-abakus/blob/master/index.bs#L4).
The options you want to pass into the function needs to be put into an environment
variable called `PASSPORT_STRATEGY_OPTIONS`## Tests
```bash
npm test
```--------
MIT © webkom, Abakus Linjeforening