fix: Update applications poller to use numeric oid instead of nsExtendOutputFull (#6277)

* fix: Update applications poller to use numeric oid instead of nsExtendOutputFull

* Accidental m
This commit is contained in:
Neil Lathwood
2017-03-31 04:01:40 +01:00
committed by Tony Murray
parent 90be6d1f68
commit a6391ed3e8
15 changed files with 27 additions and 36 deletions

View File

@@ -9,7 +9,7 @@ if (!empty($agent_data['app'][$name])) {
$apache = $agent_data['app'][$name];
} else {
$options = '-O qv';
$oid = 'nsExtendOutputFull.6.97.112.97.99.104.101';
$oid = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.6.97.112.97.99.104.101';
$apache = snmp_get($device, $oid, $options);
update_application($app, $apache);
}

View File

@@ -8,9 +8,8 @@ $name = 'fail2ban';
$app_id = $app['app_id'];
$options = '-O qv';
$mib = 'NET-SNMP-EXTEND-MIB';
$oid = 'nsExtendOutputFull.8.102.97.105.108.50.98.97.110';
$new_component = snmp_walk($device, $oid, $options, $mib);
$oid = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.8.102.97.105.108.50.98.97.110';
$f2b = snmp_walk($device, $oid, $options);
update_application($app, $new_component);
$bannedStuff = explode("\n", $new_component);

View File

@@ -5,9 +5,8 @@ $app_id = $app['app_id'];
use LibreNMS\RRD\RrdDefinition;
$options = '-O qv';
$mib = 'NET-SNMP-EXTEND-MIB';
$oid = 'nsExtendOutLine.13.102.98.115.100.110.102.115.99.108.105.101.110.116';
$nfsclient = snmp_walk($device, $oid, $options, $mib);
$oid = '.1.3.6.1.4.1.8072.1.3.2.4.1.2.13.102.98.115.100.110.102.115.99.108.105.101.110.116';
$nfsclient = snmp_walk($device, $oid, $options);
update_application($app, $nfsclient);
list($getattr, $setattr, $lookup, $readlink, $read, $write, $create, $remove, $rename, $link, $symlink, $mkdir, $rmdir,

View File

@@ -5,9 +5,8 @@ use LibreNMS\RRD\RrdDefinition;
$name = 'fbsd-nfs-server';
$app_id = $app['app_id'];
$options = '-O qv';
$mib = 'NET-SNMP-EXTEND-MIB';
$oid = 'nsExtendOutLine.13.102.98.115.100.110.102.115.115.101.114.118.101.114';
$nfsserver = snmp_walk($device, $oid, $options, $mib);
$oid = '.1.3.6.1.4.1.8072.1.3.2.4.1.2.13.102.98.115.100.110.102.115.115.101.114.118.101.114';
$nfsserver = snmp_walk($device, $oid, $options);
update_application($app, $nfsserver);
list($getattr, $setattr, $lookup, $readlink, $read, $write, $create, $remove, $rename, $link, $symlink,

View File

@@ -5,7 +5,7 @@
use LibreNMS\RRD\RrdDefinition;
$options = '-O qv';
$oid = 'nsExtendOutputFull.11.109.97.105.108.115.99.97.110.110.101.114';
$oid = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.11.109.97.105.108.115.99.97.110.110.101.114';
$mailscanner = snmp_get($device, $oid, $options);
update_application($app, $mailscanner);

View File

@@ -9,8 +9,8 @@ if (!empty($agent_data['app'][$name])) {
$mysql = $agent_data['app'][$name];
} else {
// Polls MySQL statistics from script via SNMP
$mysql_cmd = $config['snmpget'].' -m NET-SNMP-EXTEND-MIB -O qv '.snmp_gen_auth($device).' '.$device['hostname'].':'.$device['port'];
$mysql_cmd .= ' nsExtendOutputFull.5.109.121.115.113.108';
$mysql_cmd = $config['snmpget'].' -O qv '.snmp_gen_auth($device).' '.$device['hostname'].':'.$device['port'];
$mysql_cmd .= '.1.3.6.1.4.1.8072.1.3.2.3.1.2.5.109.121.115.113.108';
$mysql = shell_exec($mysql_cmd);
}

View File

@@ -8,7 +8,7 @@ if (!empty($agent_data['app'][$name])) {
$nginx = $agent_data['app'][$name];
} else {
// Polls nginx statistics from script via SNMP
$nginx = snmp_get($device, 'nsExtendOutputFull.5.110.103.105.110.120', '-Ovq', 'NET-SNMP-EXTEND-MIB');
$nginx = snmp_get($device, '.1.3.6.1.4.1.8072.1.3.2.3.1.2.5.110.103.105.110.120', '-Ovq');
}
update_application($app, $nginx);

View File

@@ -6,9 +6,8 @@ $name = 'nvidia';
$app_id = $app['app_id'];
$options = '-O qv';
$mib = 'NET-SNMP-EXTEND-MIB';
$oid = 'nsExtendOutputFull.6.110.118.105.100.105.97';
$gpus = snmp_walk($device, $oid, $options, $mib);
$oid = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.6.110.118.105.100.105.97';
$gpus = snmp_walk($device, $oid, $options);
update_application($app, $gpus);
$gpuArray = explode("\n", $gpus);

View File

@@ -6,9 +6,8 @@ $name = 'php-fpm';
$app_id = $app['app_id'];
$options = '-O qv';
$mib = 'NET-SNMP-EXTEND-MIB';
$oid = 'nsExtendOutputFull.8.112.104.112.102.112.109.115.112';
$phpfpm = snmp_walk($device, $oid, $options, $mib);
$oid = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.8.112.104.112.102.112.109.115.112';
$phpfpm = snmp_walk($device, $oid, $options);
update_application($app, $phpfpm);
list($pool,$start_time,$start_since,$accepted_conn,$listen_queue,$max_listen_queue,$listen_queue_len,$idle_processes,

View File

@@ -5,11 +5,10 @@ $app_id = $app['app_id'];
use LibreNMS\RRD\RrdDefinition;
$options = '-O qv';
$mib = 'NET-SNMP-EXTEND-MIB';
$queueOID = 'nsExtendOutputFull.5.109.97.105.108.113';
$detailOID = 'nsExtendOutputFull.15.112.111.115.116.102.105.120.100.101.116.97.105.108.101.100';
$mailq = snmp_walk($device, $queueOID, $options, $mib);
$detail= snmp_walk($device, $detailOID, $options, $mib);
$queueOID = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.5.109.97.105.108.113';
$detailOID = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.15.112.111.115.116.102.105.120.100.101.116.97.105.108.101.100';
$mailq = snmp_walk($device, $queueOID, $options);
$detail= snmp_walk($device, $detailOID, $options);
update_application($app, $mailq);
list($incomingq, $activeq, $deferredq, $holdq) = explode("\n", $mailq);

View File

@@ -5,9 +5,8 @@ $app_id = $app['app_id'];
use LibreNMS\RRD\RrdDefinition;
$options = '-O qv';
$mib = 'NET-SNMP-EXTEND-MIB';
$oid = 'nsExtendOutputFull.8.112.111.115.116.103.114.101.115';
$postgres = snmp_walk($device, $oid, $options, $mib);
$oid = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.8.112.111.115.116.103.114.101.115';
$postgres = snmp_walk($device, $oid, $options);
update_application($app, $postgres);
list($backends, $commits, $rollbacks, $read, $hit, $idxscan, $idxtupread, $idxtupfetch, $idxblksread,

View File

@@ -5,15 +5,14 @@
use LibreNMS\RRD\RrdDefinition;
$options = '-O qv';
$mib = 'NET-SNMP-EXTEND-MIB';
$oid = 'nsExtendOutputFull.8.112.111.119.101.114.100.110.115';
$oid = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.8.112.111.119.101.114.100.110.115';
$name = 'powerdns';
$app_id = $app['app_id'];
if ($agent_data['app'][$name]) {
$powerdns = $agent_data['app'][$name];
} else {
$powerdns = snmp_get($device, $oid, $options, $mib);
$powerdns = snmp_get($device, $oid, $options);
}
update_application($app, $powerdns);

View File

@@ -8,7 +8,7 @@ $name = 'shoutcast';
$app_id = $app['app_id'];
$options = '-O qv';
$oid = 'nsExtendOutputFull.9.115.104.111.117.116.99.97.115.116';
$oid = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.9.115.104.111.117.116.99.97.115.116';
$shoutcast = snmp_get($device, $oid, $options);
update_application($app, $shoutcast);

View File

@@ -8,9 +8,8 @@ $name = 'smart';
$app_id = $app['app_id'];
$options = '-O qv';
$mib = 'NET-SNMP-EXTEND-MIB';
$oid = 'nsExtendOutputFull.5.115.109.97.114.116';
$output = snmp_walk($device, $oid, $options, $mib);
$oid = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.5.115.109.97.114.116';
$output = snmp_walk($device, $oid, $options);
update_application($app, $output);
$lines = explode("\n", $output);

View File

@@ -9,7 +9,7 @@ if (!empty($agent_data['app'][$name])) {
update_application($app, $rawdata);
} else {
$options = '-O qv';
$oid = 'nsExtendOutputFull.7.117.110.98.111.117.110.100';
$oid = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.7.117.110.98.111.117.110.100';
$rawdata = snmp_get($device, $oid, $options);
}
#Format Data