endstat/config/endstat_conf.example.ron

45 lines
1.9 KiB
Text
Raw Normal View History

2019-05-01 16:37:22 -07:00
#![enable(implicit_some)]
(
refresh_time: 60,
bind_address: "0.0.0.0:8080",
websites: [
(
label: "Basic usage",
endpoints: [
(label: "Supports HTTPS", endpoint: "https://example.com"),
(label: "Supports HTTP", endpoint: "http://example.com"),
(label: "Supports no redirection", endpoint: "http://google.com", code: 301, follow_redirects: false),
]
),
(
label: "More features!",
base: "http://portquiz.net/",
endpoints: [
(label: "You can even set a base url"),
(label: "Or use different ports", port: 8080),
],
),
(
label: "Even more stuff!",
endpoints: [
(label: "Or expect different reponse codes (like 418)", endpoint: "http://error418.net/", code: 418),
(label: "Or response checking!", endpoint: "http://urlecho.appspot.com/echo", body: "None"),
2019-05-02 00:21:18 -07:00
(label: "Or response hash comparison!", endpoint: "http://urlecho.appspot.com/echo", body_hash: "dc937b59892604f5a86ac96936cd7ff09e25f18ae6b758e8014a24c7fa039e91"),
(label: "Or a combination!", endpoint: "http://urlecho.appspot.com/echo?status=503&Content-Type=text%2Fhtml&body=None", body: "None", code: 503),
(label: "Or expect the endpoint to fail entirely!", endpoint: "http://lol.arpa", should_err: true),
2019-05-01 16:37:22 -07:00
],
),
(
label: "Some error messages",
endpoints:[
(label: "The code doesn't match!", endpoint: "http://example.com/", code: 204),
(label: "The body doesn't match!", endpoint: "http://example.com/", body: "asdf"),
2019-05-02 21:40:34 -07:00
(label: "Slow reponse time", endpoint: "http://slowwly.robertomurray.co.uk/delay/2000/url/", max_rtt: 1337),
(label: "Plethora of issues!", endpoint: "http://slowwly.robertomurray.co.uk/delay/1000/url/", body: "asdf", code: 418, max_rtt: 50),
(label: "Here's an error:", endpoint: "https://some-invalid-website.arpa")
2019-05-01 16:37:22 -07:00
]
),
]
)