Update README.md

This commit is contained in:
Raymond P. Burkholder 2016-09-28 13:14:07 -03:00 committed by GitHub
parent a1fd500da1
commit a907034a9b
1 changed files with 23 additions and 1 deletions

View File

@ -1,2 +1,24 @@
# path-loss
bash script to ping a series a nodes, and on failure, generates a traceroute, then generates an alert
Bash script to ping a series a nodes, and on failure, generates a traceroute, then generates an alert via Slack, with an possible escalation to PagerDuty.
This script was designed to offer a test external to a network to detect for a significant network outage.
## description
Each node has a series of pings sent to it. If there is a loss of pings greater than some count, as defined in a script variable, then an mtr will be generated for that node.
If any nodes show a loss of pings and have had an mtr generated, then a log of all nodes and their results will be sent to a Slack channel of your choice. Slack bot token and channel name need to be supplied in the script variables.
When all pings have returned to normal, another report to Slack is generated.
```
nodes=( \
[8.8.8.8]="google1 member" \
[8.8.4.4]="google2" \
)
```
Update the 'nodes' list with your list of nodes to be monitored (given an ip address, the node description, and an optional 'member' indicator). Two example nodes are shown, but you can change and add as you need.
The 'member' indicator is used in a test such that if all members are unreachable, then a PagerDuty alert is generated. There should be at least one non-member node. This allows another test: if all nodes (members and non-members) are unreachable, that typically means that there is a local network issue, so the event is logged to syslog and no Slack or PagerDuty events are generated.