Mempool for new os not working

====================================

Component Version
LibreNMS 1.54-54-g25ee86c
DB Schema 2019_07_09_150217_update_users_widgets_settings (140)
PHP 7.1.31-1+ubuntu16.04.1+deb.sury.org+1
MySQL 10.0.38-MariaDB-0ubuntu0.16.04.1
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3

====================================

[OK] Composer Version: 1.9.0
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

Hello,

I’m currently trying to add a new OS into my LibreNMS. I already succeed to add several info to it but I’m block with the memory integration.

First there is the Memory data that i want to include in the module :

root@LibreNMS:/opt/librenms# snmptranslate -m +STONESOFT-FIREWALL-MIB -IR -On fwMemBytesTotal
.1.3.6.1.4.1.1369.5.2.1.11.2.4
root@LibreNMS:/opt/librenms# snmptranslate -m +STONESOFT-FIREWALL-MIB -IR -On fwMemBytesUsed 
.1.3.6.1.4.1.1369.5.2.1.11.2.5
root@LibreNMS:/opt/`librenms`# snmptranslate -m +STONESOFT-FIREWALL-MIB -IR -On fwMemBytesUnused
.1.3.6.1.4.1.1369.5.2.1.11.2.6
root@LibreNMS:/opt/librenms# snmpget -OvQ -v 3 -u xxxxxxxxx -l authPriv -a MD5 -A password -x DES -X password X.X.X.X .1.3.6.1.4.1.1369.5.2.1.11.2.4.0
134995365888 bytes
root@LibreNMS:/opt/librenms# snmpget -OvQ -v 3 -u xxxxxxxxx -l authPriv -a MD5 -A password -x DES -X password X.X.X.X .1.3.6.1.4.1.1369.5.2.1.11.2.5.0
41910607872 bytes
root@LibreNMS:/opt/librenms# snmpget -OvQ -v 3 -u xxxxxxxxx -l authPriv -a MD5 -A password -x DES -X password X.X.X.X .1.3.6.1.4.1.1369.5.2.1.11.2.6.0
93083828224 bytes

There is the description from the MIB :

fwMemoryInfo OBJECT IDENTIFIER ::= { fwHardware 2 }
fwMemBytesTotal OBJECT-TYPE
          SYNTAX      CounterBasedGauge64
          UNITS       "bytes"
          MAX-ACCESS  read-only
          STATUS      current
          DESCRIPTION "Number of available bytes of physical memory"
          ::= { fwMemoryInfo 4 }

fwMemBytesUsed OBJECT-TYPE
          SYNTAX      CounterBasedGauge64
          UNITS       "bytes"
          MAX-ACCESS  read-only
          STATUS      current
          DESCRIPTION "Amount of memory being in use"
          ::= { fwMemoryInfo 5 }

fwMemBytesUnused OBJECT-TYPE
          SYNTAX      CounterBasedGauge64
          UNITS       "bytes"
          MAX-ACCESS  read-only
          STATUS      current
          DESCRIPTION "Amount of unused bytes of physical memory"
          ::= { fwMemoryInfo 6 } 

Then, there is the discovery module that I write :

root@LibreNMS# cat /opt/librenms/includes/discovery/mempools/forcepoint.inc.php
<?php
if (($device['os'] == 'forcepoint-os') || ($device['os'] == 'Forcepoint-OS')) {
    echo 'FORCEPOINT-MEMORY-POOL: ';
    $usage = snmp_get($device, 'fwMemBytesUsed.0', '-OvQ', 'STONESOFT-FIREWALL-MIB');
    if (is_numeric($usage)) {
       discover_mempool($valid_mempool, $device, 0, 'forcepointos', 'Memory', '100', null, null);
    }
}

For me, his module seems to work because when I launch the script ./discovery.php on my device the module retrieve some snmp data :

root@LibreNMS:/opt/librenms# ./discovery.php -h 10
...
#### Load disco module mempools ####
FORCEPOINT-MEMORY-POOL: 
>> Runtime for discovery module 'mempools': 0.2280 seconds with 66216 bytes
>> SNMP: [6/0.22s] MySQL: [1/0.00s] RRD: [0/0.00s]
#### Unload disco module mempools ####
    ...

Finally, there is the polling module which is problematic. There is my code :

root@LibreNMS:/opt/librenms# cat /opt/librenms/includes/polling/mempools/forcepoint.inc.php
<?php
echo 'Forcepoint MemPool \n';
$memory = snmp_get_multi_oid($device, ['fwMemBytesTotal.0', 'fwMemBytesUsed.0', 'fwMemBytesUnused.0'], '-OvQ', 'STONESOFT-FIREWALL-MIB');
$mempool['total'] = $memory['fwMemBytesTotal.0'];
$mempool['used'] = $memory['fwMemBytesUsed.0'];
$mempool['free'] = $memory['fwMemBytesUnused.0'];

