Skip to content
This repository was archived by the owner on Dec 13, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function parseStatsFile($statfile)
}

/* Create list of loaded modules */
if (preg_match('/module \/.*\/\d+\-(.*)\.so/', $key, $matches)) {
if (preg_match('/module\s*\/.*\/\d+\-(.*)\.so/', $key, $matches)) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since 20.04, Broker does not put space between "module" and module's path

$result['modules'][$matches[1]] = $json_stats[$key]['state'];
}
}
Expand Down Expand Up @@ -265,7 +265,7 @@ function parseStatsFile($statfile)
while ($row = $stmt->fetch()) {
$statsfile = $row['cache_directory'] . '/' . $row['config_name'] . '-stats.json';
if ($defaultPoller != $selectedPoller) {
$statsfile = _CENTREON_VARLIB_ . '/broker-stats/broker-stats-' . $selectedPoller . '.dat';
$statsfile = _CENTREON_CACHEDIR_ . '/broker-stats/' . $selectedPoller . '/' . $row['config_name'] . '.json';
}
if (!file_exists($statsfile) || !is_readable($statsfile)) {
$perf_err[$row['config_name']] = _('Cannot open statistics file');
Expand Down