Monitoring Average Memory Consumption

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
gilfalko
Posts: 10
Joined: Sat Oct 26, 2013 8:00 am

Monitoring Average Memory Consumption

Post by gilfalko »

Hi,

Is there a plugin for RAM usage similar to nrpe's check_cpuload?
I have some SQL servers with high memory consumption for which I'd like to receive alerts once the average has been over 80% for a certain amount of time.
How can this be achieved?

Thanks
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Monitoring Average Memory Consumption

Post by tgriep »

can you post the OS type and version of your SQL server?
Be sure to check out our Knowledgebase for helpful articles and solutions!
gilfalko
Posts: 10
Joined: Sat Oct 26, 2013 8:00 am

Re: Monitoring Average Memory Consumption

Post by gilfalko »

MSSQL
Windows Server 2012 R2.

I could do this with a PS script it'd have to be running in the background non-stop.
There must be another way...
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Monitoring Average Memory Consumption

Post by Box293 »

So I did some research on this, and there are some options.

You could create a wrapper script that stores the values for x amount of time and compare them everytime it runs.

However seeing as the service is most likely collecting the performance data and storing it in an RRD file, then you could create a second service that queries the RRD file and calculates if the average has been over 80%.

I found some plugins that sort of do this, but they all seem to need some work get what you want.

This one was the closest, but required rrd_poller and I wasn't sure how to get it working.
https://exchange.nagios.org/directory/P ... pl/details

These seemed to have potential:
https://exchange.nagios.org/directory/P ... es/details

This command can get the data:

Code: Select all

/usr/bin/rrdtool fetch "/usr/local/nagios/share/perfdata/localhost/Swap_Usage.rrd" AVERAGE -s -1d -e -10m
Then it's a simple matter of manipulating it in a script.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
gilfalko
Posts: 10
Joined: Sat Oct 26, 2013 8:00 am

Re: Monitoring Average Memory Consumption

Post by gilfalko »

I appreciate the educated answer.

Using RRD is nice and all but as we say "less is more".
It gave me an idea though.
As all I need to is to store some numbers for a period of time,
I could script a FIFO mechanism using Powershell that just maintains a txt file with a list and disposes of the first line each time it gets full.
All that's left is to send out the average result and we're done :)
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Monitoring Average Memory Consumption

Post by tmcdonald »

Well that's certainly one way to do it!

Feel free to post here if you need help with the Nagios side of things.
Former Nagios employee
Locked