And, there is the return form the script ./poller.php :

root@LibreNMS:/opt/librenms# ./poller.php -h 10
...
#### Load poller module mempools ####
>> Runtime for poller module 'mempools': 0.0008 seconds with 1672 bytes
>> SNMP: [0/0.00s] MySQL: [1/0.00s] RRD: [1/0.00s]
#### Unload poller module mempools ####
...

What is strange is that the ‘Forcepoint MemPool’ title of the module doesn’t echo like if the module is not loaded. I’ve checked the right on the file and everything is OK.

My main interrogation is about the type of the OID on the MIB. We can see that the snmpget return a value in bytes and i think the mempool module wait for a percentage value.

Can someone guide me through this problem ?

Thanks in advance.

QD

Hi,

I’ve run the script ./poller.php in debug mode and there is the result for the mempool module :

#### Load poller module mempools ####
SQL[SELECT * FROM mempools WHERE device_id = ? [10] 0.39ms] 
  
Mempool Memory: 0% RRD[update /opt/librenms/rrd/fwl01/mempool-forcepointos-0.rrd N:U:U]

InfluxDB data:  
mempool  
array (
  'hostname' => 'fwl01',
  'mempool_type' => 'forcepointos',
  'mempool_index' => '_blank_',
)  
array (
)  

