Commit 8be919fec42b4ff5e2f7f36d1f76cc197ef97c2f
1 parent
d70a53f181
Exists in
main
update readme with configuration info, swappiness tip, and instructions for alar…
…mist and slackbot service installation
Showing 1 changed file with 24 additions and 4 deletions Side-by-side Diff
README.md
View file @
8be919f
... | ... | @@ -90,6 +90,11 @@ |
90 | 90 | env ifwireless = 1 |
91 | 91 | env wpa_supplicant_driver = wext , nl80211 |
92 | 92 | ``` |
93 | +### Swappiness | |
94 | +Raspbian defaults to high memory swapping threshold (60 on scale of 1-100), which can lead to high cpu usage. Change to 1: | |
95 | + - Edit or append the line `vm.swappiness = 1` to `/etc/sysctl.conf` | |
96 | + - Reload config with `sudo sysctl -p` | |
97 | + - Confirm setting with `cat /proc/sys/vm/swappiness` | |
93 | 98 | |
94 | 99 | ### python |
95 | 100 | |
96 | 101 | |
97 | 102 | |
98 | 103 | |
... | ... | @@ -144,25 +149,40 @@ |
144 | 149 | ## Install monitors |
145 | 150 | |
146 | 151 | 1. Clone or copy this repository to the Raspberry Pi, probably in a folder called `soars-status-alerting` in the home directory. |
147 | -2. Install tc08 service | |
152 | +2. Configure | |
153 | + - Edit `ssa/influxdb/influxdb_bridge.py` with appropriate influxdb options (hostname and port, dbname). | |
154 | + - Edit `ssa/alarmist_config.ini` and populate influxdb details and adjust alarm thresholds. | |
155 | + - Edit `ssa/slackbot_config.ini` and populate influxdb details and slack credentials. | |
156 | +3. Install tc08 service | |
148 | 157 | - `sudo cp tc08/tc08-monitor.service /etc/systemd/system/.` |
149 | 158 | - 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`. |
150 | 159 | - `sudo systemctl daemon-reload` |
151 | 160 | - `sudo systemctl enable tc08-monitor` |
152 | 161 | - `sudo systemctl start tc08-monitor` |
153 | -3. Install DI-1000U-monitor | |
162 | +4. Install DI-1000U-monitor | |
154 | 163 | - `sudo cp DI-1000U/DI-1000U-monitor.service /etc/systemd/system/.` |
155 | 164 | - 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`. |
156 | 165 | - `sudo systemctl daemon-reload` |
157 | 166 | - `sudo systemctl enable DI-1000U-monitor` |
158 | 167 | - `sudo systemctl start DI-1000U-monitor` |
159 | -4. Install flow-meter | |
168 | +5. Install flow-meter | |
160 | 169 | - `sudo cp flow-meter/flow-meter-monitor.service /etc/systemd/system/.` |
161 | 170 | - 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`. |
162 | 171 | - `sudo systemctl daemon-reload` |
163 | 172 | - `sudo systemctl enable flow-meter-monitor` |
164 | 173 | - `sudo systemctl start flow-meter-monitor` |
165 | - | |
174 | +6. Optional - install alarmist | |
175 | + - `sudo cp alarmist/alarmist.service /etc/systemd/system/.` | |
176 | + - 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`. | |
177 | + - `sudo systemctl daemon-reload` | |
178 | + - `sudo systemctl enable alarmist` | |
179 | + - `sudo systemctl start alarmist` | |
180 | +7. Optional - install slackbot | |
181 | + - `sudo cp slackbot/slackbot.service /etc/systemd/system/.` | |
182 | + - 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`. | |
183 | + - `sudo systemctl daemon-reload` | |
184 | + - `sudo systemctl enable slackbot` | |
185 | + - `sudo systemctl start slackbot` | |
166 | 186 | |
167 | 187 | --- |
168 | 188 |