centreon-plugins icon indicating copy to clipboard operation
centreon-plugins copied to clipboard

vCenter VCSA (PhotonOS) 6.7 Memory : Cant get a single value

Open dids50x opened this issue 4 years ago • 3 comments

Bug report summary

When trying to monitor the memory of a vCenter (appliance VCSA) version 6.7, I got the message UNKNOWN: SNMP GET Request : Cant get a single value..

# /usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=memory --hostname=vCenterIP --snmp-version='3' --snmp-community='community' --snmp-username='username' --authpassphrase='authpassphrase' --authprotocol=SHA --privpassphrase='privpassphrase' --privprotocol=AES --warning-usage-prct='90' --critical-usage-prct='95' --snmp-autoreduce
UNKNOWN: SNMP GET Request : Cant get a single value.
#

But all other checks are ok.

It's the same output with github plugin:

# /usr/lib/centreon/centreon-plugins/centreon_plugins.pl --plugin=os::linux::snmp::plugin --mode=memory --hostname=vCenterIP --snmp-version='3' --snmp-community='community' --snmp-username='username' --authpassphrase='authpassphrase' --authprotocol=SHA --privpassphrase='privpassphrase' --privprotocol=AES --warning-usage-prct='90' --critical-usage-prct='95' --snmp-autoreduce
UNKNOWN: SNMP GET Request : Cant get a single value.
#

I tried to use os::linux::local::snmp like explained in the issue #1370 but it doesn't exist, it's os::linux::local::plugin, and I don't know how to use it:

# /usr/lib/centreon/centreon-plugins/centreon_plugins.pl --plugin=os::linux::local::snmp --mode=memory --hostname=vCenterIP --snmp-version='3' --snmp-community='community' --snmp-username='username' --authpassphrase='authpassphrase' --authprotocol=SHA --privpassphrase='privpassphrase' --privprotocol=AES --warning-usage-prct='90' --critical-usage-prct='95'
UNKNOWN: Cannot load module --plugin.
Can't locate os/linux/local/snmp.pm in @INC (@INC contains: /usr/lib/centreon/centreon-plugins /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/lib/centreon/centreon-plugins/centreon/plugins/misc.pm line 222.
#

# /usr/lib/centreon/centreon-plugins/centreon_plugins.pl --plugin=os::linux::local::plugin --mode=memory --hostname=vCenterIP --snmp-version='3' --snmp-community='community' --snmp-username='username' --authpassphrase='authpassphrase' --authprotocol=SHA --privpassphrase='privpassphrase' --privprotocol=AES --warning-usage-prct='90' --critical-usage-prct='95'
Unknown option: snmp-version at /usr/lib/centreon/centreon-plugins/centreon/plugins/alternative/Getopt.pm line 67.
#

I also had a look to the issue #1111 but it didn't help.

Versions:

# /usr/lib/centreon/centreon-plugins/centreon_plugins.pl --plugin=os::linux::snmp::plugin --version
Plugin Version: 0.1
# rpm -qa | grep centreon | grep -i linux
centreon-plugin-Operatingsystems-Linux-Snmp-20201006-142255.el7.centos.noarch
centreon-plugin-Operatingsystems-Linux-Local-20201006-142255.el7.centos.noarch
#

The wanted information seems to be present at .1.3.6.1.2.1.25.2.3.1, index 18 (I removed the information for the 17 first indexes which are other mount points of the system):

# snmpwalk -v 3 -l authPriv -u username -a SHA -A 'authpassphrase' -x AES -X 'privpassphrase' -O S vCenterIP .1.3.6.1.2.1.25.2.3.1
HOST-RESOURCES-MIB::hrStorageIndex.18 = INTEGER: 18
HOST-RESOURCES-MIB::hrStorageType.18 = OID: HOST-RESOURCES-TYPES::hrStorageRam
HOST-RESOURCES-MIB::hrStorageDescr.18 = STRING: Real Memory
HOST-RESOURCES-MIB::hrStorageAllocationUnits.18 = INTEGER: 1024 Bytes
HOST-RESOURCES-MIB::hrStorageSize.18 = INTEGER: 10230368
HOST-RESOURCES-MIB::hrStorageUsed.18 = INTEGER: 6456524
HOST-RESOURCES-MIB::hrStorageAllocationFailures.18 = Counter32: 0
# 

I can provide all snmpwalk output if needed.

Information about the OS of VCSA:

# cat /etc/*-release
DISTRIB_ID="VMware Photon"
DISTRIB_RELEASE="1.0"
DISTRIB_CODENAME=Photon
DISTRIB_DESCRIPTION="VMware Photon 1.0"
NAME="VMware Photon"
VERSION="1.0"
ID=photon
VERSION_ID=1.0
PRETTY_NAME="VMware Photon/Linux"
ANSI_COLOR="1;34"
HOME_URL="https://vmware.github.io/photon/"
BUG_REPORT_URL="https://github.com/vmware/photon/issues"
VMware Photon Linux 1.0
PHOTON_BUILD_NUMBER=62c543d
#

Could you provide help for monitoring the RAM of VCSA?

Thank you.

Regards,

