Compare commits
9 Commits
v3.0
...
feature/up
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ea950f819 | ||
|
|
0e93d140e8 | ||
|
|
aacd04b2b8 | ||
|
|
3a68b19633 | ||
|
|
423c8d3a23 | ||
|
|
f48b5feb11 | ||
|
|
b7f7f934ec | ||
|
|
927aca5ac0 | ||
|
|
18705d1faf |
20
example.cachet-monitor.service
Normal file
20
example.cachet-monitor.service
Normal file
@@ -0,0 +1,20 @@
|
||||
[Unit]
|
||||
Description=Cachet Monitor
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
#After=mysqld.service
|
||||
#After=postgresql.service
|
||||
#After=memcached.service
|
||||
#After=redis.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Group=root
|
||||
WorkingDirectory=/root
|
||||
ExecStart=/root/cachet-monitor -c /etc/cachet-monitor.yaml
|
||||
Restart=always
|
||||
Environment=USER=root HOME=/root
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
14
example.upstart.conf
Normal file
14
example.upstart.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
description "Cachet Monitor"
|
||||
|
||||
start on startup
|
||||
|
||||
env USER=root
|
||||
env HOME=/root
|
||||
|
||||
setuid root
|
||||
setgid root
|
||||
chdir /root
|
||||
|
||||
script
|
||||
exec cachet-monitor -c /cachet-monitor.json --immediate
|
||||
end script
|
||||
11
readme.md
11
readme.md
@@ -39,6 +39,7 @@ monitors:
|
||||
metric_id: 4
|
||||
|
||||
# custom templates (see readme for details)
|
||||
# leave empty for defaults
|
||||
template:
|
||||
investigating:
|
||||
subject: "{{ .Monitor.Name }} - {{ .SystemName }}"
|
||||
@@ -116,6 +117,14 @@ Environment varaibles:
|
||||
CACHET_DEV set to enable dev logging
|
||||
```
|
||||
|
||||
## Init script
|
||||
|
||||
If your system is running systemd (like Debian, Ubuntu 16.04, Fedora or Archlinux) you can use the provided example file: [example.cachet-monitor.service](https://github.com/CastawayLabs/cachet-monitor/blob/master/example.cachet-monitor.service).
|
||||
|
||||
1. Simply put it in the right place with `cp example.cachet-monitor.service /etc/systemd/system/cachet-monitor.service`
|
||||
2. Then do a `systemctl daemon-reload` in your terminal to update Systemd configuration
|
||||
3. Finally you can start cachet-monitor on every startup with `systemctl enable cachet-monitor.service`! 👍
|
||||
|
||||
## Templates
|
||||
|
||||
This package makes use of [`text/template`](https://godoc.org/text/template). [Default HTTP template](https://github.com/CastawayLabs/cachet-monitor/blob/master/http.go#L14)
|
||||
@@ -184,4 +193,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
SOFTWARE.
|
||||
|
||||
Reference in New Issue
Block a user