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…




AVM Consulting — Clear strategy for your cloud

Recommended from Medium

Introduction to Command line, Git and GitHub.

A story about managing tons of colors in an Angular application

Custom Docker image as a lambda function.

DRYing GitLab CI/CD Pipelines

How to Create a Database on AWS RDS using Sagemaker with Mysql-connector in python

QCon London 2018: five trends to watch

Tools We Use to Make Games: No Moss Studios

Details implementation of java asynchronous programming using completable future

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:

More from Medium

Store a sensitive kubeconfig with Kubernetes and clouds providers

Creating and importing an AKS Cluster with Terraform

Upgrading Terraform Helm charts to Helm 3 with K8s v1.22

Install the Kubernetes Dashboard UI