Hi, I’m having issues with the memcached app in LibreNMS not drawing any graphs.
It seems identical to the issue mentioned here https://github.com/librenms/librenms/issues/5265
cat /etc/snmp/snmpd.conf
#rocommunity public
#extend redis /etc/snmp/redis.py
extend memcached /etc/snmp/memcached
extend nginx /etc/snmp/nginx
extend mysql /etc/snmp/mysql
syslocation xxx
syscontact xxx
sysname librenms
rwuser snmp
cat /etc/snmp/memcached
#!/usr/bin/php
<?php
$m = new Memcached();
$m->addServer('localhost', 11211);
$stats = $m->getStats();
if(is_array($stats))
{
echo("<<<app-memcached>>>\n");
echo(serialize($m->getStats()));
echo("\n");
}
?>
./validate.php
====================================
Component | Version
--------- | -------
LibreNMS | 1.67-84-g536bb8ac3
DB Schema | 2020_09_22_172321_add_alert_log_index (174)
PHP | 7.4.10
Python | 3.6.8
MySQL | 10.3.17-MariaDB
RRDTool | 1.7.0
SNMP | NET-SNMP 5.8
====================================
[OK] Composer Version: 1.10.13
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
From the command line i can run /etc/snmp/memcached and it will return a bunch of output, which look fine to me. Memcached is also running fine and i can connect to it.
It’s just the app graphs in LibreNMS that are all showing nan.
Seems like the same bug from https://github.com/librenms/librenms/issues/5265 but i’m not so sure where to file a bug report…
The snmp extends for nginx and mysql work fine.
This is a fresh install on CentOS 8, with nginx, mysql, memcached, rrdcached.
Thanks,
JB
I ran the command ./poller.php -h HOSTNAME -d -r -f -m applications
to look at the output.
I believe the issue is here
SNMP['/usr/bin/snmpget' '-v3' '-l' 'authPriv' '-n' "" '-a' 'SHA' '-A' 'PASSWORD' '-u' 'USER' '-x' 'AES' '-X' 'PASSWORD' '-Oqv' '-M' '/opt/librenms/mibs:/opt/librenms/mibs/supermicro - dell' 'udp:HOSTNAME:161' '.1.3.6.1.4.1.8072.1.3.2.3.1.2.9.109.101.109.99.97.99.104.101.100']
Error in packet
Reason: (tooBig) Response message would have been too large.
Warning: reset() expects parameter 1 to be array, bool given in /opt/librenms/includes/polling/applications/memcached.inc.php on line 14
memcached()SQL[UPDATE `applications` set `app_state`=?,`app_status`=?,`timestamp`=NOW() WHERE `app_id` = ? ["UNKNOWN","",8] 1.17ms]
Unfortunately i’m not knowledgeable enough with php or python, if anyone would be willing to have a look i’d be eternally grateful
JB
Hmm, all is working fine on a Centos 7 installation, which has memcached version 1.4.15.
On my Centos 8 installation, which has memcached version 1.5.9 the issue is there…
I’ll try to investigate further
Debian Buster, memcached 1.5.6
Same issue. How can we solve this?
Did you manage to solve this?
I haven’t…
Yes, it required php and and php-memcached. The documentation doesn’t mention that. If one runs a memcached cluster or dedicated memcached node it should not be required to install php. Someone might be able to develop a memcached script that does not require php. For now it works though.
Here the Ansible task:
- name: Memcached Config
include_tasks: memcached.yml
when: "( librenms_agent_agentlocal|bool ) and ( 'memcached' in librenms_agent_agentlocal_scripts )"
tags: ["librenms-agent","snmpd","memcached"]
- name: Install dependencies for memcached script
become: yes
package:
name:
- php
- php-memcached
state: present
tags: ["librenms-agent","snmpd","memcached"]