END  
Caught exception: HTTP Code 400 {"error":"unable to parse 'mempool,hostname=fwl01,mempool_type=forcepointos,mempool_index=_blank_ ': invalid field format"}  
array (
  0 => 
  array (
    'file' => '/opt/librenms/vendor/influxdb/influxdb-php/src/InfluxDB/Database.php',
    'line' => 142,
    'function' => 'writePayload',
    'class' => 'InfluxDB\\Database',
    'type' => '->',
    'args' => 
    array (
      0 => 
      array (
        0 => 'mempool,hostname=fwl01,mempool_type=forcepointos,mempool_index=_blank_ ',
      ),
      1 => 'n',
      2 => NULL,
    ),
  ),
  1 => 
  array (
    'file' => '/opt/librenms/includes/influxdb.inc.php',
    'line' => 80,
    'function' => 'writePoints',
    'class' => 'InfluxDB\\Database',
    'type' => '->',
    'args' => 
    array (
      0 => 
      array (
        0 => 
        InfluxDB\Point::__set_state(array(
           'measurement' => 'mempool',
           'tags' => 
          array (
            'hostname' => 'fwl01',
            'mempool_type' => 'forcepointos',
            'mempool_index' => '_blank_',
          ),
           'fields' => 
          array (
          ),
           'timestamp' => NULL,
        )),
      ),
    ),
  ),
  2 => 
  array (
    'file' => '/opt/librenms/includes/datastore.inc.php',
    'line' => 70,
    'function' => 'influx_update',
    'args' => 
    array (
      0 => 
      array (
        'device_id' => 10,
        'hostname' => 'fwl01',
        'sysName' => 'fwl01',
        'ip' => '',
        'community' => NULL,
        'authlevel' => 'authPriv',
        'authname' => 'User',
        'authpass' => 'Password',
        'authalgo' => 'MD5',
        'cryptopass' => 'Password',
        'cryptoalgo' => 'DES',
        'snmpver' => 'v3',
        'port' => 161,
        'transport' => 'udp',
        'timeout' => NULL,
        'retries' => NULL,
        'snmp_disable' => 0,
        'bgpLocalAs' => NULL,
        'sysObjectID' => '.1.3.6.1.4.1.1369.5.2',
        'sysDescr' => 'Forcepoint NGFW Firewall/VPN',
        'sysContact' => '[email protected]',
        'version' => 'Forcepoint NGFW version X.X.X.XXXX',
        'hardware' => 'Hardware',
        'features' => NULL,
        'location_id' => 4,
        'os' => 'forcepoint-os',
        'status' => 1,
        'status_reason' => '',
        'ignore' => 0,
        'disabled' => 0,
        'uptime' => 14047000.0,
        'agent_uptime' => 0,
        'last_polled' => '2019-10-25 07:35:10',
        'last_poll_attempted' => NULL,
        'last_polled_timetaken' => 8.26,
        'last_discovered_timetaken' => 34.62,
        'last_discovered' => '2019-10-25 07:24:00',
        'last_ping' => '2019-10-25 07:35:10',
        'last_ping_timetaken' => 0.27,
        'purpose' => '',
        'type' => 'firewall',
        'serial' => '56dh23',
        'icon' => 'forcepoint.png',
        'poller_group' => 0,
        'override_sysLocation' => 0,
        'notes' => NULL,
        'port_association_mode' => 1,
        'max_depth' => 0,
        'vrf_lite_cisco' => '',
        'attribs' => 
        array (
          'override_device_type' => '1',
          'ifName_tune:lo' => 'false',
          'discover_route' => '1',
          'discover_wireless' => '0',
          'poll_wireless' => '0',
          'discover_discovery-arp' => '1',
        ),
        'os_group' => 'forcepoint',
        'snmp_max_repeaters' => NULL,
        'snmp_max_oid' => NULL,
      ),
      1 => 'mempool',
      2 => 
      array (
        'mempool_type' => 'forcepointos',
        'mempool_index' => '0',
      ),
      3 => 
      array (
        'used' => NULL,
        'free' => NULL,
      ),
    ),
  ),
  3 => 
  array (
    'file' => '/opt/librenms/includes/polling/mempools.inc.php',
    'line' => 35,
    'function' => 'data_update',
    'args' => 
    array (
      0 => 
      array (
        'device_id' => 10,
        'hostname' => 'fwl01',
        'sysName' => 'fwl01',
        'ip' => '
▒',
        'community' => NULL,
        'authlevel' => 'authPriv',
        'authname' => 'User',
        'authpass' => 'Password',
        'authalgo' => 'MD5',
        'cryptopass' => 'Password',
        'cryptoalgo' => 'DES',
        'snmpver' => 'v3',
        'port' => 161,
        'transport' => 'udp',
        'timeout' => NULL,
        'retries' => NULL,
        'snmp_disable' => 0,
        'bgpLocalAs' => NULL,
        'sysObjectID' => '.1.3.6.1.4.1.1369.5.2',
        'sysDescr' => 'Forcepoint NGFW Firewall/VPN',
        'sysContact' => '[email protected]',
        'version' => 'Forcepoint NGFW version X.X.X.XXXX',
        'hardware' => 'Hardware',
        'features' => NULL,
        'location_id' => 4,
        'os' => 'forcepoint-os',
        'status' => 1,
        'status_reason' => '',
        'ignore' => 0,
        'disabled' => 0,
        'uptime' => 14047000.0,
        'agent_uptime' => 0,
        'last_polled' => '2019-10-25 07:35:10',
        'last_poll_attempted' => NULL,
        'last_polled_timetaken' => 8.26,
        'last_discovered_timetaken' => 34.62,
        'last_discovered' => '2019-10-25 07:24:00',
        'last_ping' => '2019-10-25 07:35:10',
        'last_ping_timetaken' => 0.27,
        'purpose' => '',
        'type' => 'firewall',
        'serial' => '56dh2316lm-423x4s3z27',
        'icon' => 'forcepoint.png',
        'poller_group' => 0,
        'override_sysLocation' => 0,
        'notes' => NULL,
        'port_association_mode' => 1,
        'max_depth' => 0,
        'vrf_lite_cisco' => '',
        'attribs' => 
        array (
          'override_device_type' => '1',
          'ifName_tune:lo' => 'false',
          'discover_route' => '1',
          'discover_wireless' => '0',
          'poll_wireless' => '0',
          'discover_discovery-arp' => '1',
        ),
        'os_group' => 'forcepoint',
        'snmp_max_repeaters' => NULL,
        'snmp_max_oid' => NULL,
      ),
      1 => 'mempool',
      2 => 
      array (
        'mempool_type' => 'forcepointos',
        'mempool_index' => '0',
        'rrd_name' => 
        array (
          0 => 'mempool',
          1 => 'forcepointos',
          2 => '0',
        ),
        'rrd_def' => 
        LibreNMS\RRD\RrdDefinition::__set_state(array(
           'dataSets' => 
          array (
            0 => 
            array (
              0 => 'used',
              1 => 'GAUGE',
              2 => 600,
              3 => 0,
              4 => 'U',
            ),
            1 => 
            array (
              0 => 'free',
              1 => 'GAUGE',
              2 => 600,
              3 => 0,
              4 => 'U',
            ),
          ),
        )),
      ),
      3 => 
      array (
        'used' => NULL,
        'free' => NULL,
      ),
    ),
  ),
  4 => 
  array (
    'file' => '/opt/librenms/includes/polling/functions.inc.php',
    'line' => 309,
    'args' => 
    array (
      0 => '/opt/librenms/includes/polling/mempools.inc.php',
    ),
    'function' => 'include',
  ),
  5 => 
  array (
    'file' => '/opt/librenms/poller.php',
    'line' => 173,
    'function' => 'poll_device',
    'args' => 
    array (
      0 => 
      array (
        'device_id' => 10,
        'hostname' => 'fwl01',
        'sysName' => 'fwl01',
        'ip' => '
▒',
        'community' => NULL,
        'authlevel' => 'authPriv',
        'authname' => 'User',
        'authpass' => 'Password',
        'authalgo' => 'MD5',
        'cryptopass' => 'Password',
        'cryptoalgo' => 'DES',
        'snmpver' => 'v3',
        'port' => 161,
        'transport' => 'udp',
        'timeout' => NULL,
        'retries' => NULL,
        'snmp_disable' => 0,
        'bgpLocalAs' => NULL,
        'sysObjectID' => '.1.3.6.1.4.1.1369.5.2',
        'sysDescr' => 'Forcepoint NGFW Firewall/VPN',
        'sysContact' => '[email protected]',
        'version' => 'Forcepoint NGFW version X.X.X.XXXX',
        'hardware' => 'Hardware',
        'features' => NULL,
        'location_id' => 4,
        'os' => 'forcepoint-os',
        'status' => 1,
        'status_reason' => '',
        'ignore' => 0,
        'disabled' => 0,
        'uptime' => 14047000.0,
        'agent_uptime' => 0,
        'last_polled' => '2019-10-25 07:35:10',
        'last_poll_attempted' => NULL,
        'last_polled_timetaken' => 8.26,
        'last_discovered_timetaken' => 34.62,
        'last_discovered' => '2019-10-25 07:24:00',
        'last_ping' => '2019-10-25 07:35:10',
        'last_ping_timetaken' => 0.27,
        'purpose' => '',
        'type' => 'firewall',
        'serial' => '56dh2316lm-423x4s3z27',
        'icon' => 'forcepoint.png',
        'poller_group' => 0,
        'override_sysLocation' => 0,
        'notes' => NULL,
        'port_association_mode' => 1,
        'max_depth' => 0,
        'vrf_lite_cisco' => '',
        'attribs' => 
        array (
          'override_device_type' => '1',
          'ifName_tune:lo' => 'false',
          'discover_route' => '1',
          'discover_wireless' => '0',
          'poll_wireless' => '0',
          'discover_discovery-arp' => '1',
        ),
        'os_group' => 'forcepoint',
        'snmp_max_repeaters' => NULL,
        'snmp_max_oid' => NULL,
      ),
      1 => false,
    ),
  ),
)  
SQL[UPDATE `mempools` set `mempool_used`=?,`mempool_perc`=?,`mempool_free`=?,`mempool_total`=? WHERE `mempool_id` = ? [null,0,null,null,81] 1.37ms] 
  


