diff --git a/AUTHORS.md b/AUTHORS.md index 4d1b12a622..9f308ae921 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -5,12 +5,12 @@ LibreNMS is a fork of [Observium][1]. Observium was written by: Contributors to LibreNMS: - Paul Gear (paulgear) -- Neil Lathwood (laf) -- Daniel Preussker (f0o) +- Neil Lathwood (laf) +- Daniel Preussker (f0o) - Bohdan Sanders (bohdan-s) - Toni Cunyat (elbuit) - Tuomas Riihimäki (tuomari) -- Søren Friis Rosiak (rosiak) +- Søren Friis Rosiak (rosiak) - Mike Rostermund (saaldjormike) - Nicolas Armando (nicearma) - Micah Chasteen (mchasteen) @@ -33,7 +33,7 @@ Contributors to LibreNMS: - James Campbell (neokjames) - Steve Calvário (Calvario) - Christian Marg (einhirn) -- Louis Rossouw (spinza) +- Louis Rossouw (spinza) - Clint Armstrong (clinta) - Tony Ditchfield (arnoldthebat) - Travis Hegner (travishegner) @@ -42,6 +42,7 @@ Contributors to LibreNMS: - Rasmus Aberg (rasssta) - Jan Saner (trick77) - Mikhail Bratchikov (pepyaka) +- Aaron Daniels (adaniels21487) [1]: http://observium.org/ "Observium web site" diff --git a/daily.php b/daily.php index 0b20ebf5ff..f9ad6b374a 100644 --- a/daily.php +++ b/daily.php @@ -13,7 +13,33 @@ require 'includes/functions.php'; $options = getopt('f:'); if ($options['f'] === 'update') { - echo $config['update']; + $pool_size = dbFetchCell('SELECT @@innodb_buffer_pool_size'); + // The following query is from the excellent mysqltuner.pl by Major Hayden https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl + $pool_used = dbFetchCell('SELECT SUM(DATA_LENGTH+INDEX_LENGTH) FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ("information_schema", "performance_schema", "mysql") AND ENGINE = "InnoDB" GROUP BY ENGINE ORDER BY ENGINE ASC'); + if ($pool_used > $pool_size) { + if (!empty($config['default_mail'])) { + $subject = $config['project_name'] . ' auto-update action required'; + $message = ' + Hi, + + We have just tried to update your installation but it looks like the InnoDB buffer size is too low. + + Because of this we have stopped the auto-update running to ensure your system is ok. + + You currently have a configured innodb_buffer_pool_size of ' . $pool_size / 1024 / 1024 / 1024 . 'G but is + currently using ' . $pool_used / 1024 / 1024 / 1024 . 'G + + Take a look at https://dev.mysql.com/doc/refman/5.6/en/innodb-buffer-pool.html for further details. + + The ' . $config['project_name'] . ' team. + '; + send_mail($config['default_mail'],$subject,$message,$html=false); + } + echo 0; + } + else { + echo $config['update']; + } } if ($options['f'] === 'syslog') { diff --git a/daily.sh b/daily.sh index 91183d6d1b..52fb11904b 100755 --- a/daily.sh +++ b/daily.sh @@ -1,15 +1,17 @@ -#!/bin/bash +#!/usr/bin/env bash -cd $(dirname $0) || exit 1 +set -eu -if [ $(php daily.php -f update) -eq 1 ]; then - git pull --quiet - php includes/sql-schema/update.php +cd "$(dirname "$0")" + +if [ "$(php daily.php -f update)" -eq 1 ]; then + git pull --quiet + php includes/sql-schema/update.php fi php daily.php -f syslog php daily.php -f eventlog php daily.php -f authlog -php daily.php -f perf_times +php daily.php -f perf_times php daily.php -f callback php daily.php -f device_perf diff --git a/doc/Extensions/Network-Map.md b/doc/Extensions/Network-Map.md index c8496c83d2..b231a318b6 100644 --- a/doc/Extensions/Network-Map.md +++ b/doc/Extensions/Network-Map.md @@ -15,3 +15,41 @@ Either remove mac or xdp depending on which you want. A global map will be drawn from the information in the database, it is worth noting that this could lead to a large network map. Network maps for individual devices are available showing the relationship with other devices. + +One can also specicify the parameters to be used for drawing and updateing the network map. +Please see http://visjs.org/docs/network/ for details on the configuration parameters. +```php +$config['network_map_vis_options'] = '{ + layout:{ + randomSeed:2 + }, + "edges": { + "smooth": { + enabled: false + }, + font: { + size: 12, + color: "red", + face: "sans", + background: "white", + strokeWidth:3, + align: "middle", + strokeWidth: 2 + } + }, + "physics": { + "forceAtlas2Based": { + "gravitationalConstant": -800, + "centralGravity": 0.03, + "springLength": 50, + "springConstant": 0, + "damping": 1, + "avoidOverlap": 1 + }, + "maxVelocity": 50, + "minVelocity": 0.01, + "solver": "forceAtlas2Based", + "timestep": 0.30 + } +}'; +``` diff --git a/doc/General/Contributing.md b/doc/General/Contributing.md index ad82ded74b..8561f3f29c 100644 --- a/doc/General/Contributing.md +++ b/doc/General/Contributing.md @@ -12,22 +12,42 @@ any other means), you assert that: or due to it being released to you under a compatible license. - You are not aware of any third party claims on the code, including - copyright infringement, patent, or any other claim. + copyright, patent, trademark, or any other legal claim. + +- You have acknowledged in the content of your contribution (usually as a + source code comment) any and all sources and influences used in the + production of that contribution. - You have not viewed code written under the [Observium License][4] in the production of contributed code. This includes all Observium code after Subversion revision 3250 and any patches or other code covered by that license after Tue May 29 13:08:01 2012 +0000 (the date of Observium r3250). -To agree with these assertions, please submit a github pull request against -[AUTHORS.md][5] including your name, email address, and github user id in -the file (so that it can be matched to your commits), and stating in the -commit log: +- You are not running a copy of non-GPLed Observium, whether as part of your + work duties, or personally, or in any other capacity, and you have removed + any copies of non-GPLed Observium source code from your personal and work + systems. + + +To agree with these assertions, please submit a Github pull request against +[AUTHORS.md][5], adding or altering a **single line** *containing your name, +email address, and Github user id* in the file (so that it can be matched to +your commits), and stating in the *commit log* (not the pull request text): ``` I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. ``` +Local patches +------------- + +Please note that the above contributor agreement means that if you have +developed a feature for a non-GPL version of Observium, we can't include it +in LibreNMS, even if you have not released it to the public. If there's a +feature you use to which this applies, please document its functionality in +an issue, and we'll do our best to include equivalent functionality in +LibreNMS. + Copyright --------- @@ -41,7 +61,7 @@ appropriate (although this is not legal advice ;-): /* * LibreNMS module to frob blurgs from a foo bar * - * Copyright (c) 2014 Internet Widgitz Pty Ltd + * Copyright (c) 2015 Internet Widgitz Pty Ltd * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/html/includes/print-map.inc.php b/html/includes/print-map.inc.php index 23aeff1b74..eb41929fe2 100644 --- a/html/includes/print-map.inc.php +++ b/html/includes/print-map.inc.php @@ -214,39 +214,7 @@ echo $edges; edges: edges, stabilize: true }; -var options = { - layout:{ - randomSeed:2 - }, - "edges": { - "smooth": { - enabled: false - }, - font: { - size: 12, - color: 'red', - face: 'sans', - background: 'white', - strokeWidth:3, - align: 'middle', - strokeWidth: 2 - } - }, - "physics": { - "forceAtlas2Based": { - "gravitationalConstant": -800, - "centralGravity": 0.03, - "springLength": 50, - "springConstant": 0, - "damping": 1, - "avoidOverlap": 1 - }, - "maxVelocity": 50, - "minVelocity": 0.01, - "solver": "forceAtlas2Based", - "timestep": 0.30 - } -} + var options = ; var network = new vis.Network(container, data, options); network.on('click', function (properties) { if (properties.nodes > 0) { diff --git a/html/pages/front/map.php b/html/pages/front/map.php index b29ac7bc30..dd8d1a18d1 100644 --- a/html/pages/front/map.php +++ b/html/pages/front/map.php @@ -31,7 +31,7 @@ if ($config['map']['engine'] == 'leaflet') {