Skip to content

Commit a927cdf

Browse files
committed
Added sky-puppy-checker-template to tests and readme
1 parent f3f8ee5 commit a927cdf

File tree

3 files changed

+45
-7
lines changed

3 files changed

+45
-7
lines changed

README.nbs

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ npm install -g sky-puppy
1515
sky-puppy
1616
```
1717

18+
## Checkers
19+
20+
##### Test
21+
- [sky-puppy-checker-template](https://github.com/Phara0h/sky-puppy-checker-template) : A Sky Puppy template to use to create your own checkers
22+
23+
##### HTTP/HTTPS
24+
- request (native)
25+
26+
1827
## Sample Config
1928

2029
Sky Puppy looks for a file called `sky-puppy-config.json` in the folder it is ran at.

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@
3636
"nstats": "^4.1.2"
3737
},
3838
"devDependencies": {
39+
"auto-changelog": "^2.2.0",
3940
"eslint": "^7.8.1",
4041
"eslint-config-prettier": "^6.11.0",
4142
"eslint-plugin-prettier": "^3.1.4",
42-
"prettier": "^2.0.5",
43-
"prettier-eslint": "^11.0.0",
4443
"jsdoc-to-markdown": "^6.0.1",
45-
"auto-changelog": "^2.2.0",
4644
"mdsquash": "^1.0.5",
47-
"postgen": "^4.6.0"
45+
"postgen": "^4.6.0",
46+
"prettier": "^2.0.5",
47+
"prettier-eslint": "^11.0.0",
48+
"sky-puppy-checker-template": "^1.0.1"
4849
}
4950
}

test/sky-puppy-config.json

+31-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
{
2+
"checkers": {
3+
"request": {},
4+
"sky-puppy-checker-template": {
5+
"foo": "bar"
6+
}
7+
},
28
"alerters": {
39
"discord_down": {
410
"uri": "http://127.0.0.1:4270/alert/test",
@@ -139,12 +145,34 @@
139145
"alerter": "discord_healthy"
140146
}
141147
]
148+
},
149+
"sky-puppy-checker-template-test": {
150+
"interval": 2,
151+
"checker": {
152+
"name": "sky-puppy-checker-template",
153+
"settings": {
154+
"bar": "test"
155+
}
156+
},
157+
"expected_response_time": 500,
158+
"alerts": [
159+
{
160+
"type": "down",
161+
"alerter": "discord_down"
162+
},
163+
{
164+
"type": "unhealthy_response_time",
165+
"for": 1,
166+
"alerter": "discord_unhealthy"
167+
},
168+
{
169+
"type": "healthy",
170+
"alerter": "discord_healthy"
171+
}
172+
]
142173
}
143174
},
144175
"skypuppy": {
145176
"version": "1.0.0"
146-
},
147-
"checkers": {
148-
"request": {}
149177
}
150178
}

0 commit comments

Comments
 (0)