>> Runtime for poller module 'mempools': 0.0041 seconds with 12656 bytes
>> SNMP: [0/0.00s] MySQL: [2/0.00s] RRD: [2/0.00s]
#### Unload poller module mempools ####

What I don’t understand is why the mempool table entry mempool_index is empty. It produce an error that block the collect of data in order to graph memory consummation :

Caught exception: HTTP Code 400 {"error":"unable to parse 'mempool,hostname=fwl01,mempool_type=forcepointos,mempool_index=_blank_ ': invalid field format"}

I’ve tried to force the value of mempool_index but it didn’t change anything.

On the page https://docs.librenms.org/Developing/os/Mem-CPU-Information/, there is no mention of an index to set.

I’m a bit lost, an someone help me.

Thanks in advance.

QD

Can you post the output of ./poller.php -h HOSTNAME -d -m mempools

Thanks @laf. There is the output :

./poller.php -h10 -d -m mempools  
 Poller
SQL[select `migration` from `migrations` order by `id` desc limit 1 [] 0.27ms] 
  
SQL[select count(*) as aggregate from `migrations` limit 1 [] 0.16ms] 
  
SQL[SELECT version() [] 0.12ms] 
  
===================================
Version info:
Commit SHA: 25ee86c9ade5826a4ffff15e4d5f34421394df6a
Commit Date: 1566529196
DB Schema: 2019_07_09_150217_update_users_widgets_settings (140)
PHP: 7.1.33-4+ubuntu16.04.1+deb.sury.org+1
MySQL: 10.0.38-MariaDB-0ubuntu0.16.04.1
RRDTool: 1.5.5
SNMP: NET-SNMP 5.7.3
==================================DEBUG!
Updating os_def.cache...  
Done  
Using authentication for InfluxDB  
http transport being used  
Override poller modules: mempools  
Starting polling run:

SQL[SELECT * FROM `devices` WHERE `disabled` = 0 AND `device_id` = 10 ORDER BY `device_id` ASC [] 0.89ms] 
  
SQL[SELECT * FROM devices_attribs WHERE `device_id` = ? [10] 0.14ms] 
  
Hostname:    fwl01
Device ID:   10
OS:          forcepoint-os
Resolved IP: X.X.X.X
 (forcepoint)

[FPING] /usr/bin/fping -e -q -c 3 -p 500 -t 500 fwl01  
array (
  'xmt' => '3',
  'rcv' => '3',
  'loss' => '0',
  'min' => '0.33',
  'max' => '0.60',
  'avg' => '0.48',
  'exitcode' => 0,
)  
SQL[INSERT IGNORE INTO `device_perf` (`xmt`,`rcv`,`loss`,`min`,`max`,`avg`,`device_id`,`timestamp`,`debug`)  VALUES (:xmt,:rcv,:loss,:min,:max,:avg,:device_id,NOW(),:debug) {"xmt":"3","rcv":"3","loss":"0","min":"0.33","max":"0.60","avg":"0.48","device_id":10,"debug":"[]"} 1.78ms] 
  
