Skip to content

Commit

Permalink
uptime
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrej Walilko committed Apr 15, 2021
1 parent d16b822 commit 92eb425
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions checkLoad.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ load5=`echo "$load" | awk '{print $2}'`
load15=`echo "$load" | awk '{print $3}'`
proc_run=`echo "$load" | awk '{print $4}' | awk -F '/' '{print $1}'`
proc_total=`echo "$load" | awk '{print $4}' | awk -F '/' '{print $2}'`
uptime=`cat /proc/uptime | awk '{print $1}'`

curl -XPOST 'http://'$ifserver':'$ifport'/write?db='$ifdb -u $ifuser:$ifpass --data-binary 'load.load_one.number value='$load1
curl -XPOST 'http://'$ifserver':'$ifport'/write?db='$ifdb -u $ifuser:$ifpass --data-binary 'load.load_five.number value='$load5
curl -XPOST 'http://'$ifserver':'$ifport'/write?db='$ifdb -u $ifuser:$ifpass --data-binary 'load.load_fifteen.number value='$load15
curl -XPOST 'http://'$ifserver':'$ifport'/write?db='$ifdb -u $ifuser:$ifpass --data-binary 'load.proc_run.number value='$proc_run
curl -XPOST 'http://'$ifserver':'$ifport'/write?db='$ifdb -u $ifuser:$ifpass --data-binary 'load.proc_total.number value='$proc_total
curl -XPOST 'http://'$ifserver':'$ifport'/write?db='$ifdb -u $ifuser:$ifpass --data-binary 'load.uptime value='$uptime

0 comments on commit 92eb425

Please sign in to comment.