This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"context" | |
"crypto/tls" | |
"errors" | |
"fmt" | |
"io/ioutil" | |
"log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/bash | |
# pkg install bash | |
# add to shellcmd as "/root/push_ip_metrics.sh &" via Services/shellcmd | |
pushgatewayip="192.168.1.2:9091" | |
network="192.168.1.0/24" | |
interface="bce1" | |
interval="1" | |
rate -i "${interface}" -r "${interval}" -e -n -Ab -a 255 -c "${network}" -d | while read -r line; do |