SNMP Check response code: 0  
Modules status: Global+  
OS  
Device  

#### Load poller module core ####
SNMP['/usr/bin/snmpget' '-v3' '-l' 'authPriv' '-n' "" '-a' 'MD5' '-A' 'PASSWORD' '-u' 'USER' '-x' 'DES' '-X' 'PASSWORD' '-OQnUt' '-m' 'SNMPv2-MIB' '-M' '/opt/librenms/mibs:/opt/librenms/mibs/forcepoint' 'udp:HOSTNAME:161' 'sysUpTime.0' 'sysLocation.0' 'sysContact.0' 'sysName.0' 'sysObjectID.0' 'sysDescr.0']
.*.*.0 = 223699783
.*.*.0 = LOCATION
.*.*.0 = [email protected]
.*.*.0 = fwl01
.*.*.0 = .*.4.1.1369.5.2
.*.*.0 = Forcepoint NGFW Firewall/VPN  
  
SNMP['/usr/bin/snmpget' '-v3' '-l' 'authPriv' '-n' "" '-a' 'MD5' '-A' 'PASSWORD' '-u' 'USER' '-x' 'DES' '-X' 'PASSWORD' '-OQnUst' '-m' 'HOST-RESOURCES-MIB:SNMP-FRAMEWORK-MIB' '-M' '/opt/librenms/mibs:/opt/librenms/mibs/forcepoint' 'udp:HOSTNAME:161' 'snmpEngineTime.0' 'hrSystemUptime.0']
snmpEngineTime.0 = No Such Object available on this agent at this OID
hrSystemUptime.0 = No Such Object available on this agent at this OID  
  
Uptime seconds: 2236998  
RRD[update /opt/librenms/rrd/fwl01/uptime.rrd N:2236998]

InfluxDB data:  
uptime  
array (
  'hostname' => 'fwl01',
)  
array (
  'uptime' => 2236998.0,
)  

END  
Uptime:  25 days 21 hours 23 minutes 18 seconds
SQL[select * from `locations` where (`location` = ?) limit 1 ["LOCATION"] 0.28ms] 
  

>> Runtime for poller module 'core': 0.0777 seconds with 977432 bytes
>> SNMP: [2/0.07s] MySQL: [0/0.00s] RRD: [1/0.00s]
#### Unload poller module core ####

RRD[update /opt/librenms/rrd/fwl01/poller-perf-core.rrd N:0.077714920043945]

InfluxDB data:  
poller-perf  
array (
  'hostname' => 'fwl01',
  'module' => 'core',
)  
array (
  'poller' => 0.07771492004394531,
)  

END  
Modules status: Global+  
OS  
Device  

#### Load poller module mempools ####
SQL[SELECT * FROM mempools WHERE device_id = ? [10] 0.36ms] 
  
Mempool Physical Memory: 0% RRD[update /opt/librenms/rrd/fwl01/mempool-forcepointos-0.rrd N:U:U]

InfluxDB data:  
mempool  
array (
  'hostname' => 'fwl01',
  'mempool_type' => 'forcepointos',
  'mempool_index' => '_blank_',
)  
array (
)  

