Advertisement
mitrakov

Health Check on Localhost

Jun 1st, 2019
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.23 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. while [ true ]; do
  4.   X=`date`
  5.   Y=`wget -q -O health http://localhost:9000/health && cat health`
  6.   Z=`ps aux | grep java | grep -v jmx | head -1 | awk '{print $1}'`
  7.   printf '%s %s %s\n' "$X" "$Y" "$Z"
  8.   sleep 3
  9. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement