How To Install prometheus-pushgateway on Kali Linux
Introduction
In this tutorial we learn how to install prometheus-pushgateway on Kali Linux.
What is prometheus-pushgateway
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.
There are three methods to install prometheus-pushgateway on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.
Install prometheus-pushgateway Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get updateAfter updating apt database, We can install prometheus-pushgateway using apt-get by running the following command:
sudo apt-get -y install prometheus-pushgatewayInstall prometheus-pushgateway Using apt
Update apt database with apt using the following command.
sudo apt updateAfter updating apt database, We can install prometheus-pushgateway using apt by running the following command:
sudo apt -y install prometheus-pushgatewayInstall prometheus-pushgateway Using aptitude
If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.
sudo aptitude updateAfter updating apt database, We can install prometheus-pushgateway using aptitude by running the following command:
sudo aptitude -y install prometheus-pushgatewayHow To Uninstall prometheus-pushgateway on Kali Linux
To uninstall only the prometheus-pushgateway package we can use the following command:
sudo apt-get remove prometheus-pushgatewayUninstall prometheus-pushgateway And Its Dependencies
To uninstall prometheus-pushgateway and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove prometheus-pushgatewayRemove prometheus-pushgateway Configurations and Data
To remove prometheus-pushgateway configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge prometheus-pushgatewayRemove prometheus-pushgateway configuration, data, and all of its dependencies
We can use the following command to remove prometheus-pushgateway configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge prometheus-pushgatewayDependencies
prometheus-pushgateway have the following dependencies:
References
Summary
In this tutorial we learn how to install prometheus-pushgateway package on Kali Linux using different package management tools: apt, apt-get and aptitude.