Skip to content

Commit 1698149

Browse files
authored
Improve README (#29)
1 parent f81ae2a commit 1698149

1 file changed

Lines changed: 43 additions & 21 deletions

File tree

‎README.markdown‎

Lines changed: 43 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,19 @@ your own custom checks.
1515
For more insight into why we built this, check out [our blog post introducing
1616
OkComputer](http://pulse.sportngin.com/news_article/show/267646?referrer_id=543230).
1717

18-
OkComputer currently fully supports the following Rails versions:
18+
OkComputer supports the following Rails versions, as tested by the CI build matrix:
1919

20+
* 8.1
21+
* 8.0
22+
* 7.2
23+
* 7.1
2024
* 7.0
2125
* 6.1
2226
* 6.0
2327
* 5.2
2428
* 5.1
25-
* 4.2
26-
27-
In addition, the CI tests are passing on, but is not guaranteed to work with, the following Rails versions:
28-
29-
* 8.1
30-
* 8.0
31-
* 7.2
32-
* 7.1
3329
* 5.0
30+
* 4.2
3431
* 4.1
3532
* 4.0
3633

@@ -60,8 +57,43 @@ $ gem install okcomputer
6057

6158
## Usage
6259

63-
To perform the default checks (application running and ActiveRecord database
64-
connection), do nothing other than adding to your application's Gemfile.
60+
Adding OkComputer to your Gemfile mounts its routes at `/okcomputer` and
61+
registers a simple application check named `default`. When ActiveRecord is
62+
loaded, it also registers an ActiveRecord connection check named
63+
`database`. If Sequel is loaded instead, it registers a Sequel database check.
64+
65+
Test the application check without any additional configuration:
66+
67+
```
68+
$ curl http://localhost:3000/okcomputer
69+
default: PASSED Application is running (0.000s)
70+
```
71+
72+
### Endpoints
73+
74+
| Endpoint | Checks performed |
75+
| --- | --- |
76+
| `/okcomputer` | The `default` application check |
77+
| `/okcomputer/database` | The registered `database` check, when present |
78+
| `/okcomputer/all` | All checks and collections in the default collection, except those registered with `skip_all: true` |
79+
| `/okcomputer/:name` | The registered check or collection named `:name` |
80+
81+
A successful check returns HTTP 200. A failed check, or an aggregate containing
82+
a failed check, returns HTTP 500. Requesting an unregistered check returns HTTP
83+
404.
84+
85+
Responses are plain text by default. Append `.json` or send an
86+
`Accept: application/json` header to receive JSON:
87+
88+
```json
89+
{
90+
"default": {
91+
"message": "Application is running",
92+
"success": true,
93+
"time": 0.000123
94+
}
95+
}
96+
```
6597

6698
### If Not Using ActiveRecord
6799

@@ -238,16 +270,6 @@ By default, OkComputer runs checks in sequence. If you'd like to run them in par
238270
OkComputer.check_in_parallel = true
239271
```
240272

241-
## Performing Checks
242-
243-
* Perform a simple up check: http://example.com/okcomputer
244-
* Perform all installed checks: http://example.com/okcomputer/all
245-
* Perform a specific installed check: http://example.com/okcomputer/database
246-
247-
Checks are available as plain text (by default) or JSON by appending .json, e.g.:
248-
* http://example.com/okcomputer.json
249-
* http://example.com/okcomputer/all.json
250-
251273
## OkComputer NewRelic Ignore
252274

253275
If NewRelic is installed, OkComputer automatically disables NewRelic monitoring for uptime checks,

0 commit comments

Comments
 (0)