postgresql database
Database Level Checks (via PostgreSQL)
Description
This profile is used to perform active checks of individual PostgreSQL databases. This profile is designed to be modular, in that adding new databases to monitoring is a matter of adding additional instances to each service you wish to monitor on a specific database.
Profile Package
This package includes the following files:
- Profile definition: service-profile-postgresql-database.xml
- Plugin script: check_postgres.pl
- Service checks:
- postgres_bloat_ : Checks for table and index bloat
- postgres_connection_ : Simply checks that the connection to the database is successful
- postgres_disabled_triggers_ : Checks if any triggers are disabled
- postgres_index_size_ : Checks the size of indexes
- postgres_querytime_ : Returns the longest running queries currently active in the database
- postgres_table_size_ : Checks table sizes, limited to the top 5 tables to minimize any impact on performance, the limitation on top N tables may be adjusted if desired by editing the --perflimit value of the service check
- postgres_timesync_ : Checks time sync of the database to local system time
- postgres_txn_idle_ : Checks for idle transactions which may cause table locks, for example, a user session idle in a BEGIN; statement will trigger this)
There are more options available and can be reviewed by running (on the command-line from within the gw8 installation directory):docker-compose exec nagios /usr/local/nagios/libexec/check_postgres.pl --help
CODE
Installation
You will need connectivity to the PostgreSQL database you want to monitor and a user with read access to the databases/tables you want to monitor.
GroundWork Monitor includes many monitoring profiles for a variety of devices, systems and applications. Some profiles are pre-imported on a new GroundWork installation and others are distributed with the product. The configuration tool is used to import updated profiles and profiles that require additional setup, services can also be imported, see Importing Profiles. However, for this profile, download the profile from the link in the instructions below and follow the steps for uploading profiles.
Using this Profile
- Login to the command-line of the GroundWork Monitor system as the user used to install GroundWork Monitor 8.
Change to the gw8 directory:
cd gw8/
CODE- Download the profile service-profile-postgresql-database.xml.
Copy the profile to the monarch container:
docker cp service-profile-postgresql-database.xml dockergw8_monarch_1:/usr/local/groundwork/monarch/profiles/Uploaded/
CODE- In the GroundWork Monitor UI, import the profiles in the Uploaded folder by selecting Configuration > Nagios Monitoring > Profiles > Profile Importer > Import > Uploaded. Click Check all, and select the Import button.
- Apply the profile to your PostgreSQL host.
- Add a service instance for each database and service you want to monitor.
- Navigate to Configuration > Nagios Monitoring > Hosts.
- Expand the host you added the profile to.
- Click to select a service.
- Under the Multiple Instances (optional) table, enter a Service instance name suffix, and click Add Instance(s).
- This will copy the default arguments into the service instance, adjust these arguments to suit your environment, save. When you are finished modifying all services you will need to Commit the changes.
Example capture of a configured service instance:
Related Resources
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page: