Page 1 of 1
Nagios XI httpd taking up a good amount of memory
Posted: Fri May 05, 2017 10:07 am
by emartine
I meant CPU not memory.
Since the disk fill up we experienced. A lot of folks have noticed a slowness when searching for a server in nagiosxi (takes a while for a single server to load).
I've noticed httpd hitting 100 in top -
41308 apache 20 0 547m 128m 8024 R 100.0 0.1 0:18.62 httpd
41311 apache 20 0 545m 134m 4744 R 100.0 0.1 1:00.01 httpd
41484 apache 20 0 504m 85m 8008 R 100.0 0.1 0:26.11 httpd
41517 apache 20 0 526m 115m 4724 R 100.0 0.1 0:37.65 httpd
41533 apache 20 0 526m 107m 8024 R 100.0 0.1 0:13.90 httpd
41310 apache 20 0 525m 107m 8028 R 99.7 0.1 0:34.60 httpd
31880 nagios 20 0 2864m 2.7g 2220 R 16.8 2.1 105:20.73 nagios
45819 gearmand 20 0 473m 13m 1116 S 14.2 0.0 1135:15 gearmand
41313 apache 20 0 453m 35m 8012 S 3.3 0.0 0:43.64 httpd
41486 apache 20 0 453m 34m 7968 S 2.3 0.0 0:01.72 httpd
41309 apache 20 0 454m 35m 8056 S 2.0 0.0 0:42.19 httpd
On the occasion mysld climbs up to 40 but it isn't as predominant and on the occasion is its gets up to ~140 but it doesn't stay up there for very long (a second or two).
3798 mysql 20 0 9.8g 300m 4796 S 138.9 0.2 2256:23 mysqld
I've read the topics regarding fixing the database but I am not sure if that would help in this case.
https://assets.nagios.com/downloads/nag ... tabase.pdf
Any idea what might be causing the slowness?
Re: Nagios XI httpd taking up a good amount of memory
Posted: Fri May 05, 2017 10:35 am
by tgriep
It is hard to say what is causing Apache to hit 100% without looking at the log files in the /var/log/httpd folder.
If you can take a look at them and post any new errors that happened after the drive filled up, that may help in troubleshooting this.
I am assuming that you ran the repair script on the system but you can try and reboot the system and see if that frees up any stuck processes that could be causing the issue.
If the system is still running slow, can you login to the server as root, run the following commands and post the output?
Code: Select all
ps -ef --cols=300
df -h
df -i
ipcs -q
grep dbtype /usr/local/nagiosxi/html/config.inc.php
Thanks
Re: Nagios XI httpd taking up a good amount of memory
Posted: Fri May 05, 2017 11:39 am
by emartine
tgriep wrote:It is hard to say what is causing Apache to hit 100% without looking at the log files in the /var/log/httpd folder.
If you can take a look at them and post any new errors that happened after the drive filled up, that may help in troubleshooting this.
I am assuming that you ran the repair script on the system but you can try and reboot the system and see if that frees up any stuck processes that could be causing the issue.
If the system is still running slow, can you login to the server as root, run the following commands and post the output?
Code: Select all
ps -ef --cols=300
df -h
df -i
ipcs -q
grep dbtype /usr/local/nagiosxi/html/config.inc.php
Thanks
I PM you the info.
Re: Nagios XI httpd taking up a good amount of memory
Posted: Fri May 05, 2017 12:06 pm
by tgriep
I received the PM and shared the info with the other techs.
Your server is also using the Postgres database for Nagios XI so you may want to look at today's Postgres logfile and see if there are any errors.
Code: Select all
/var/lib/pgsql/data/pg_log/postgresql-Fri.log
Did you look in the Apache log files to see if there are any errors?
Could you PM your Nagios XI System Profile so we can review it?
To send us your system profile. Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and PM it back to me.
Re: Nagios XI httpd taking up a good amount of memory
Posted: Tue May 09, 2017 9:21 am
by emartine
I'm seing this predominantly
WARNING: nonstandard use of \\ in a string literal at character 98
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
WARNING: nonstandard use of \\ in a string literal at character 98
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
WARNING: nonstandard use of \\ in a string literal at character 98
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
WARNING: nonstandard use of \\ in a string literal at character 98
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
and one occasion of this
ERROR: relation "xi_notifications" does not exist
STATEMENT: VACUUM ANALYZE xi_notifications;
Re: Nagios XI httpd taking up a good amount of memory
Posted: Tue May 09, 2017 9:50 am
by tgriep
Those warnings can be ignored as well as this error
Code: Select all
ERROR: relation "xi_notifications" does not exist
That is some left over code in the dbmaint script that is trying to delete a table that doesn't exist in the database.
We would have to see a System Profile to go further.
Re: Nagios XI httpd taking up a good amount of memory
Posted: Tue May 09, 2017 11:23 am
by emartine
I've decided to upgrade to the latest version of Nagios XI to see if this helps resolve this. I know it is a pain dealing with somewhat older software. I will keep you posted.
Re: Nagios XI httpd taking up a good amount of memory
Posted: Tue May 09, 2017 12:05 pm
by tgriep
OK, thanks for the update. Let us know if you have any questions.
Re: Nagios XI httpd taking up a good amount of memory
Posted: Tue May 09, 2017 3:35 pm
by emartine
I updated gearmand, updated workers, updated nagios xi and updated the system. Seems like it is running much faster now. I did get an error when I ran an update to neb. It said failed but seems to have failed for the worker that it also installs? It worries me abit. I know it upgraded since I am able to run gearman_top2 -H <hostname> and view all of the workers and the workers all are calling in and updating the hosts.
Re: Nagios XI httpd taking up a good amount of memory
Posted: Tue May 09, 2017 4:22 pm
by tgriep
That is good news that the system is running better now.
Maybe the gearman upgrade script had some sort of left over settings and generated a false alert, it is hard to say what it was.