Skip to content

🍁 scripts to send network statuses into a local elasticsearch for mac users.

License

Notifications You must be signed in to change notification settings

ta08/home-network-status

Repository files navigation

home-network-status

This scripts were created for visualizing home network statuses with Elasticsearch. So main purpose of these is to send json data into Elasticsearch.

At the visualization phase, I used grafana and make a dashboard like https://ta08.github.io/posts/20190823t23/ (written in Japanese) . No codes are here about the visualization phase.

Prerequirement

Both of scripts use Elasticsearch. Please run Elasticsearch on your local machine with 9200 port.

Usage

post_wifi_status_as_json.sh

Just only work on MacOS. Prepare network_status as index at your Elasticsearch. This scirpt requires jq, httpie commands.

ElasticsearchにWifiの情報をJSONに整形して突っ込む。

watch -n 5 ./post_wifi_status_as_json.sh

post_ping_as_json.py

Work with Python 3.7.4. Lower versions are not confirmed to work but I think it will work. Please install libraries with requirements.txt.

Elasticsearchにpingの結果をJSONに整形して突っ込む。

ping -i 5 8.8.8.8 | python -u post_ping_as_json.py ping_google

Elasticsearch memo

http get http://localhost:9200/_cat/indices
http post http://localhost:9200/<index>
http post http://localhost:9200/<index>/<type>

About

🍁 scripts to send network statuses into a local elasticsearch for mac users.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published