Skip to main content

Hi everyone,

 

When i was mounting SNMP checks for a CentOS 7 server, i recieved a really strange result as follows for its RAM usage :

 

Status information

CRITICAL: Ram Total: 1.80 GB Used (-buffers/cache): -130.51 MB (-7.10%) Free: 1.92 GB (107.10%)

 

As you can see the i have USED < 0 and Free > Total… And i’ve verified by lauching a “free” command on the server, the correct RAM usage has nothing to do with that (not just +130.51MB for USED).

Here is my command :

 

/usr/lib/centreon/plugins//centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=memory --hostname=xxx --snmp-version='2c' --snmp-community='xxx' --warning-usage='80' --critical-usage='90' --snmp-timeout='5'

 

Which is quite normal i believe, and other checks SNMP works well for the same server (CPU, Disk...), only check RAM fails. In fact, the version of Net-SNMP installed is 5.7.2 and i can’t upgrade it to 5.8 since the server is in a “closed” VLAN. So before asking my network admin to exceptionally allow the server to get updates outside, i wonder if anyone recognize the error and could provide a solution ?

 

Thank you !

Zequan

 

hello @huangzequan 

have you tried with “ --patch-redhat”

/usr/lib/centreon/plugins//centreon_linux_snmp.pl …….. --help

 

    --patch-redhat
            If using RedHat distribution with net-snmp >= 5.7.2-43 and
            net-snmp < 5.7.2-47. But you should update net-snmp!!!!

            This version: used = memTotalReal - memAvailReal // free =
            memAvailReal

            Others versions: used = memTotalReal - memAvailReal - memBuffer
            - memCached // free = total - used

 

Also, have you considered updating your net-snmp?


Hello @hmorales !

 

Thank you for your indication, RAM check returns now normal statistics.

Yes it will be better if i update the net-snmp, since we organize hosts by groups and basic checks are carried out by service by group, so i don’t really know where to place the “--patch-redhat” option.

 

Thanks again for your help.

 


Hello @huangzequan 

You could add this options on the EXTRAOPTIONS

This macro are used for overloading all your options.

With Plugin Packs, Linux SNMP the EXTRAOPTIONS is named SNMPEXTRAOPTIONS for the Host and by this macro you could add options that are preconfigured on the Plugin Packs.

You could add it at Host level or Service level if EXTRAOPTIONS is present.

Regards,


Hello @gespada

Thank you for the clearification. For my situation i can only apply this at Host level. But when i do, only RAM check works. Other checks SNMP return error messages as they didn’t recognize the “--patch-redhat” option.


Great !

By this you understand how you could add some options and so add some features from the plugins.

Si for your problem, you do add this options at the service level. Configurations - Services - Services by Host and search your Host to see all the Services of your Host and impact the Memory with this options at the EXTRAOPTIONS level.

Or more simply at the Ressources Status, search your Host and by the Service Memory on the tab Shortcuts or others menu like the “...” you could access to the configuration of your service and add the option at the EXTRAOPTIONS.

If this options are not recognized you do update the RPM package of your centreon-plugins on the Poller. But be careful, by this you update the command for all your Linux who is monitored by this Poller, before you update the plugins, backup it. Because between your version and the last version you have maybe some breaking change who break your Linux monitoring with this Poller.

Regards,


I totally agree with you, but the fact is i have a host group containing all linux servers (centos/ redhat/ debian/ ubuntu...) and there are some basic SNMP checks attached to the host group as services by host group. Since the option is only for RedHat distribution with net-snmp >= 5.7.2-43 and net-snmp < 5.7.2-47 as mentionned above, i don’t want to affect it to all checks RAM for my other linux servers.

I believe the best solution now is for me to update the net-snmp. But it will be a little complicated because we are talking about a “fragile” but quite important server situated in a “closed” VLAN. So to perform the update i will need to prepare a little, that’s why i perfer to ask the question here first, to see if there might be a easier way 😄.

Since you mentionned about the centreon-plugins pack, i  also want to report a potential bug (if you work for the Great Centreon) :

Yesterday by updating the RPM package, my checks of Rman-Backup-Problems for Oracle Servers fail due to the warning/ critical Macro option. In fact, by entering the Warning status such as “failed”, the form eventually taken in by Centreon engine is “ --warning='failed' ”. But i think what the “check_oracle.pl” really wants is something like this : “ --warning-failed ”, and i works when i launched manually the command from the centreon server with this option, instead of “ --warning='failed' ”.

I do can create an another check command to turn this over, but that won’t be so just in case of future updates of the perl script.

Thanks a lot.

Best Regards.

 


Hello,

No, i'm not a **Centreonian** members 🙂 just a user like you i imagine.

I think you could open a new question about your problem with the Oracle check.

Maybe a solution is you could update the Plugin Pack about Oracle to have the new definition of the Command.

Perhaps a Centreonian could give you the best practice of updating a Plugin Packs and the propagation of the update to your template.

Regards,


Reply