Not discovering cores, just 1 CPU

Component Version
LibreNMS 1.47-50-g394c40e
DB Schema 1000
PHP 7.2.11
MySQL 5.5.60-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2

I never noticed this until someone on my team pointed it out, but for all my FortiGate models and some Cisco models it is only discovering 1 CPU and not 4 cores or however many cores should be showing up. I have other types of devices showing the correct amount of cores. Anyone else having this issue?

This device below should have x8

Hello

In order to troubleshoot this issue, the first step is probably to check the SNMP data that the device replies. LibreNMS can only display the information sent by the monitored devices.

Bye
PipoCanaja

Are you talking about this below or can you share the CLI to check what the device replies with?

SNMP[’/usr/bin/snmpget’ ‘-v2c’ ‘-c’ 'COMMUNITY ‘-Ovq’ ‘-M’ ‘/opt/librenms/mibs:/opt/librenms/mibs/fortinet’ ‘udp:HOSTNAME:161’ ‘FORTINET-FORTIGATE-MIB::fgSysCpuUsage.0’]
2

CPU: 2%
RRD[update x.x.x.x/fortigate_cpu.rrd N:2 --daemon unix:/var/run/rrdcached.sock]

Could you try

/usr/bin/snmpwalk -v2c -c COMMUNITY -Ovq -M /opt/librenms/mibs:/opt/librenms/mibs/fortinet udp:HOSTNAME:161 FORTINET-FORTIGATE-MIB::fgSysCpuUsage

(I removed the final 0 and changed to snmpwalk command, so you should get the CpuUsage of all CPUs known to SNMP …)

I replaced “COMMUNITY” with my community and “HOSTNAME” with the IP. The return value I get is “1”

Now, if I’m looking at a FortiAnalyzer…I get this below. I replaced the IPs with x.x.x.x.

Load poller module processors

Attempting to initialize OS: fortios
OS initilized as Generic
SQL[SELECT * FROM processors WHERE device_id=? [18] 0.75ms]

SNMP[’/usr/bin/snmpget’ ‘-v2c’ ‘-c’ 'COMMUNITY ‘-OUQn’ ‘-M’ ‘/opt/librenms/mibs:/opt/librenms/mibs/fortinet’ ‘udp:HOSTNAME:161’ ‘.1.3.6.1.2.1.25.3.3.1.2.1’ ‘.1.3.6.1.2.1.25.3.3.1.2.2’ ‘.1.3.6.1.2.1.25.3.3.1.2.3’ ‘.1.3.6.1.2.1.25.3.3.1.2.4’]
...* = 97
...* = 51
...* = 63
...* = 81

array (
‘.1.3.6.1.2.1.25.3.3.1.2.1’ => ‘97’,
‘.1.3.6.1.2.1.25.3.3.1.2.2’ => ‘51’,
‘.1.3.6.1.2.1.25.3.3.1.2.3’ => ‘63’,
‘.1.3.6.1.2.1.25.3.3.1.2.4’ => ‘81’,
)
97%
RRD[update x.x.x.x/processor-hr-1.rrd N:97 --daemon unix:/var/run/rrdcached.sock]
SQL[UPDATE processors set processor_usage=? WHERE processor_id = ? [97,8] 0.71ms]

51%
RRD[update x.x.x.x/processor-hr-2.rrd N:51 --daemon unix:/var/run/rrdcached.sock]
SQL[UPDATE processors set processor_usage=? WHERE processor_id = ? [51,9] 0.55ms]

63%
RRD[update x.x.x.x/processor-hr-3.rrd N:63 --daemon unix:/var/run/rrdcached.sock]
SQL[UPDATE processors set processor_usage=? WHERE processor_id = ? [63,10] 0.52ms]

81%
RRD[update x.x.x.x/processor-hr-4.rrd N:81 --daemon unix:/var/run/rrdcached.sock]
SQL[UPDATE processors set processor_usage=? WHERE processor_id = ? [81,11] 0.49ms]

Runtime for poller module ‘processors’: 0.0654 seconds with 92576 bytes
SNMP: [1/0.06s] MySQL: [5/0.00s] RRD: [5/0.00s]

Unload poller module processors

RRD[update x.x.x.x/poller-perf-processors.rrd N:0.065359830856323 --daemon unix:/var/run/rrdcached.sock]

Just to be sure, could you copy paste the result of :
/usr/bin/snmpwalk -v2c -c COMMUNITY -M /opt/librenms/mibs:/opt/librenms/mibs/fortinet udp:HOSTNAME:161 FORTINET-FORTIGATE-MIB::fgSysCpuUsage

But to me, it looks like the device only replies one CpuUsage (which is probably an average of the CPUs …)

Here it is, and just a side note, Observium is discovering the cpu core #s correctly.

/usr/bin/snmpwalk -v2c -c COMMUNITY -M /opt/librenms/mibs:/opt/librenms/mibs/fortinet udp:x.x.x.x:161 FORTINET-FORTIGATE-MIB::fgSysCpuUsage
FORTINET-FORTIGATE-MIB::fgSysCpuUsage.0 = Gauge32: 19

Then it is clear. The actual OID only returns 1 value. So somebody must analyse the MIB and the replies from the device to find out if (and where) the information is sent.