END  
Caught exception: HTTP Code 400 {"error":"unable to parse 'mempool,hostname=fwl01,mempool_type=forcepointos,mempool_index=_blank_ ': invalid field format"}  
array (
  0 => 
  array (
    'file' => '/opt/librenms/vendor/influxdb/influxdb-php/src/InfluxDB/Database.php',
    'line' => 142,
    'function' => 'writePayload',
    'class' => 'InfluxDB\\Database',
    'type' => '->',
    'args' => 
    array (
      0 => 
      array (
        0 => 'mempool,hostname=fwl01,mempool_type=forcepointos,mempool_index=_blank_ ',
      ),
      1 => 'n',
      2 => NULL,
    ),
  ),
  1 => 
  array (
    'file' => '/opt/librenms/includes/influxdb.inc.php',
    'line' => 80,
    'function' => 'writePoints',
    'class' => 'InfluxDB\\Database',
    'type' => '->',
    'args' => 
    array (
      0 => 
      array (
        0 => 
        InfluxDB\Point::__set_state(array(
           'measurement' => 'mempool',
           'tags' => 
          array (
            'hostname' => 'fwl01',
            'mempool_type' => 'forcepointos',
            'mempool_index' => '_blank_',
          ),
           'fields' => 
          array (
          ),
           'timestamp' => NULL,
        )),
      ),
    ),
  ),
  2 => 
  array (
    'file' => '/opt/librenms/includes/datastore.inc.php',
    'line' => 70,
    'function' => 'influx_update',
    'args' => 
    array (
      0 => 
      array (
        'device_id' => 10,
        'hostname' => 'fwl01',
        'sysName' => 'fwl01',
        'ip' => '
▒',
        'community' => NULL,
        'authlevel' => 'authPriv',
        'authname' => 'USER',
        'authpass' => 'PASSWORD',
        'authalgo' => 'MD5',
        'cryptopass' => 'PASSWORD',
        'cryptoalgo' => 'DES',
        'snmpver' => 'v3',
        'port' => 161,
        'transport' => 'udp',
        'timeout' => NULL,
        'retries' => NULL,
        'snmp_disable' => 0,
        'bgpLocalAs' => NULL,
        'sysObjectID' => '.1.3.6.1.4.1.1369.5.2',
        'sysDescr' => 'Forcepoint NGFW Firewall/VPN',
        'sysContact' => '[email protected]',
        'version' => 'Forcepoint NGFW version 6.5.6.21353',
        'hardware' => '3305-3-C1',
        'features' => NULL,
        'location_id' => 4,
        'os' => 'forcepoint-os',
        'status' => 1,
        'status_reason' => '',
        'ignore' => 0,
        'disabled' => 0,
        'uptime' => 2236998.0,
        'agent_uptime' => 0,
        'last_polled' => '2020-02-19 09:19:35',
        'last_poll_attempted' => NULL,
        'last_polled_timetaken' => 1.8900000000000001,
        'last_discovered_timetaken' => 1.41,
        'last_discovered' => '2020-02-19 09:21:53',
        'last_ping' => '2020-02-19 09:19:35',
        'last_ping_timetaken' => 0.48,
        'purpose' => '',
        'type' => 'firewall',
        'serial' => 'SERIAL_NUMBER',
        'icon' => 'forcepoint.png',
        'poller_group' => 0,
        'override_sysLocation' => 0,
        'notes' => NULL,
        'port_association_mode' => 1,
        'max_depth' => 0,
        'vrf_lite_cisco' => '',
        'attribs' => 
        array (
          'override_device_type' => '1',
          'ifName_tune:lo' => 'false',
          'discover_route' => '1',
          'discover_wireless' => '0',
          'poll_wireless' => '0',
          'discover_discovery-arp' => '1',
        ),
        'os_group' => 'forcepoint',
        'snmp_max_repeaters' => NULL,
        'snmp_max_oid' => NULL,
      ),
      1 => 'mempool',
      2 => 
      array (
        'mempool_type' => 'forcepointos',
        'mempool_index' => '0',
      ),
      3 => 
      array (
        'used' => NULL,
        'free' => NULL,
      ),
    ),
  ),
  3 => 
  array (
    'file' => '/opt/librenms/includes/polling/mempools.inc.php',
    'line' => 35,
    'function' => 'data_update',
    'args' => 
    array (
      0 => 
      array (
        'device_id' => 10,
        'hostname' => 'fwl01',
        'sysName' => 'fwl01',
        'ip' => '
▒',
        'community' => NULL,
        'authlevel' => 'authPriv',
        'authname' => 'USER',
        'authpass' => 'PASSWORD',
        'authalgo' => 'MD5',
        'cryptopass' => 'PASSWORD',
        'cryptoalgo' => 'DES',
        'snmpver' => 'v3',
        'port' => 161,
        'transport' => 'udp',
        'timeout' => NULL,
        'retries' => NULL,
        'snmp_disable' => 0,
        'bgpLocalAs' => NULL,
        'sysObjectID' => '.1.3.6.1.4.1.1369.5.2',
        'sysDescr' => 'Forcepoint NGFW Firewall/VPN',
        'sysContact' => '[email protected]',
        'version' => 'Forcepoint NGFW version 6.5.6.21353',
        'hardware' => '3305-3-C1',
        'features' => NULL,
        'location_id' => 4,
        'os' => 'forcepoint-os',
        'status' => 1,
        'status_reason' => '',
        'ignore' => 0,
        'disabled' => 0,
        'uptime' => 2236998.0,
        'agent_uptime' => 0,
        'last_polled' => '2020-02-19 09:19:35',
        'last_poll_attempted' => NULL,
        'last_polled_timetaken' => 1.8900000000000001,
        'last_discovered_timetaken' => 1.41,
        'last_discovered' => '2020-02-19 09:21:53',
        'last_ping' => '2020-02-19 09:19:35',
        'last_ping_timetaken' => 0.48,
        'purpose' => '',
        'type' => 'firewall',
        'serial' => 'SERIAL_NUMBER',
        'icon' => 'forcepoint.png',
        'poller_group' => 0,
        'override_sysLocation' => 0,
        'notes' => NULL,
        'port_association_mode' => 1,
        'max_depth' => 0,
        'vrf_lite_cisco' => '',
        'attribs' => 
        array (
          'override_device_type' => '1',
          'ifName_tune:lo' => 'false',
          'discover_route' => '1',
          'discover_wireless' => '0',
          'poll_wireless' => '0',
          'discover_discovery-arp' => '1',
        ),
        'os_group' => 'forcepoint',
        'snmp_max_repeaters' => NULL,
        'snmp_max_oid' => NULL,
      ),
      1 => 'mempool',
      2 => 
      array (
        'mempool_type' => 'forcepointos',
        'mempool_index' => '0',
        'rrd_name' => 
        array (
          0 => 'mempool',
          1 => 'forcepointos',
          2 => '0',
        ),
        'rrd_def' => 
        LibreNMS\RRD\RrdDefinition::__set_state(array(
           'dataSets' => 
          array (
            0 => 
            array (
              0 => 'used',
              1 => 'GAUGE',
              2 => 600,
              3 => 0,
              4 => 'U',
            ),
            1 => 
            array (
              0 => 'free',
              1 => 'GAUGE',
              2 => 600,
              3 => 0,
              4 => 'U',
            ),
          ),
        )),
      ),
      3 => 
      array (
        'used' => NULL,
        'free' => NULL,
      ),
    ),
  ),
  4 => 
  array (
    'file' => '/opt/librenms/includes/polling/functions.inc.php',
    'line' => 309,
    'args' => 
    array (
      0 => '/opt/librenms/includes/polling/mempools.inc.php',
    ),
    'function' => 'include',
  ),
  5 => 
  array (
    'file' => '/opt/librenms/poller.php',
    'line' => 173,
    'function' => 'poll_device',
    'args' => 
    array (
      0 => 
      array (
        'device_id' => 10,
        'hostname' => 'fwl01',
        'sysName' => 'fwl01',
        'ip' => '
▒',
        'community' => NULL,
        'authlevel' => 'authPriv',
        'authname' => 'USER',
        'authpass' => 'PASSWORD',
        'authalgo' => 'MD5',
        'cryptopass' => 'PASSWORD',
        'cryptoalgo' => 'DES',
        'snmpver' => 'v3',
        'port' => 161,
        'transport' => 'udp',
        'timeout' => NULL,
        'retries' => NULL,
        'snmp_disable' => 0,
        'bgpLocalAs' => NULL,
        'sysObjectID' => '.1.3.6.1.4.1.1369.5.2',
        'sysDescr' => 'Forcepoint NGFW Firewall/VPN',
        'sysContact' => '[email protected]',
        'version' => 'Forcepoint NGFW version 6.5.6.21353',
        'hardware' => '3305-3-C1',
        'features' => NULL,
        'location_id' => 4,
        'os' => 'forcepoint-os',
        'status' => 1,
        'status_reason' => '',
        'ignore' => 0,
        'disabled' => 0,
        'uptime' => 2236998.0,
        'agent_uptime' => 0,
        'last_polled' => '2020-02-19 09:19:35',
        'last_poll_attempted' => NULL,
        'last_polled_timetaken' => 1.8900000000000001,
        'last_discovered_timetaken' => 1.41,
        'last_discovered' => '2020-02-19 09:21:53',
        'last_ping' => '2020-02-19 09:19:35',
        'last_ping_timetaken' => 0.48,
        'purpose' => '',
        'type' => 'firewall',
        'serial' => 'SERIAL_NUMBER',
        'icon' => 'forcepoint.png',
        'poller_group' => 0,
        'override_sysLocation' => 0,
        'notes' => NULL,
        'port_association_mode' => 1,
        'max_depth' => 0,
        'vrf_lite_cisco' => '',
        'attribs' => 
        array (
          'override_device_type' => '1',
          'ifName_tune:lo' => 'false',
          'discover_route' => '1',
          'discover_wireless' => '0',
          'poll_wireless' => '0',
          'discover_discovery-arp' => '1',
        ),
        'os_group' => 'forcepoint',
        'snmp_max_repeaters' => NULL,
        'snmp_max_oid' => NULL,
      ),
      1 => true,
    ),
  ),
)  
SQL[UPDATE `mempools` set `mempool_used`=?,`mempool_perc`=?,`mempool_free`=?,`mempool_total`=? WHERE `mempool_id` = ? [null,0,null,null,85] 1.02ms] 
  


