mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-26 08:03:51 +02:00
Make app-recognition more efficient
This commit is contained in:
@@ -47,32 +47,17 @@ if ($device['os_group'] == 'unix') {
|
||||
list($section, $data) = explode('>>>', $section);
|
||||
list($sa, $sb) = explode('-', $section, 2);
|
||||
|
||||
if ($section == 'apache') {
|
||||
$sa = 'app';
|
||||
$sb = 'apache';
|
||||
$agentapps = array(
|
||||
"apache",
|
||||
"mysql",
|
||||
"nginx",
|
||||
"bind",
|
||||
"tinydns");
|
||||
|
||||
if (in_array($section, $agentapps)) {
|
||||
$agent_data['app'][$section] = trim($data);
|
||||
}
|
||||
|
||||
if ($section == 'mysql') {
|
||||
$sa = 'app';
|
||||
$sb = 'mysql';
|
||||
}
|
||||
|
||||
if ($section == 'nginx') {
|
||||
$sa = 'app';
|
||||
$sb = 'nginx';
|
||||
}
|
||||
|
||||
if ($section == 'bind') {
|
||||
$sa = 'app';
|
||||
$sb = 'bind';
|
||||
}
|
||||
|
||||
if ($section == 'tinydns') {
|
||||
$sa = 'app';
|
||||
$sb = 'tinydns';
|
||||
}
|
||||
|
||||
// if ($section == "drbd") { $sa = "app"; $sb = "drbd"; }
|
||||
if (!empty($sa) && !empty($sb)) {
|
||||
$agent_data[$sa][$sb] = trim($data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user