Install check_postgres by following these steps:
- Use these commands to extract the check_postgres source and enter the source directory:
tar -xzf check_postgres-2.21.0.tar.gz cd check_postgres-2.21.0/
- Next, build and install the actual software with these commands:
perl Makefile.PL make sudo make install
As the postgres user on a PostgreSQL server, try using these commands to obtain database information:
- Check the state of the database size with this command:
check_postgres.pl --action=database_size -w 100MB -c 200MB
- Create a large table by executing this SQL as the postgres user in the postgres database:
CREATE TABLE bigtable AS SELECT generate_series(1,1000000) AS vals;
- Cause a critical alert by executing ...