prometheus-pushgateway command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
prometheus-pushgateway: command not found
or when using sudo you get the following error message
sudo: prometheus-pushgateway: command not found
Solutions to prometheus-pushgateway: command not found
How To Fix prometheus-pushgateway: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu prometheus-pushgateway is provided by prometheus-pushgateway package.
prometheus-pushgateway is:
The Prometheus Pushgateway exists to allow ephemeral and batch jobs to expose their metrics to Prometheus. Since these kinds of jobs may not exist long enough to be scraped, they can instead push their metrics to a Pushgateway. The Pushgateway then exposes these metrics to Prometheus.
The Pushgateway is explicitly not an aggregator, but rather a metrics cache. It does not have a statsd-like semantics. The metrics pushed are exactly the same as you would present for scraping in a permanently running program.
For machine-level metrics, the textfile collector of prometheus-node-exporter is usually more appropriate. The Pushgateway is best used for service-level metrics.
To fix this problem, we can install more using the command below.
sudo apt-get -y install prometheus-pushgateway
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install prometheus-pushgateway.
sudo apt -y install prometheus-pushgateway
Or if you have aptitude installed you can use the following command.
sudo aptitude install prometheus-pushgateway
Summary
In this tutorial we learn how to fix prometheus-pushgateway command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.