>> Runtime for poller module 'mempools': 0.0033 seconds with 12712 bytes
>> SNMP: [0/0.00s] MySQL: [2/0.00s] RRD: [2/0.00s]
#### Unload poller module mempools ####

RRD[update /opt/librenms/rrd/fwl01/poller-perf-mempools.rrd N:0.0033431053161621]

InfluxDB data:  
poller-perf  
array (
  'hostname' => 'fwl01',
  'module' => 'mempools',
)  
array (
  'poller' => 0.0033431053161621094,
)  

END  
### Start Device Groups ###
SQL[select * from `devices` where `devices`.`device_id` = ? limit 1 [10] 0.44ms] 
  
SQL[select * from `device_groups` [] 0.11ms] 
  
SQL[select * from `device_group_device` where `device_id` = ? [10] 0.15ms] 
  
Groups Added:  
Groups Removed:  
### End Device Groups, runtime: 0.0041s ### 

RRD[update /opt/librenms/rrd/fwl01/ping-perf.rrd N:0.48]

InfluxDB data:  
ping-perf  
array (
  'hostname' => 'fwl01',
)  
array (
  'ping' => 0.48,
)  

END  
RRD[update /opt/librenms/rrd/fwl01/poller-perf.rrd N:1.144]

InfluxDB data:  
poller-perf  
array (
  'hostname' => 'fwl01',
  'module' => 'ALL',
)  
array (
  'poller' => 1.144,
)  

