Skip to content
Snippets Groups Projects

Convert to Golang

Merged Erick Hitter requested to merge develop into master
Files
4
+ 19
10
@@ -3,15 +3,24 @@ Log Alerting
Pipe logs to Mattermost (or Slack) webhooks
# Requirements
## Requirements
* Go 1.8.3
# Installation
1. TBD
<!-- 1. `git clone https://git.ethitter.com/debian/eth-log-alerting.git /usr/local/eth-log-alerting`
2. `cp /usr/local/eth-log-alerting/systemd.service /etc/systemd/system/eth_log_alerting.service`
3. `cp /usr/local/eth-log-alerting/defaults /etc/default/eth_log_alerting`
4. Edit `/etc/default/eth_log_alerting`
5. `systemctl daemon-reload`
6. `systemctl enable eth_log_alerting.service`
6. `systemctl start eth_log_alerting.service` -->
## Installation
1. `git clone https://git.ethitter.com/debian/eth-log-alerting.git /usr/local/bin/eth-log-alerting`
1. `cd /usr/local/bin/eth-log-alerting`
1. `go get github.com/42wim/matterbridge/matterhook`
1. `go get github.com/asaskevich/govalidator`
1. `go get github.com/hpcloud/tail`
1. `go build eth-log-alerting.go`
1. `cp /usr/local/bin/eth-log-alerting/init.sh /etc/init.d/eth-log-alerting`
1. `chmod +x /etc/init.d/eth-log-alerting`
1. `cp /usr/local/bin/eth-log-alerting/config-sample.json /usr/local/bin/eth-log-alerting/config.json`
1. Edit `/usr/local/bin/eth-log-alerting/config.json`
1. If using a different path for your binary or config file, or if running as other than `root`, override the daemon defaults:
1. `cp /usr/local/bin/eth-log-alerting/defaults /etc/default/eth-log-alerting`
1. Edit `/etc/default/eth-log-alerting`
1. `update-rc.d eth-log-alerting defaults`
1. `/etc/init.d/eth-log-alerting start`
Loading