Created
July 16, 2019 17:46
-
-
Save dhiren051/96ee813da5649938e93626e3bf42a210 to your computer and use it in GitHub Desktop.
To compare values of linux node and prometheus node exporter
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
#!/bin/bash | |
set -e -o pipefail | |
date | |
free -b | |
curl -s 'http://localhost:9100/metrics?collect\[\]=meminfo' | | |
egrep '^node_memory_Mem(Total|Free|Available)_bytes' | |
egrep 'Mem(Total|Free|Available):' /proc/meminfo | | |
awk '{print $1 $2 * 1024}' | |
free -b | |
date |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment