check_snmp_mem vs check_xi_service_snmp_linux_storage

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mbeebe
Posts: 144
Joined: Thu Dec 20, 2018 5:12 pm

check_snmp_mem vs check_xi_service_snmp_linux_storage

Post by mbeebe »

Hello,

Can someone please explain the difference between check_xi_service_snmp_linux_storage and check_snmp_mem as far as memory monitoring goes?

The reason I ask is that since upgrading to 5.6.7, check_snmp_mem is retuning negative values for memory used:

Nagios shows: Ram : -49%, Swap : 5% : > 90, 5 : WARNING

Actual box shows (with free -m):
total used free shared buff/cache available
Mem: 7821 1719 163 2376 5938 3427
Swap: 4095 216 3879

However, our check_xi_service_snmp_linux_storage also reports incorrectly:
(this is a check from a different box)

Nagios: Physical memory: 95%used(3611MB/3792MB) (>95%) : WARNING

Actual box shows (with free -m):
total used free shared buff/cache available
Mem: 3792 210 175 184 3406 3117

Which snmp-based memory check should we be using and what's the difference between the two?

Thanks,

-- Mike Beebe
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Post by scottwilkerson »

check_snmp_mem was not updated in any recent release (not for many years), so I'm not sure why that would be returning negative numbers, what is the full command you are using for that?
mbeebe wrote:However, our check_xi_service_snmp_linux_storage also reports incorrectly:
(this is a check from a different box)

Nagios: Physical memory: 95%used(3611MB/3792MB) (>95%) : WARNING

Actual box shows (with free -m):
total used free shared buff/cache available
Mem: 3792 210 175 184 3406 3117
this one looks pretty close based on the calculation it uses

Code: Select all

Total - Free = Used
3792 - 175 = 3617
Plugin reported 3611MB
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mbeebe
Posts: 144
Joined: Thu Dec 20, 2018 5:12 pm

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Post by mbeebe »

scottwilkerson wrote:check_snmp_mem was not updated in any recent release (not for many years), so I'm not sure why that would be returning negative numbers, what is the full command you are using for that?
mbeebe wrote:However, our check_xi_service_snmp_linux_storage also reports incorrectly:
(this is a check from a different box)

Nagios: Physical memory: 95%used(3611MB/3792MB) (>95%) : WARNING

Actual box shows (with free -m):
total used free shared buff/cache available
Mem: 3792 210 175 184 3406 3117
this one looks pretty close based on the calculation it uses

Code: Select all

Total - Free = Used
3792 - 175 = 3617
Plugin reported 3611MB
This issue for me is free vs. available. There's ~3gigs of memory available, even 'tho "free" memory reports as 175megs. The check should be looking at available memory, not free.

Is there a way to modify the alert so that it reads available memory and not free?

-- Mike Beebe
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Post by scottwilkerson »

I don't know of a SNMP plugin that does this, but I do know it is possible with the XI Linux Agent used in the Linux Wizard and NCPA Agent using the NCPA Wizard
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mbeebe
Posts: 144
Joined: Thu Dec 20, 2018 5:12 pm

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Post by mbeebe »

mbeebe wrote:
scottwilkerson wrote:check_snmp_mem was not updated in any recent release (not for many years), so I'm not sure why that would be returning negative numbers, what is the full command you are using for that?
check_snmp_mem!90,5!95,10!!!!!!
mbeebe
Posts: 144
Joined: Thu Dec 20, 2018 5:12 pm

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Post by mbeebe »

scottwilkerson wrote:I don't know of a SNMP plugin that does this, but I do know it is possible with the XI Linux Agent used in the Linux Wizard and NCPA Agent using the NCPA Wizard
Scott,

Would the same be true of the disk size check agent? Right now, it doesn't correctly return free space, instead it sends the difference between total space and space used which can come out as many gigs, even when there's actually no space available. This bit us this morning.

-- Mike Beebe
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Post by scottwilkerson »

mbeebe wrote:Scott,

Would the same be true of the disk size check agent? Right now, it doesn't correctly return free space, instead it sends the difference between total space and space used which can come out as many gigs, even when there's actually no space available. This bit us this morning.

-- Mike Beebe
I'm not familiar with this happening with disk space checks, can you give an example command you are using and the output?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mbeebe
Posts: 144
Joined: Thu Dec 20, 2018 5:12 pm

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Post by mbeebe »

scottwilkerson wrote:
mbeebe wrote:Scott,

Would the same be true of the disk size check agent? Right now, it doesn't correctly return free space, instead it sends the difference between total space and space used which can come out as many gigs, even when there's actually no space available. This bit us this morning.

-- Mike Beebe
I'm not familiar with this happening with disk space checks, can you give an example command you are using and the output?
check_xi_service_snmp_linux_storage! -C yeahright --v2c -m "^/filesharename$" -w 90 -c 95 -f

Result:
/filesharename: 46%used(46398MB/100661MB)

Actual (df -hl):
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_filesystem 99G 46G 48G 49% /filesharename

As you can see, the check reports 46% used vs. df reporting 49% used.

-- Mike Beebe
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Post by scottwilkerson »

this is bizarre, I've never seen this before, the command for that check just runs

Code: Select all

/usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H xxx.xxx.xxx.xxx -C yeahright --v2c -m "^/filesharename$" -w 90 -c 95 -f
This plugin pulls the data directly from what the system reports via SNMP

One thing of note on your df -hl command
mbeebe wrote:Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_filesystem 99G 46G 48G 49% /filesharename

Code: Select all

46G + 48G = 94G NOT 99G
What is up with that? Why is your df -hl command not adding up?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mbeebe
Posts: 144
Joined: Thu Dec 20, 2018 5:12 pm

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Post by mbeebe »

scottwilkerson wrote:this is bizarre, I've never seen this before, the command for that check just runs

Code: Select all

/usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H xxx.xxx.xxx.xxx -C yeahright --v2c -m "^/filesharename$" -w 90 -c 95 -f
This plugin pulls the data directly from what the system reports via SNMP

One thing of note on your df -hl command
mbeebe wrote:Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_filesystem 99G 46G 48G 49% /filesharename

Code: Select all

46G + 48G = 94G NOT 99G
What is up with that? Why is your df -hl command not adding up?
It's a Linux'ism: 5% of space is reserved for the root user so it can write to a volume even if it's "full".
Locked