OS / Environment
/etc/centos-release:CentOS Linux release 7.7.1908 (Core)
/etc/os-release:NAME="CentOS Linux"
/etc/os-release:VERSION="7 (Core)"
/etc/os-release:ID="centos"
/etc/os-release:ID_LIKE="rhel fedora"
/etc/os-release:VERSION_ID="7"
/etc/os-release:PRETTY_NAME="CentOS Linux 7 (Core)"
/etc/os-release:ANSI_COLOR="0;31"
/etc/os-release:CPE_NAME="cpe:/o:centos:centos:7"
/etc/os-release:HOME_URL="https://www.centos.org/"
/etc/os-release:BUG_REPORT_URL="https://bugs.centos.org/"
/etc/os-release:
/etc/os-release:CENTOS_MANTISBT_PROJECT="CentOS-7"
/etc/os-release:CENTOS_MANTISBT_PROJECT_VERSION="7"
/etc/os-release:REDHAT_SUPPORT_PRODUCT="centos"
/etc/os-release:REDHAT_SUPPORT_PRODUCT_VERSION="7"
/etc/os-release:
/etc/redhat-release:CentOS Linux release 7.7.1908 (Core)
/etc/system-release:CentOS Linux release 7.7.1908 (Core)
Centreon version
centreon-release-20.04-1.el7.centos.noarch
centreon-20.04.5-5.el7.centos.noarch
# /usr/lib/centreon/centreon-plugins/centreon_plugins.pl --plugin=os::linux::snmp::plugin --version
Plugin Version: 0.1
# rpm -qa | grep centreon | grep -i linux
centreon-plugin-Operatingsystems-Linux-Snmp-20201006-142255.el7.centos.noarch
centreon-plugin-Operatingsystems-Linux-Local-20201006-142255.el7.centos.noarch
#
Component Name
os::linux::snmp::plugin
Steps To Reproduce

See Bug report summary

Expected behavior

Memory usage.

dids50x avatar Nov 26 '20 17:11 dids50x

You have done that procedure? https://github.com/centreon/centreon-plugins/issues/1370# Ok we need to check storage table.

garnier-quentin avatar Nov 26 '20 17:11 garnier-quentin

No I didn't follow the procedure since it's not the official procedure from VMware, I don't want to break VMware's support.

I followed this procedure: https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.vcsa.doc/GUID-3695CE84-C6DF-497E-BA4E-2B341CC366C5.html

Here are more informations:

# systemctl status snmpd
● snmpd.service - VMware SNMP Server Daemon
   Loaded: loaded (/etc/systemd/system/snmpd.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-11-18 11:02:51 CET; 1 weeks 1 days ago
 Main PID: 1973 (snmpd)
    Tasks: 1
   Memory: 6.5M
      CPU: 26min 2.183s
   CGroup: /system.slice/snmpd.service
           └─1973 /bin/snmpd

Nov 18 11:02:51 inf5svcet805.recette.justice.local systemd[1]: Started VMware SNMP Server Daemon.
Nov 18 11:02:51 inf5svcet805.recette.justice.local snmpd[1973]: 1:serial number longer than rfc 4133 allows, truncating
Nov 21 07:30:01 inf5svcet805.recette.justice.local snmpd[1973]: 2:fetch_processes: skipping '/proc/32613/stat' due to previous error No such file or directory
Nov 26 16:34:39 inf5svcet805.recette.justice.local snmpd[1973]: 3:serial number longer than rfc 4133 allows, truncating
#
# rpm -qa | grep -i snmp
vmware-snmp-1.2.9-1.x86_64
#
Command> snmp.get
Config:
   Port: 161
   Pid: 1973
   Privacy: <priv-protocol>
   Users:
     1:
         Sec_level: priv
         Auth_key: <auth_key-hash>
         Username: <username>
         Priv_key: <priv_key-hash>
   Communities: ''
   Processlist: False
   V3targets:
   Syscontact: ''
   Remoteusers:
   Syslocation: ''
   Engineid: <engine-id>
   Authentication: <auth-protocol>
   Enable: True
   Notraps: ''
   Targets:
   Loglevel: warning

Command>

dids50x avatar Nov 27 '20 09:11 dids50x

Hello, I have exactly the same problem for 3 month with only "check memory command" on my vcenter's vm and 4 qnap nas. For all others linux vm, all work fine. The problem began after update linux plugin package on my centreon server. Could you help me please ? Thanks

Stubing01 avatar Jan 06 '21 09:01 Stubing01

When we use the photonOS, we only have access to net-snmp package (https://github.com/vmware/photon/wiki/Downloading-Photon-OS). We don't have the vmware-snmp package. I think it's specific to esx and vcsa appliance. Could you provide the full snmpwalk ?

snmpwalk -ObentU -v 2c -c public 10.0.0.0 .1 > vcsa.snmpwalk

garnier-quentin avatar Sep 28 '22 09:09 garnier-quentin

We got the snmpwalk elsewhere, feel free yo share yours anyway if you want us to test with your data.

Sims24 avatar Oct 05 '22 14:10 Sims24

You can use the new plugin: apps::vmware::vcsa::snmp::plugin

https://github.com/centreon/centreon-plugins/pull/3963

garnier-quentin avatar Oct 06 '22 08:10 garnier-quentin