Error when adding custom graph in librennms : RrdDefinition not found

I follow the tutorial to add custom graph for Alteon Radware.

Now I have a warning in Librenms saying :

Devices unpolled
It appears as though you have some devices that haven’t completed polling within the last 15 minutes, you may want to check that out :slight_smile:

I execute the poll manualy in debug mode :
./poller.php -h @ip -d -m os -r -f

and I have the following error :

Librenms doesn’t found the RrdDefinition when I make :slight_smile:
use LibreNMS\RRD\RrdDefinition

Thanks for your help

Is your install out of date?


Also, providing the code you are trying to run would be helpful.

Thanks for your quick responce.

yes the script ./validate.php generate 0 error.

The code is situate at includes/polling/os/

<?php $version = "Radware Alteonn " . preg_replace('/[\n\r"]+/','', snmp_get($device,".","-OQv")); $hardware = preg_replace('/[\n\r"]+/', '', snmp_get($device,".","-OQv")); $serial = preg_replace('/[\n\r"]+/', '', snmp_get($device,".","-OQv")); **use LibreNMS\RRD\RrdDefinition;** $cpuSP = preg_replace('/[\n\r"]+/', '', snmp_get($device,'.','-OQv')); if (is_numeric($cpuSP)) { **$rrd_def = RrdDefinition::make()->addDataset('cpuSP', 'GAUGE', 0);** $fields = array( 'cpuSP' => $cpuSP, ); $tags = compact('rrd_def'); data_update($device, 'alteon_cpuSP', $tags, $fields); $graphs['alteon_cpuSP'] = true; } $sessions = preg_replace('/[\n\r"]+/', '', snmp_get($device,'.','-OQv')); if (is_numeric($sessions)) { **$rrd_def = RrdDefinition::make()->addDataset('sessions', 'GAUGE', 0);** $fields = array( 'sessions' => $sessions, ); $tags = compact('rrd_def'); data_update($device, 'alteon_sessions', $tags, $fields); $graphs['alteon_sessions'] = true; }

@Perret_Bastien Do you have and located in the html/includes/graphs/device directory? Those should be the RRD definition files.

yes I have the script in the html/includes/graphs/device directory so I don’t understand