We are running Nagios XI 5.4.10 and I would like to know if there is a way to limit all of the memory being consumed. Due to Nagios being monitored I would like only 80% of the total memory to be used by Nagios so it won't alert other monitoring systems (strange as that sounds!) that it is exceeding the 80% mark.
Is there a way to do this?
Tom
Maximum amount of memory used by Nagios XI
-
tmattingly
- Posts: 115
- Joined: Thu Oct 23, 2014 12:53 pm
Re: Maximum amount of memory used by Nagios XI
I think the RHCSA/RHCE method is to use /etc/security/limits.conf. You could set a memory limit on the nagios user/group. I'm not exactly sure how the nagios daemon would react; If your nagios process is regularly gobbling up memory, I would think further constraining it would be a bad idea.
Similarly, if your mysql process is gobbling up memory, constraining it further could cause problems with your database.
Similarly, if your mysql process is gobbling up memory, constraining it further could cause problems with your database.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Maximum amount of memory used by Nagios XI
Thanks @mcapra!
A couple of thoughts that probably occurred to you, but I want to make them explicit:
1. You could just add more RAM. It's not a guarantee, but certainly would help.
2. You could increase the threshold on the remote monitor to something like 85, 90, 95 for warning and something hire for critical. Again, this doesn't get at the root cause, but neither does limiting it, really.
Can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the ***Download Profile*** button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.
You can also generate a profile manually using the script at /usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
That should generate a profile in /usr/local/nagiosxi/var/components/ which you can get off the server with an application such as FileZilla.
After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
If you get an error that PROFILE BUILD FAILED, please see https://support.nagios.com/kb/article.p ... ategory=44
UPDATE: Profile shared with techs.
A couple of thoughts that probably occurred to you, but I want to make them explicit:
1. You could just add more RAM. It's not a guarantee, but certainly would help.
2. You could increase the threshold on the remote monitor to something like 85, 90, 95 for warning and something hire for critical. Again, this doesn't get at the root cause, but neither does limiting it, really.
Can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the ***Download Profile*** button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.
You can also generate a profile manually using the script at /usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
That should generate a profile in /usr/local/nagiosxi/var/components/ which you can get off the server with an application such as FileZilla.
After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
If you get an error that PROFILE BUILD FAILED, please see https://support.nagios.com/kb/article.p ... ategory=44
UPDATE: Profile shared with techs.
Last edited by dwhitfield on Tue Oct 24, 2017 11:34 am, edited 1 time in total.
Reason: pm received
Reason: pm received
-
tmattingly
- Posts: 115
- Joined: Thu Oct 23, 2014 12:53 pm
Re: Maximum amount of memory used by Nagios XI
I uploaded the file via PM. I have tried kicking the memory up to 16GB from 4GB to 8GB and then to 16GB and in each case takes over 85-90% of total memory and that's why I asked. If it needs more then so be it but I just want to know if its correctly configured or not.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Maximum amount of memory used by Nagios XI
I would certainly think 16GB RAM would do it. Your profile isn't picking up that much RAM, currently.
I do notice that you were having some performance data issues, which I suspect is related to you not having a ramdisk. Those issues didn't last for long, but I think you'll see overall system performance with https://assets.nagios.com/downloads/nag ... giosXI.pdf
Everything seems to be ok other than a brief period on Friday, but you may want to take a look at https://assets.nagios.com/downloads/nag ... ios-XI.pdf if the ramdisk does not resolve things for you.
I do notice that you were having some performance data issues, which I suspect is related to you not having a ramdisk. Those issues didn't last for long, but I think you'll see overall system performance with https://assets.nagios.com/downloads/nag ... giosXI.pdf
Everything seems to be ok other than a brief period on Friday, but you may want to take a look at https://assets.nagios.com/downloads/nag ... ios-XI.pdf if the ramdisk does not resolve things for you.
-
tmattingly
- Posts: 115
- Joined: Thu Oct 23, 2014 12:53 pm
Re: Maximum amount of memory used by Nagios XI
I've uploaded a new profile to you with 16GB of RAM and a 300mb RAM disk. It shows 9% free of Physical Memory so the performance is likely better but again my question is what is the correct sizing for memory for the VM? Side note: The RAM disk said it installed successfully. I also moved Nagios to an SSD datastore because its almost entirely writes as well.
Tom
Tom
-
kyang
Re: Maximum amount of memory used by Nagios XI
The amount of memory for a VM depends on the type of checks and how many.
According to the documentation that @dwhitfield posted.
https://assets.nagios.com/downloads/nag ... ements.pdf
This is just the minimum, so it goes back to your type of checks and how many which may require more memory and varies for each environment.
According to the documentation that @dwhitfield posted.
https://assets.nagios.com/downloads/nag ... ements.pdf
This is just the minimum, so it goes back to your type of checks and how many which may require more memory and varies for each environment.
-
tmattingly
- Posts: 115
- Joined: Thu Oct 23, 2014 12:53 pm
Re: Maximum amount of memory used by Nagios XI
Regarding the RAM disk. I installed it but were there any other steps to tell Nagios to use it? (I did the steps below and I created it automagically but wanted to confirm if I needed to do any of the other steps)
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Maximum amount of memory used by Nagios XI
I checked your nagios.cfg and one of the logs in your profile and it all seems to be working ok.
Are your graphs working? Are your checks more generally working? If the answer to both of those is yes, then you should be good. The script is designed not to require intervention, but we have the manual instructions in case it fails for some reason.
Are your graphs working? Are your checks more generally working? If the answer to both of those is yes, then you should be good. The script is designed not to require intervention, but we have the manual instructions in case it fails for some reason.
-
tmattingly
- Posts: 115
- Joined: Thu Oct 23, 2014 12:53 pm
Re: Maximum amount of memory used by Nagios XI
Yes. All the graphs seem to be working. I went to 20GB of RAM and it immediately went to 19.3GB use. Is that normal? I will watch it over the next few hours (and overnight if necessary) and see if it goes down. That just seems like *a lot* of memory for our configuration.