Hi everyone,
Long standing issue here that I can live with but sometimes I really want it fixed. My event log is continually spammed with these lines every time every device is polled:
Failed to create rrd directory: /data/librenms/rrd/<device_name>/
It’s not permissions. I’m a sysadmin and know how to check this, and LibreNMS itself is working just fine. Devices get discovered and polled, graphing is fine and works, alerts work. It’s almost as if it is a purely cosmetic false positive error.
In app/Jobs/PollDevice.php there is a function that looks like it is responsible:
private function initRrdDirectory(): void
{
$host_rrd = \Rrd::name($this->device->hostname, '', '');
if (Config::get('rrd.enable', true) && ! is_dir($host_rrd)) {
try {
mkdir($host_rrd);
Log::info("Created directory : $host_rrd");
} catch (\ErrorException $e) {
Eventlog::log("Failed to create rrd directory: $host_rrd", $this->device);
Log::error($e);
}
}
}
But this is not it. I can comment out the body and nothing changes, the log spam continues. This is also the only file returned by grepping the entire codebase for the error.
This error is being generated somewhere else.
Does anyone know where?
My install is very standard with one exception: rrds are not stored in ./rrd, they are in /data/librenms/rrd and /data is a mountpoint. FS type is XFS.
This is a corporate environment and I must follow my own standards. I update mostly monthly and am one version behind - I need change approval for a code update. None of this should make any difference though.
$ ./validate.php
Component | Version |
---|---|
LibreNMS | 25.2.0 (2025-02-20T12:55:43+02:00) |
DB Schema | 2025_01_30_000121_add_ifindex_index_to_ports_table (315) |
PHP | 8.2.25 |
Python | 3.9.21 |
Database | MariaDB 10.5.27-MariaDB |
RRDTool | 1.7.2 |
SNMP | 5.9.1 |
=========================================== |
[OK] Composer Version: 2.6.6
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQL and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok