Scrape data using Bash script and push it to Prometheus using PushGateway
As you may be aware that prometheus is a pull based metrics server which scraps data from the specified scrap endpoints. But we can also push data to Prometheus using PushGateway. In this post we’ll see how we can push data fetched by our shell script, to Prometheus.
Pre-requisite: Ubuntu 16.04 machine with 9090(Prometheus) and 3000(Grafana)ports opened.
Step 1: Install Prometheus by executing following commands:
sudo useradd -M -r -s /bin/false prometheus…