END  
SQL[UPDATE `devices` set `uptime`=?,`last_ping`=NOW(),`last_ping_timetaken`=? WHERE `device_id` = ? [2236998,"0.48",10] 1.11ms] 
  
Updating fwl01  

Polled in 1.144 seconds
#### Start Alerts ####
SQL[select * from `devices` where `devices`.`device_id` = ? limit 1 [10] 0.4ms] 
  
SQL[select `device_groups`.*, `device_group_device`.`device_id` as `pivot_device_id`, `device_group_device`.`device_group_id` as `pivot_device_group_id` from `device_groups` inner join `device_group_device` on `device_groups`.`id` = `device_group_device`.`device_group_id` where `device_group_device`.`device_id` = ? [10] 0.19ms] 
  
SQL[select exists(select * from `alert_schedule` inner join `alert_schedulables` on `alert_schedule`.`schedule_id` = `alert_schedulables`.`schedule_id` where ((`recurring` = ? and `start` <= NOW() and `end` >= NOW()) or (`recurring` = ? and (`start_recurring_dt` <= date_format(NOW(), '--%d') and (`end_recurring_dt` >= date_format(NOW(), '--%d') or `end_recurring_dt` is null or `end_recurring_dt` = ? or `end_recurring_dt` = ?)) and `start_recurring_hr` <= date_format(NOW(), '%H:%i:%s') and `end_recurring_hr` >= date_format(NOW(), '%H:%i:%s') and (`recurring_day` like CONCAT('%', date_format(NOW(), ''), '%') or `recurring_day` is null or `recurring_day` = ?))) and ((`alert_schedulable_type` = ? and `alert_schedulable_id` = ?) or (`alert_schedulable_type` = ? and 0 = 1))) as `exists` [0,1,"0000-00-00","","","device",10,"device_group"] 0.47ms] 
  
SQL[SELECT DISTINCT a.* FROM alert_rules a
        LEFT JOIN alert_device_map d ON a.id=d.rule_id
        LEFT JOIN alert_group_map g ON a.id=g.rule_id
        LEFT JOIN device_group_device dg ON g.group_id=dg.device_group_id
        WHERE a.disabled = 0 AND ((d.device_id IS NULL AND g.group_id IS NULL) OR d.device_id=? OR dg.device_id=?) [10,10] 0.22ms] 
  
#### End Alerts ####
SQL[INSERT IGNORE INTO `perf_times` (`type`,`doing`,`start`,`duration`,`devices`,`poller`)  VALUES (:type,:doing,:start,:duration,:devices,:poller) {"type":"poll","doing":"10","start":1582100533.374045,"duration":"1.302","devices":1,"poller":null} 1.16ms] 
  
./poller.php 10 2020-02-19 09:22:14 - 1 devices polled in 1.302 secs  
SNMP [3/0.11s]: Get[3/0.11s] Getnext[0/0.00s] Walk[0/0.00s]
MySQL [8/0.01s]: Cell[1/0.00s] Row[-1/-0.00s] Rows[4/0.00s] Column[0/0.00s] Update[2/0.00s] Insert[2/0.00s] Delete[0/0.00s]
RRD [6/0.00s]: Update[6/0.00s] Create [0/0.00s] Other[0/0.00s]

@laf if needed I can send you the code and the the MIB.

Hi @laf ,

I’m really starting to think that the error code comes from the fact that i have some NULL mandatory var at the end of the polling script.

The thing is, I don’t see any snmpget when the poller module starts. Why?

For the record, i have the same problem with a storage module that I’m trying to develop, the discovery works fine but the polling have the same symptoms.

Regards,

QD

Hi @laf,

I Fu****g find it ! The filenames have to be the same that the os name (This info is not on the documentation).

If the name is diffrent, it’s working for the discovery module but not for the polling one … don’t know why.

Regards,

QD