Page 1 of 2

check_snmp_mem vs check_xi_service_snmp_linux_storage

Posted: Tue Nov 12, 2019 11:52 am
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

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Posted: Tue Nov 12, 2019 2:11 pm
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

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Posted: Wed Nov 13, 2019 2:48 pm
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

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Posted: Wed Nov 13, 2019 3:01 pm
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

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Posted: Wed Nov 13, 2019 3:01 pm
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!!!!!!

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Posted: Wed Nov 13, 2019 3:06 pm
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

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Posted: Wed Nov 13, 2019 3:15 pm
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?

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Posted: Wed Nov 13, 2019 3:28 pm
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

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Posted: Wed Nov 13, 2019 3:37 pm
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?

Re: check_snmp_mem vs check_xi_service_snmp_linux_storage

Posted: Wed Nov 13, 2019 5:12 pm
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".