How To Install check-pgactivity on Kali Linux

In this tutorial we learn how to install check-pgactivity on Kali Linux. check-pgactivity is PostgreSQL plugin for Nagios

Introduction

In this tutorial we learn how to install check-pgactivity on Kali Linux.

What is check-pgactivity

check-pgactivity is:

check_pgactivity is a Nagios probe dedicated to PostgreSQL. It offers many options to measure and monitor useful performance metrics.

Services include (among others) monitoring of autovacuum, bgwriter, locks, long queries, idle in transaction queries, number of temporary files and WAL files, bloat of tables and btree indexes, commit and hit ratios, WAL archives exhaustivity, age of logical backups, backends number and states, backup label file age, connectivity, replication delay between primary and secondary instances, database sizes, vacuum and analyze times, sequence exhaustion, snapshots age, presence of unlogged tables or invalid indexes, incoming freeze, settings changes, PostgreSQL minor version, PGDATA rights, custom queries. Most services only need normal user rights.

There are three methods to install check-pgactivity 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 check-pgactivity Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install check-pgactivity using apt-get by running the following command:

sudo apt-get -y install check-pgactivity

Install check-pgactivity Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install check-pgactivity using apt by running the following command:

sudo apt -y install check-pgactivity

Install check-pgactivity 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 update

After updating apt database, We can install check-pgactivity using aptitude by running the following command:

sudo aptitude -y install check-pgactivity

How To Uninstall check-pgactivity on Kali Linux

To uninstall only the check-pgactivity package we can use the following command:

sudo apt-get remove check-pgactivity

Uninstall check-pgactivity And Its Dependencies

To uninstall check-pgactivity and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove check-pgactivity

Remove check-pgactivity Configurations and Data

To remove check-pgactivity configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge check-pgactivity

Remove check-pgactivity configuration, data, and all of its dependencies

We can use the following command to remove check-pgactivity configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge check-pgactivity

Dependencies

check-pgactivity have the following dependencies:

References

Summary

In this tutorial we learn how to install check-pgactivity package on Kali Linux using different package management tools: apt, apt-get and aptitude.