README.md in cronitor-4.1.2 vs README.md in cronitor-5.0.0
- old
+ new
@@ -67,19 +67,22 @@
```ruby
require 'cronitor'
Cronitor.api_key = 'api_key_123'
-# read config file and set credentials (if included).
+# read config file.
Cronitor.read_config('./cronitor.yaml')
# sync config file's monitors to Cronitor.
Cronitor.apply_config
# send config file's monitors to Cronitor to validate correctness.
# monitors will not be saved.
Cronitor.validate_config
+
+# generate a new config file from the Cronitor API.
+Cronitor.generate_config
```
The `cronitor.yaml` file includes three top level keys `jobs`, `checks`, `heartbeats`. You can configure monitors under each key by defining [monitors](https://cronitor.io/docs/monitor-api#attributes).
```yaml
@@ -176,9 +179,14 @@
# your api keys can found here - https://cronitor.io/settings
Cronitor.api_key = 'apiKey123'
Cronitor.api_version = '2020-10-01'
Cronitor.environment = 'cluster_1_prod'
+
+Cronitor.timeout = 20 # defaults to 10 can also be set with ENV['CRONITOR_TIMEOUT']
+Cronitor.logger = nil # defaults to Logger.new($stdout)
+# faster timeout for potentially more time sensitive call
+Cronitor.ping_timeout = 10 # defaults to 5 can also be set with ENV['CRONITOR_PING_TIMEOUT']
```
## Contributing
Pull requests and features are happily considered! By participating in this project you agree to abide by the [Code of Conduct](http://contributor-covenant.org/version/2/0).