If you submit 3 (and they show up in the nagios.log), it should come out immediately unless you have a notification delay. I see now that you have postgres so the repair I had you run earlier is less likely to have resolved the issue. Let's try the following.
The following commands are different if you are using a version of PostgreSQL before v9. To determine which version you have execute the following command:
Based on that output, execute the commands specific to your version:
Versions BEFORE 9
Code: Select all
echo "vacuum;vacuum analyze;"|psql nagiosxi postgres
service postgresql restart
Versions 9 onwards
Code: Select all
echo "vacuum;vacuum analyze;vacuum full;"|psql nagiosxi postgres
service postgresql restart
To log in the postgres manually, run:
To view the tables, run:
and to exit:
If you tried to run the vacuum on the posgres or you attempted to log in manually in the database, but you see the following error message:
Code: Select all
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
You may notice either a high CPU usage for the postmaster process, or a repeated error message in the /var/lib/pgsql/data/pg_log file:
transaction ID wrap limit is 2147484146
You can try to fix the issue by running the following command in the command line:
Important: Run the commands one-by-one (don't run them with one go!)
Versions BEFORE PostgreSQL 9
Code: Select all
service postgresql stop
su postgres
echo "VACUUM;" > /tmp/fix.sql
postgres -D /var/lib/pgsql/data nagiosxi < /tmp/fix.sql
postgres -D /var/lib/pgsql/data postgres < /tmp/fix.sql
postgres -D /var/lib/pgsql/data template1 < /tmp/fix.sql
exit
service postgresql start
Note: The commands listed above may not work with some versions of PosgreSQL. If you see the following error:
Code: Select all
postgres: invalid argument: "nagiosxi"
You will need to run the following commands instead:
Code: Select all
service postgresql stop
su postgres
echo "VACUUM;" > /tmp/fix.sql
postgres --single -D /var/lib/pgsql/data nagiosxi < /tmp/fix.sql
postgres --single -D /var/lib/pgsql/data postgres < /tmp/fix.sql
postgres --single -D /var/lib/pgsql/data template1 < /tmp/fix.sql
exit
service postgresql start
Versions 9 Onwards
Code: Select all
service postgresql stop
su postgres
echo "VACUUM FULL;" > /tmp/fix.sql
postgres -D /var/lib/pgsql/data nagiosxi < /tmp/fix.sql
postgres -D /var/lib/pgsql/data postgres < /tmp/fix.sql
postgres -D /var/lib/pgsql/data template1 < /tmp/fix.sql
exit
service postgresql start
Note: The commands listed above may not work with some versions of PosgreSQL. If you see the following error:
Code: Select all
postgres: invalid argument: "nagiosxi"
You will need to run the following commands instead:
Code: Select all
service postgresql stop
su postgres
echo "VACUUM FULL;" > /tmp/fix.sql
postgres --single -D /var/lib/pgsql/data nagiosxi < /tmp/fix.sql
postgres --single -D /var/lib/pgsql/data postgres < /tmp/fix.sql
postgres --single -D /var/lib/pgsql/data template1 < /tmp/fix.sql
exit
service postgresql start