Page 2 of 2

Re: Postgres disk activity

Posted: Mon Mar 13, 2017 2:38 pm
by avandemore
Looks like I had the wrong syntax, please try this:

Code: Select all

# pidstat -C postgres -d 5 12

Re: Postgres disk activity

Posted: Mon Mar 13, 2017 2:41 pm
by ssax
You may be hitting a bug, you can try running these commands and see if it resolves the issue for you:
- NOTE: Make sure you take an XI backups/VM snapshot just in case
- Running the below command will remove ALL data from Home > Event Log or Reports > Event Log (they are the same report).

Code: Select all

echo "truncate table xi_events; truncate table xi_meta; truncate table xi_eventqueue;" | psql nagiosxi nagiosxi
Thank you

Re: Postgres disk activity

Posted: Mon Mar 13, 2017 8:00 pm
by Fred Kroeger
Thanks - ran the truncate command and it completed OK. However, not sure it did anything ?
I went to Home -> Event Log afterwards, and it shows that I have 100,000+ records in the last 24hrs?

Re: Postgres disk activity

Posted: Tue Mar 14, 2017 9:23 am
by ssax
Wow, that's a lot, how many total hosts/services do you have?

Please attach these files:

Code: Select all

/etc/cron.d/nagiosxi
/usr/local/nagiosxi/cron/event_handler.php
/usr/local/nagiosxi/cron/eventman.php
Please send the output of this command as well:

Code: Select all

ls -l /usr/local/nagiosxi/var
If you run a tail on this file does it send tons of information? Are there any errors shown?

Code: Select all

tail -F /usr/local/nagiosxi/var/event_handler.log
Thank you

Re: Postgres disk activity

Posted: Tue Mar 14, 2017 10:38 pm
by Fred Kroeger
Hosts/Services = 1052/10252
Then we are getting events forwarded from two other Nagios Servers - Hosts/Services = 189/2017 & 237/2739
I disabled the Global Service event handler yesterday to reduce the number of events being written to the Event Log. Today it still shows 100,000+ entries for the last 24hrs.
I suppose doing the math that's almost 200,00 events an hour (assuming that they run every 5mins).

The event_handler.log file only has a single entry that the LOCK file was created.

BTW pidstat -C postgres -d 5 12 command doesn't work either... no values get returned.
Also I'm guessing that the truncate command did work as the xi-meta table is somewhat smaller today when I ran the query you sent and the other two tables don't appear in the listing now.

Re: Postgres disk activity

Posted: Wed Mar 15, 2017 3:37 pm
by ssax
Let's move this into a ticket, please email [email protected] with a descriptive subject and detailed body and please include a link back to this thread so that we can get a remote session setup.

Thank you

Re: Postgres disk activity

Posted: Thu Mar 16, 2017 9:14 am
by tmcdonald
Closing, will continue in ticket.