CastawayLabs / cachet-monitor

Distributed monitoring plugin for CachetHQ
https://castawaylabs.github.io/cachet-monitor/
MIT License
439 stars 127 forks source link

Multiple Monitors #44

Closed thetechgy closed 8 years ago

thetechgy commented 8 years ago

It looks like it's possible to configure multiple monitors from the config file, but I must have something wrong in my syntax (I'm guessing it's brackets). Can you add an example with a config for multiple monitors?

therapy-lf commented 8 years ago

@thetechgy It works for me:

{ "api_url": "your_api_url", "api_token": "token", "insecure_api": false, "monitors": [ { "name": "Common name 1", "url": "http://example.com", "threshold": 80, "metric_id": 1, "component_id": 1, "interval": 60, "timeout": 5, "expected_status_code": 200, "strict_tls": false }, { "name": "Common name 2", "url": "http://example2.com", "threshold": 80, "metric_id": 2, "component_id": 2, "interval": 60, "timeout": 5, "expected_status_code": 200, "strict_tls": false } ], "system_name": "us-bot", "log_path": "/var/log/cachet-monitor.log" }

thetechgy commented 8 years ago

@therapy-lf, that works perfectly - I was missing the comma between the components. Thanks!