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…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vinayak Pandey

Vinayak Pandey

Experienced Cloud Consultant with a knack of automation. Linkedin profile: https://www.linkedin.com/in/vinayakpandeyit/