Nagios consuming memory

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Helio
Posts: 9
Joined: Tue Sep 10, 2013 2:08 am

Nagios consuming memory

Post by Helio »

I have an Ubuntu 10.10, and Nagios 3.5.1, and MKlivestatus. At the beginning my ram memory has nearly 50% free (I have 1GB ram). But, day by day, the memory is been consumed. After 5 days working, my system has only 10% memory free, and swap starts working logically. How Nagios increase the use of ram memory? Nagios are sending pings and snmpget commands to 44 different machines (no one are accesible, it´s a test). Why continue consuming memory? Is a problem with MKLivestatus?
Thank you in advanced.
Helio.-
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios consuming memory

Post by tmcdonald »

Can you run the "top" command and post a screenshot or the actual output?
Former Nagios employee
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios consuming memory

Post by abrist »

Helio wrote:Is a problem with MKLivestatus?
Possibly. What does the ram usage look like? What process name is mostly to blame? Are the nagios forks for checks hanging?

Code: Select all

ps -aux
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Helio
Posts: 9
Joined: Tue Sep 10, 2013 2:08 am

Re: Nagios consuming memory

Post by Helio »

This is a screenshot
Attachments
A top screenshot
A top screenshot
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios consuming memory

Post by slansing »

When you restart nagios does your unassigned memory reset to a more suitable number?
Helio
Posts: 9
Joined: Tue Sep 10, 2013 2:08 am

Re: Nagios consuming memory

Post by Helio »

When I restart Nagios, memory goes from 164KB free to 262kB free, but at the begining my system had 500KB free. Day by day my memory continues reducing my free memory. I attach two snapshot, one before de restart Nagios, and the other after restart Nagios.
It should be the use of mklivestatus...
Thank in advanced.
Helio.-
Attachments
before restart.png
Helio
Posts: 9
Joined: Tue Sep 10, 2013 2:08 am

Re: Nagios consuming memory

Post by Helio »

And this is the snapshot after restart...
Attachments
After restart.png
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios consuming memory

Post by abrist »

Lets check the amount of ram that is used for disk buffers:

Code: Select all

free -m
Could you also run:

Code: Select all

ps -aux
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Helio
Posts: 9
Joined: Tue Sep 10, 2013 2:08 am

Re: Nagios consuming memory

Post by Helio »

After 7 days working I did your commented command: free -m
As you can see I think I´m losing buffers day by day (or is not used).
Thank you.
Helio.-
Attachments
Free Memory.png
Free Memory.png (4.48 KiB) Viewed 3469 times
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios consuming memory

Post by abrist »

It looks like you only have around 200mbs free after buffers. It the server load/memory spikes, you start using swap. Can you increase the provisioned ram for this vm?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked