Linux SNMP Memory Check - Reported Memory is incorrect

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
dslaughter
Posts: 128
Joined: Wed Feb 20, 2019 3:46 pm

Linux SNMP Memory Check - Reported Memory is incorrect

Post by dslaughter »

https://www.linuxatemyram.com/

check_snmp_storage_wizard.pl reports incorrect free memory. I searched and there a lot of posts reporting this. Is this bug going to be fixed?

I've found a plugin that reports memory correctly - check_snmp_mem.pl. I use the snmp wizard so I need to remove the broken plugin and replace it with the plugin that reports memory correctly. What it the proper way to do this? I can edit the config.xml of the plugin but is that the correct way to do it? It seems like I should be able to do this in CCM.

Wrong
check_snmp_storage_wizard.pl
Physical memory: 34%used(1272MB/3789MB) (<50%) : OK

Correct
check_snmp_mem.pl
Ram : 18%, Swap : 0% : ; OK
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Linux SNMP Memory Check - Reported Memory is incorrect

Post by cdienger »

Thanks for the suggestion. I'll look into updating the wizard.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Linux SNMP Memory Check - Reported Memory is incorrect

Post by cdienger »

An updated wizard is attached. Please test and let me know your thoughts.
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dslaughter
Posts: 128
Joined: Wed Feb 20, 2019 3:46 pm

Re: Linux SNMP Memory Check - Reported Memory is incorrect

Post by dslaughter »

I installed the update and performed a test. I'm getting configuration verification failed.

Nagios Core 4.4.3
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2019-01-15
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Template 'xiwizard_linuxsnmp_mem' specified in service definition could not be not found (config file '/usr/local/nagios/etc/services/noc-1.cfg', starting on line 32)
Error processing object config files!


***> One or more problems was encountered while processing the config files...

define service {
host_name noc-1
service_description / Disk Usage
use xiwizard_linuxsnmp_mem
check_command check_xi_service_snmp_linux_storage! -C $4me --v2c -m "^/$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard linux_snmp
register 1
}

define service {
host_name noc-1
service_description /home Disk Usage
use xiwizard_linuxsnmp_mem
check_command check_xi_service_snmp_linux_storage! -C $4me --v2c -m "^/home$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard linux_snmp
register 1
}

define service {
host_name noc-1
service_description cache.py
use xiwizard_linuxsnmp_process
check_command check_xi_service_snmp_linux_process! -C $4me --v2c -r -n cache.py
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard linux_snmp
register 1
}

define service {
host_name noc-1
service_description CPU Usage
use xiwizard_linuxsnmp_load
check_command check_xi_service_snmp_linux_load! -C $4me --v2c -w 80 -c 90 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard linux_snmp
register 1
}

define service {
host_name noc-1
service_description Memory Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_mem! -C $4me --v2c -w 80,80 -c 90,80
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard linux_snmp
register 1
}
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Linux SNMP Memory Check - Reported Memory is incorrect

Post by cdienger »

Updated and attached.
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dslaughter
Posts: 128
Joined: Wed Feb 20, 2019 3:46 pm

Re: Linux SNMP Memory Check - Reported Memory is incorrect

Post by dslaughter »

I did a quick test but got the same error. I may have bungled the update. I've got to wait til tomorrow before I can look at this again. Thank you for your help. I'll send an update tomorrow to let you know how it went.
dslaughter
Posts: 128
Joined: Wed Feb 20, 2019 3:46 pm

Re: Linux SNMP Memory Check - Reported Memory is incorrect

Post by dslaughter »

I downloaded the file again to make sure I was using the correct one. I got configuration verification failed again. Command output was the same.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Linux SNMP Memory Check - Reported Memory is incorrect

Post by cdienger »

Those may be from the previous config. Try restoring to a good config(Admin > Monitoring Config > Config Snapshots) and make sure that that can apply before running the wizard again.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dslaughter
Posts: 128
Joined: Wed Feb 20, 2019 3:46 pm

Re: Linux SNMP Memory Check - Reported Memory is incorrect

Post by dslaughter »

Sorry for the late reply,

I restored the snapshot but when I used the linux-snmp wizard it just setup the original memory check. I've got some time later today to try this again. I'll restore a snapshot, downlod the updated wizard again and then give it another go.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Linux SNMP Memory Check - Reported Memory is incorrect

Post by cdienger »

Let me know your results and I'll try the same on a clean system. It's possible that through my testing I have configs in place that another system may not.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked