byxorna / nycmesh-tool

nycmesh-tool CLI
Apache License 2.0
1 stars 0 forks source link

daemon: Slack client for posting DFS events #10

Closed byxorna closed 2 years ago

byxorna commented 2 years ago

More infrastructure to get the Slack API client working, and a nice golden path established to post to slack when DFS events are observed by the daemon.

Caveats:

Example:

❱  bin/nycmesh-tool daemon --enable-slack
2022/02/08 14:02:53 config file: /home/gabe/.nycmesh-tool.yaml
2022/02/08 14:02:53 binary release v0.4.0-17-ge47d566, built Tue Feb  8 07:02:25 PM UTC 2022
2022/02/08 14:02:53 launching daemon...                                
2022/02/08 14:02:53 bootstrapping by fetching logs 48h0m0s old
2022/02/08 14:02:53 watching for DFS events with `\bchanged frequency due to DFS detection\b`
2022/02/08 14:03:12 DFS event detected at nn:713 on 2022-02-07T14:18:20.836Z: Device nycmesh-sn3-south main radio changed frequency due to DFS detection
2022/02/08 14:03:12 notifying slack channel C02HZLLH85R of DFS on nn:713 nycmesh-sn3-south