Receiving the following alert on Postgres Table Sizes. Is this something that will recover once nightly DB maintenance is ran or should action be taken? Please advise.
Service: Postgres Table Sizes - nagiosxi
Host: THBYONA212NVLXVM9194
Alias: monitor4
Address: 127.0.0.1
State: CRITICAL
Info:
POSTGRES_RELATION_SIZE CRITICAL: DB nagiosxi (host:127.0.0.1) largest relation is table public.xi_meta: 118 MB
Date/Time: 2018-10-23 12:21:47
Postgres Table Sizes Alert
Postgres Table Sizes Alert
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
Nagios Fusion 2024R1.0.2
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Postgres Table Sizes Alert
Hi@TBT
There is could be caused be a number of things. Let's first check the database performance settings in Nagios XI (or post of screen shot of your settings). See the Nagios Database Optimization Guide:
(https://assets.nagios.com/downloads/nag ... zation.pdf)
After checking the settings, are there any errors in the db maintenance log?
Lastly, what version of postgres are you using?
There is could be caused be a number of things. Let's first check the database performance settings in Nagios XI (or post of screen shot of your settings). See the Nagios Database Optimization Guide:
(https://assets.nagios.com/downloads/nag ... zation.pdf)
After checking the settings, are there any errors in the db maintenance log?
Code: Select all
tail /usr/local/nagiosxi/var/dbmaint.logCode: Select all
postgres -VAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Postgres Table Sizes Alert
benjaminsmith wrote:Hi@TBT
There is could be caused be a number of things. Let's first check the database performance settings in Nagios XI (or post of screen shot of your settings). See the Nagios Database Optimization Guide:
(https://assets.nagios.com/downloads/nag ... zation.pdf)
After checking the settings, are there any errors in the db maintenance log?Lastly, what version of postgres are you using?Code: Select all
tail /usr/local/nagiosxi/var/dbmaint.logCode: Select all
postgres -V
I should also mention that we had an outage overnight for roughly 4 hours. Several XI Servers (this one included) could not reach thousands of network elements that are being monitored, however, this one XI Server in particular is the only experiencing the Postgres Table Sizes Alert.
Nagios XI Database
Max Commands Age: 480 Max time in minutes to keep commands.
Max Events Age: 480 Max time in minutes to keep events.
Optimize Interval: 60 Max time in minutes between optimization runs.
tail /usr/local/nagiosxi/var/dbmaint.log
SQL2: Deleted 529 (DELETE FROM xi_meta WHERE meta_id IN (SELECT xi_meta.meta_id FROM xi_meta LEFT JOIN xi_events ON xi_meta.metaobj_id=xi_events.event_id WHERE metatype_id='1' AND event_id IS NULL))
CLEANING nagiosxi TABLE 'auditlog'...
SQL: DELETE FROM xi_auditlog WHERE log_time < 1537729801::abstime::timestamp without time zone
CLEANING nagiosql TABLE 'logbook'...
SQL: DELETE FROM tbl_logbook WHERE time < FROM_UNIXTIME(1540293001)
Repair Complete: Removing Lock File
postgres -V
postgres (PostgreSQL) 8.4.20
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
Nagios Fusion 2024R1.0.2
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Postgres Table Sizes Alert
Ok. That' looks normal.
Let's run vacuum on the postgres database to clean up the database.
Let's run vacuum on the postgres database to clean up the database.
Code: Select all
echo "vacuum;vacuum analyze;vacuum full;"|psql nagiosxi postgresAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Postgres Table Sizes Alert
Resolved with vacuum.benjaminsmith wrote:Ok. That' looks normal.
Let's run vacuum on the postgres database to clean up the database.
Code: Select all
echo "vacuum;vacuum analyze;vacuum full;"|psql nagiosxi postgres
POSTGRES_RELATION_SIZE OK: DB "nagiosxi" (host:127.0.0.1) largest relation is table "public.xi_meta": 33 MB
Thank you.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
Nagios Fusion 2024R1.0.2
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Postgres Table Sizes Alert
Thanks for getting back to us, and glad to know that resolved the issue. I will go ahead a close this forum topic.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!