diff --git a/README.md b/README.md index 20c345e..e2ebb05 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,11 @@ interface wlan0 env ifwireless = 1 env wpa_supplicant_driver = wext , nl80211 ``` +### Swappiness +Raspbian defaults to high memory swapping threshold (60 on scale of 1-100), which can lead to high cpu usage. Change to 1: + - Edit or append the line `vm.swappiness = 1` to `/etc/sysctl.conf` + - Reload config with `sudo sysctl -p` + - Confirm setting with `cat /proc/sys/vm/swappiness` ### python @@ -144,25 +149,40 @@ On the raspberry pi: ## Install monitors 1. Clone or copy this repository to the Raspberry Pi, probably in a folder called `soars-status-alerting` in the home directory. -2. Install tc08 service +2. Configure + - Edit `ssa/influxdb/influxdb_bridge.py` with appropriate influxdb options (hostname and port, dbname). + - Edit `ssa/alarmist_config.ini` and populate influxdb details and adjust alarm thresholds. + - Edit `ssa/slackbot_config.ini` and populate influxdb details and slack credentials. +3. Install tc08 service - `sudo cp tc08/tc08-monitor.service /etc/systemd/system/.` - edit `/etc/systemd/system/tc08-monitor.service` and replace all instances of `path/to/repo` with the directory where you cloned or copied `soars-status-alerting`. - `sudo systemctl daemon-reload` - `sudo systemctl enable tc08-monitor` - `sudo systemctl start tc08-monitor` -3. Install DI-1000U-monitor +4. Install DI-1000U-monitor - `sudo cp DI-1000U/DI-1000U-monitor.service /etc/systemd/system/.` - edit `/etc/systemd/system/DI-1000U-monitor.service` and replace all instances of `path/to/repo` with the directory where you cloned or copied `soars-status-alerting`. - `sudo systemctl daemon-reload` - `sudo systemctl enable DI-1000U-monitor` - `sudo systemctl start DI-1000U-monitor` -4. Install flow-meter +5. Install flow-meter - `sudo cp flow-meter/flow-meter-monitor.service /etc/systemd/system/.` - edit `/etc/systemd/system/flow-meter-monitor.service` and replace all instances of `path/to/repo` with the directory where you cloned or copied `soars-status-alerting`. - `sudo systemctl daemon-reload` - `sudo systemctl enable flow-meter-monitor` - `sudo systemctl start flow-meter-monitor` - +6. Optional - install alarmist + - `sudo cp alarmist/alarmist.service /etc/systemd/system/.` + - edit `/etc/systemd/system/alarmist.service` and replace all instances of `path/to/repo` with the directory where you cloned or copied `soars-status-alerting`. + - `sudo systemctl daemon-reload` + - `sudo systemctl enable alarmist` + - `sudo systemctl start alarmist` +7. Optional - install slackbot + - `sudo cp slackbot/slackbot.service /etc/systemd/system/.` + - edit `/etc/systemd/system/slackbot.service` and replace all instances of `path/to/repo` with the directory where you cloned or copied `soars-status-alerting`. + - `sudo systemctl daemon-reload` + - `sudo systemctl enable slackbot` + - `sudo systemctl start slackbot` ---