mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge remote-tracking branch 'upstream/master' into exceptions
This commit is contained in:
26
.travis.yml
26
.travis.yml
@@ -1,13 +1,19 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- '5.3'
|
||||
- '5.4'
|
||||
- '5.5'
|
||||
- '5.6'
|
||||
- '7.0'
|
||||
- hhvm
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- php: 5.3
|
||||
script: find . -path './lib/influxdb-php' -prune -o -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
- php: 5.4
|
||||
script: find . -path './lib/influxdb-php' -prune -o -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
- php: 5.5
|
||||
script: find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
- php: 5.6
|
||||
script: find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
- php: 7.0
|
||||
script: find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
- php: hhvm
|
||||
script: find . -path './lib/influxdb-php' -prune -o -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
allow_failures:
|
||||
- php: 7.0
|
||||
- php: 7.0
|
||||
- php: hhvm
|
||||
|
@@ -1,3 +1,5 @@
|
||||
[](https://scrutinizer-ci.com/g/librenms/librenms/build-status/master) [](https://scrutinizer-ci.com/g/librenms/librenms/?branch=master) [](https://travis-ci.org/librenms/librenms)
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
// Generate a list of ports and then call the multi_bits grapher to generate from the list
|
||||
$i = 0;
|
||||
foreach (dbFetchRows('SELECT * FROM `ports` WHERE `device_id` = ? AND `pagpGroupIfIndex` = ?', array($port['device_id'], $port['ifIndex'])) as $int) {
|
||||
$rrd_file = get_port_rrdfile_path ($hostname, int['port_id']);
|
||||
$rrd_file = get_port_rrdfile_path ($hostname, $int['port_id']);
|
||||
if (is_file($rrd_file)) {
|
||||
$rrd_list[$i]['filename'] = $rrd_file;
|
||||
$rrd_list[$i]['descr'] = $int['ifDescr'];
|
||||
|
@@ -76,8 +76,12 @@ $graphs['nfs-v3-stats'] = array(
|
||||
'rpc',
|
||||
);
|
||||
|
||||
$graphs['os-updates'] = array('');
|
||||
$graphs['dhcp-stats'] = array('');
|
||||
$graphs['os-updates'] = array(
|
||||
'packages',
|
||||
);
|
||||
$graphs['dhcp-stats'] = array(
|
||||
'stats',
|
||||
);
|
||||
|
||||
print_optionbar_start();
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
global $config;
|
||||
|
||||
$graphs = array(
|
||||
'dhcp-stats' => 'DHCP Stats',
|
||||
'dhcp-stats_stats' => 'DHCP Stats',
|
||||
);
|
||||
|
||||
foreach ($graphs as $key => $text) {
|
||||
|
@@ -3,7 +3,7 @@
|
||||
global $config;
|
||||
|
||||
$graphs = array(
|
||||
'os-updates' => 'OS updates',
|
||||
'os-updates_packages' => 'OS updates',
|
||||
);
|
||||
|
||||
foreach ($graphs as $key => $text) {
|
||||
|
@@ -1,10 +1,6 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (strstr($sysDescr, 'Neyland 24T')) {
|
||||
$os = 'radlan';
|
||||
} //end if
|
||||
|
||||
if (strstr($sysDescr, 'AT-8000')) {
|
||||
$os = 'radlan';
|
||||
} //end if
|
||||
|
@@ -51,7 +51,7 @@ if (!is_dir($pmxcdir)) {
|
||||
dbUpdate(array('device_id' => $device['device_id'], 'app_type' => 'proxmox', 'app_instance' => $pmxcluster), 'applications', '`device_id` = ? AND `app_type` = ?', array($device['device_id'], 'proxmox'));
|
||||
|
||||
if (count($pmxlines) > 0) {
|
||||
$pmxcache = [];
|
||||
$pmxcache = array();
|
||||
|
||||
foreach ($pmxlines as $vm) {
|
||||
list($vmid, $vmport, $vmpin, $vmpout, $vmdesc) = explode('/', $vm, 5);
|
||||
|
@@ -53,7 +53,8 @@ if ($agent_data['app']['rrdcached']) {
|
||||
while ($max == -1 || $count < $max) {
|
||||
$data .= fgets($sock, 128);
|
||||
if ($max == -1) {
|
||||
$max = explode(' ', $data)[0] + 1;
|
||||
$tmp_max = explode(' ', $data);
|
||||
$max = $tmp_max[0]+1;
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
|
@@ -8,5 +8,7 @@ echo 'Comware OS...';
|
||||
|
||||
$hardware = snmp_get($device, 'sysObjectID.0', '-Osqv', 'SNMPv2-MIB:HH3C-PRODUCT-ID-MIB');
|
||||
|
||||
preg_match('/Software Version (.+), Release ([a-zA-Z0-9]+)/', $poll_device['sysDescr'], $match);
|
||||
list(,$version,$features) = $match;
|
||||
$data = str_replace(",","",$poll_device['sysDescr']);
|
||||
$explodeddata = explode(" ", $data);
|
||||
$version = $explodeddata['6'];
|
||||
$features = $explodeddata['8'];
|
||||
|
@@ -10,6 +10,6 @@
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$version = $poll_device['sysDescr'];
|
||||
$version = explode(' ', $version)[2];
|
||||
$version = explode(' ', $poll_device['sysDescr']);
|
||||
$version = $version[2];
|
||||
$hardware = snmp_get($device, 'IEEE802dot11-MIB::dot11manufacturerProductName.5', '-Ovq');
|
||||
|
@@ -1,16 +1,8 @@
|
||||
<?php
|
||||
|
||||
if ($poll_device['sysDescr'] == 'Neyland 24T') {
|
||||
// $hardware = snmp_get($device, "productIdentificationVendor.0", "-Ovq", "Dell-Vendor-MIB");
|
||||
$hardware = 'Dell '.snmp_get($device, 'productIdentificationDisplayName.0', '-Ovq', 'Dell-Vendor-MIB');
|
||||
$version = snmp_get($device, 'productIdentificationVersion.0', '-Ovq', 'Dell-Vendor-MIB');
|
||||
$icon = 'dell';
|
||||
}
|
||||
else {
|
||||
$version = snmp_get($device, 'rndBrgVersion.0', '-Ovq', 'RADLAN-MIB');
|
||||
$hardware = str_replace('ATI', 'Allied Telesis', $poll_device['sysDescr']);
|
||||
$icon = 'allied';
|
||||
}
|
||||
$version = snmp_get($device, 'rndBrgVersion.0', '-Ovq', 'RADLAN-MIB');
|
||||
$hardware = str_replace('ATI', 'Allied Telesis', $poll_device['sysDescr']);
|
||||
$icon = 'allied';
|
||||
|
||||
$features = snmp_get($device, 'rndBaseBootVersion.00', '-Ovq', 'RADLAN-MIB');
|
||||
|
||||
|
@@ -13,7 +13,12 @@ function get_cache($host, $value) {
|
||||
case 'device_id':
|
||||
// Try by hostname
|
||||
$ip = inet_pton($host);
|
||||
$dev_cache[$host]['device_id'] = dbFetchCell('SELECT `device_id` FROM devices WHERE `hostname` = ? OR `sysName` = ? OR `ip` = ?', array($host, $host, $ip));
|
||||
if (inet_ntop($ip) === false) {
|
||||
$dev_cache[$host]['device_id'] = dbFetchCell('SELECT `device_id` FROM devices WHERE `hostname` = ? OR `sysName` = ?', array($host, $host));
|
||||
}
|
||||
else {
|
||||
$dev_cache[$host]['device_id'] = dbFetchCell('SELECT `device_id` FROM devices WHERE `hostname` = ? OR `sysName` = ? OR `ip` = ?', array($host, $host, $ip));
|
||||
}
|
||||
// If failed, try by IP
|
||||
if (!is_numeric($dev_cache[$host]['device_id'])) {
|
||||
$dev_cache[$host]['device_id'] = dbFetchCell('SELECT `device_id` FROM `ipv4_addresses` AS A, `ports` AS I WHERE A.ipv4_address = ? AND I.port_id = A.port_id', array($host));
|
||||
|
Reference in New Issue
Block a user