Linux SNMP moniotoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Linux SNMP moniotoring

Post by tonkaUser »

Hi,

We are trying to monitor Linux using SNMP v2. We got the below status warning when monitoring CPU and Memory/Swap.
What is causing it? This is for RedHat Linux.

CPU: "put warning and critical info"
Usage: /usr/local/nagios/libexec/check_snmp_load_wizard.pl [-v] -H <host> -C <snmp_community> [-2]

Memory/Swap: "Usage: check_snmp_storage [-v] -H <host> -C <snmp_community> [-2]"
Usage: check_snmp_storage [-v] -H <host> -C <snmp_community> [-2]

Thanks
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Linux SNMP moniotoring

Post by dwhitfield »

By chance does your community string have special chars like a ; $ or & ?? They may need to be escaped.

Can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the ***Download Profile*** button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.

You can also generate a profile manually using the script at /usr/local/nagiosxi/html/includes/components/profile/getprofile.sh

That should generate a profile in /usr/local/nagiosxi/var/components/ which you can get off the server with an application such as FileZilla.

After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.

If you get an error that PROFILE BUILD FAILED, please see https://support.nagios.com/kb/article.p ... ategory=44
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Re: Linux SNMP moniotoring

Post by tonkaUser »

Thanks for the quick reply. Our community string has ! and &. Please let me know how to escape them. I sent a PM with our profile.

Thank you
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Linux SNMP moniotoring

Post by dwhitfield »

! are particularly problematic because it's the escape character for arguments, but \ is the typical escape character in perl, so if you toss one of those in front of each that should work. You may have to fiddle with the " and ' around the string a bit. Every check is a bit different in that regard, but certainly I can do some testing on that plugin if you have problems.
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Re: Linux SNMP moniotoring

Post by tonkaUser »

Thanks. I got it to work. When using SNMP Linux Wizard, I entered the community string as-is. Then, I changed all services to escape the community string.
I have 65 Linux servers that will monitor memory/disks/swap. What's a good way to apply mass changes to the community string?

Thanks
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Linux SNMP moniotoring

Post by cdienger »

If you don't care about the data(if any) that's been collected so far you could remove the services and hosts and run through the wizard again. This would still require some time to do but depending on the setup may be quicker than changing all host and services that were configured.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Re: Linux SNMP moniotoring

Post by tonkaUser »

Is it because the new version of Nagios supports special characters in SNMP community string?
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Linux SNMP moniotoring

Post by cdienger »

There are a few special characters that will need to be escaped in current versions and likely future versions as well. https://support.nagios.com/kb/article/n ... s-580.html has more info.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Re: Linux SNMP moniotoring

Post by tonkaUser »

Thanks. You can close the thread.
Locked