For a few days now, all the check about CPU on my servers are at the status “Unknown” after snmp plugin does not return a single value. I tried to reset the snmp conf on server side, check the code in the plugins (pretty hard...) and nothing to do, al lthe status for CPU on Ubuntu servers (18, 20 and 22) are Unknown. I am running the last version of Centreon (22.04.12), running SNMP in version 2c on a private community. It happened after updating all my servers and I can tell the issue started after updating my servers, not the centreon plateform. Any help please !? thanks !!!
For some of my servers, I need to add --snmp-autoreduce or to change the --snmp-timeout.
If you try :
sudo perl /lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --hostname='XXX.XXX.XXX.XXX' --snmp-version='2c' --snmp-community='community' --verbose --mode=cpu --snmp-autoreduce --snmp-timeout=5
Or probably a security issue ?
Update : issue not only occurs on Ubuntu but most of my server, Ubuntu or Centos.
Thanks StanislasR, tried these 2 options, with no luck (I have the result immediately at the command line execution). About Security, I read the CPU values from snmpwalk, with no issue :S
could you please paste a snmpd.conf ( grep -v ^\# /etc/snmp/snmpd.conf | grep . ) , beware password and community in the output
usually the default “systemview” OID is too restrictive, if you follow the guide : Superviser votre premier serveur Linux | Centreon Documentation
you should have added : view centreon included .126.96.36.199
snmpwalk will give you some value, but these are not the snmp OID used
Thanks Christophe, here the conf :
# sec.name source community
com2sec notConfigUser default xxxxxx
# map the security name into a group name:
# groupName securityModel securityName
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
# create a view for us to let the group have rights to:
# name incl/excl subtree mask(optional)
view centreon included .188.8.131.52
view systemview included .184.108.40.206.2.1.1
view systemview included .220.127.116.11.18.104.22.168.1
access notConfigGroup "" any noauth exact centreon none none
access notConfigGroup "" any noauth exact systemview none none
It was not updated recently, worked for a year or so, and still works on some servers
could you do these command on your poller:
the first command is to check which version of your linux plugin, the second is the OID used by centreon for the cpu checks, it should return a few lines for each processor
if the snmpwalk does work correctly, then the only thing I can see is something in your actual running config
that can ben checked easily, with an admin account on centreon, open the detail of one of your cpu check, and scroll down to get the command line
add --debug and give the result
(edit : when I try to paste the command from my poller to give you an example this forum bugs and refuse to post it
/usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=cpu --hostname=xxxx --snmp-version='2c' --snmp-community='xxx'
Also, i figured out one point I mention now. All the servers with the issue are virtualized as containers in Proxmox, that’s the common point I was looking for a while !
Same issue here while posting with errors, loosing all my writtens…
These commands were launched on my monitoring server :
sorry so many errors trying to post the command results ...
rpm command : centreon-plugin-Operatingsystems-Linux-Snmp-20230215-164619.el7.noarch
snmpwalk commands : HOST-RESOURCES-MIB::hrProcessorFrwID.196608 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.196610 = OID: SNMPv2-SMI::zeroDotZero
here is a problem, the “snmpwalk” command on a normal vm/linux should output 2 sub OID
nmpwalk -v 2c -c xxx yyyy 1 .22.214.171.124.126.96.36.199.3
HOST-RESOURCES-MIB::hrProcessorFrwID.196608 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.196609 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorLoad.196608 = INTEGER: 8
HOST-RESOURCES-MIB::hrProcessorLoad.196609 = INTEGER: 8
your output only have the table .188.8.131.52.184.108.40.206.3.1.1
you should also get the table .220.127.116.11.18.104.22.168.3.1.2 which contain the actual CPU Load (used by centreon)
and you should have 1 line per cpu in each table (here my output is for a 2 cpu machine)
clearly you have some snmp working, so no issue with network or right, you can get the hardware table, but no information for the cpu… that’s out of centreon scope, and I don’t know/use proxmox on my side, I have a client that run windows vm on a proxmox, but I don’t use snmp on these windows… so I can’t help
if you can confirm using .22.214.171.124.126.96.36.199.3.1.2 in the snmpwalk, do you get a
“HOST-RESOURCES-MIB::hrProcessorLoad = No Such Instance currently exists at this OID”
I found some page on google saying it could come from the snmpd engine version running on the linux guest
hope that helps