diff --git a/AUTHORS.md b/AUTHORS.md index 4c3d6983b..826311481 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -69,4 +69,6 @@ Contributors to LibreNMS: - Rob Gormley (rgormley) - Richard Kojedzinszky (rkojedzinszky) - Tony Murray (murrant) +- Peter Lamperud (vizay) +- Louis Bailleul (alucardfh) [1]: http://observium.org/ "Observium web site" diff --git a/doc/Developing/Dynamic-Config.md b/doc/Developing/Dynamic-Config.md index 73e808f5c..acc9d3079 100644 --- a/doc/Developing/Dynamic-Config.md +++ b/doc/Developing/Dynamic-Config.md @@ -18,7 +18,7 @@ This will determine the default config option for `$config['alert']['tolerance_w If the sub-section you want to add the new config option already exists then update the relevant file within `html/pages/settings/` otherwise you will need to create the new sub-section page. Here's an example of this: -[Commit example](https://github.com/librenm/librenms/commit/c5998f9ee27acdac0c0f7d3092fc830c51ff684c) +[Commit example](https://github.com/librenms/librenms/commit/c5998f9ee27acdac0c0f7d3092fc830c51ff684c) ```php 0) { +if (isset($config['auth_ad_check_certificates']) && + $config['auth_ad_check_certificates'] == 0) { putenv('LDAPTLS_REQCERT=never'); }; @@ -35,6 +35,7 @@ function authenticate($username, $password) { if (isset($config['auth_ad_groups'][$group_cn]['level'])) { // user is in one of the defined groups $user_authenticated = 1; + adduser($username); } } @@ -43,6 +44,7 @@ function authenticate($username, $password) { } else { // group membership is not required and user is valid + adduser($username); return 1; } } @@ -81,11 +83,20 @@ function auth_usermanagement() { } -function adduser() { - // not supported so return 0 - return 0; +function adduser($username) { + // Check to see if user is already added in the database + if (!user_exists_in_db($username)) { + return dbInsert(array('username' => $username, 'user_id' => get_userid($username), 'level' => "0", 'can_modify_passwd' => 0, 'twofactor' => 0), 'users'); + } + else { + return false; + } } +function user_exists_in_db($username) { + $return = dbFetchCell('SELECT COUNT(*) FROM users WHERE username = ?', array($username), true); + return $return; +} function user_exists($username) { global $config, $ds; diff --git a/html/includes/common/worldmap.inc.php b/html/includes/common/worldmap.inc.php index bf9e6f36e..c179b6db2 100644 --- a/html/includes/common/worldmap.inc.php +++ b/html/includes/common/worldmap.inc.php @@ -30,7 +30,7 @@ if ($config['map']['engine'] == 'leaflet') {
-
+
@@ -46,7 +46,7 @@ if ($config['map']['engine'] == 'leaflet') {
-
+
+
+
+ +
+
+ '; } + elseif ($type == 'text') { + return ''; + } }//end dynamic_override_config() function generate_dynamic_config_panel($title,$end_panel=true,$config_groups,$items=array(),$transport='') { @@ -1249,3 +1252,9 @@ function generate_dynamic_config_panel($title,$end_panel=true,$config_groups,$it } return $output; }//end generate_dynamic_config_panel() + +function get_ripe_api_whois_data_json($ripe_parameter) { + $ripe_whois_url = 'https://stat.ripe.net/data/whois/data.json?resource=' . $ripe_parameter; + return json_decode(file_get_contents($ripe_whois_url) , true); +}//end get_ripe_api_whois_data_json() + diff --git a/html/includes/graphs/XXX_device_memory_windows.inc.php b/html/includes/graphs/XXX_device_memory_windows.inc.php index 7122762da..731250de9 100644 --- a/html/includes/graphs/XXX_device_memory_windows.inc.php +++ b/html/includes/graphs/XXX_device_memory_windows.inc.php @@ -39,7 +39,7 @@ $rrd_options .= ' GPRINT:availreal:LAST:\ \ \ %7.2lf%sB'; $rrd_options .= ' GPRINT:availreal:AVERAGE:%7.2lf%sB'; $rrd_options .= " GPRINT:availreal:MAX:%7.2lf%sB\\\\n"; $rrd_options .= ' LINE1:usedreal#d0b080:'; -$rrd_options .= ' AREA:shared#afeced::'; +$rrd_options .= ' AREA:shared#afeced:'; $rrd_options .= ' AREA:buffered#cc0000::STACK'; $rrd_options .= ' AREA:cached#ffaa66::STACK'; $rrd_options .= ' LINE1.25:shared#008fea:shared'; diff --git a/html/includes/graphs/application/shoutcast_multi_stats.inc.php b/html/includes/graphs/application/shoutcast_multi_stats.inc.php index ea01630bf..26b989c22 100644 --- a/html/includes/graphs/application/shoutcast_multi_stats.inc.php +++ b/html/includes/graphs/application/shoutcast_multi_stats.inc.php @@ -53,14 +53,14 @@ else { foreach ($rrd_list as $rrd) { $colours = (isset($rrd['colour']) ? $rrd['colour'] : 'default'); $strlen = ((strlen($rrd['descr']) < $descr_len) ? ($descr_len - strlen($rrd['descr'])) : '0'); - $descr = (isset($rrd['descr']) ? rrdtool_escape($rrd['descr'], ($desc_len + $strlen)) : 'Unkown'); + $descr = (isset($rrd['descr']) ? rrdtool_escape($rrd['descr'], ($desc_len + $strlen)) : 'Unknown'); for ($z = 0; $z < $strlen; $z++) { $descr .= ' '; } if ($i) { - $stack = 'STACK'; + $stack = ':STACK'; } $colour = $config['graph_colours'][$colours][$x]; @@ -68,7 +68,7 @@ foreach ($rrd_list as $rrd) { $rrd_options .= ' DEF:peak'.$x.'='.$rrd['filename'].':peak:MAX'; $rrd_options .= ' DEF:unique'.$x.'='.$rrd['filename'].':unique:AVERAGE'; $rrd_options .= ' VDEF:avg'.$x.'=cur'.$x.',AVERAGE'; - $rrd_options .= ' AREA:cur'.$x.'#'.$colour.':"'.$descr."\":$stack"; + $rrd_options .= ' AREA:cur'.$x.'#'.$colour.":'".$descr."'$stack"; $rrd_options .= ' GPRINT:cur'.$x.':LAST:"%6.2lf"'; $rrd_options .= ' GPRINT:unique'.$x.':LAST:"%6.2lf%s"'; $rrd_options .= ' GPRINT:avg'.$x.':"%6.2lf"'; @@ -97,7 +97,7 @@ if (!$nototal) { $rrd_options .= ' CDEF:totunique=unique0'.$totunique; $rrd_options .= ' CDEF:totpeak=peak0'.$totpeak; $rrd_options .= ' VDEF:totavg=totcur,AVERAGE'; - $rrd_options .= ' LINE2:totcur#'.$colour.':"'.$descr.'"'; + $rrd_options .= ' LINE2:totcur#'.$colour.":'".$descr."'"; $rrd_options .= ' GPRINT:totcur:LAST:"%6.2lf"'; $rrd_options .= ' GPRINT:totunique:LAST:"%6.2lf%s"'; $rrd_options .= ' GPRINT:totavg:"%6.2lf"'; diff --git a/html/includes/graphs/device/mempool.inc.php b/html/includes/graphs/device/mempool.inc.php index 8c8fba677..d574ebcf8 100644 --- a/html/includes/graphs/device/mempool.inc.php +++ b/html/includes/graphs/device/mempool.inc.php @@ -46,7 +46,7 @@ foreach (dbFetchRows('SELECT * FROM `mempools` where `device_id` = ?', array($de $rrd_optionsb .= " LINE1:mempooltotal$i#".$colour.":'".$descr."' "; $rrd_optionsb .= " GPRINT:mempooltotal$i:MIN:%3.0lf%%"; $rrd_optionsb .= " GPRINT:mempooltotal$i:LAST:%3.0lf%%"; - $rrd_optionsb .= " GPRINT:mempooltotal$i:MAX:%3.0lf%%\\\l "; + $rrd_optionsb .= " GPRINT:mempooltotal$i:MAX:%3.0lf%%\\l "; $iter++; $i++; } diff --git a/html/includes/graphs/device/smokeping_all_common_avg.inc.php b/html/includes/graphs/device/smokeping_all_common_avg.inc.php index 97c5d40fb..cd8613f1b 100644 --- a/html/includes/graphs/device/smokeping_all_common_avg.inc.php +++ b/html/includes/graphs/device/smokeping_all_common_avg.inc.php @@ -37,6 +37,7 @@ foreach ($smokeping_files[$direction][$device['hostname']] as $source => $filena $colour = $config['graph_colours'][$colourset][$iter]; $iter++; + // FIXME: $descr unused? -- PDG 2015-11-14 $descr = rrdtool_escape($source, $descr_len); $filename = generate_smokeping_file($device,$filename); diff --git a/html/includes/graphs/device/storage.inc.php b/html/includes/graphs/device/storage.inc.php index 769e9ce91..e52e8fa65 100644 --- a/html/includes/graphs/device/storage.inc.php +++ b/html/includes/graphs/device/storage.inc.php @@ -42,6 +42,6 @@ foreach (dbFetchRows('SELECT * FROM storage where device_id = ?', array($device[ $rrd_options .= " LINE1.25:$storage[storage_id]perc#".$colour.":'$descr'"; $rrd_options .= " GPRINT:$storage[storage_id]size:LAST:%6.2lf%sB"; $rrd_options .= " GPRINT:$storage[storage_id]used:LAST:%6.2lf%sB"; - $rrd_options .= " GPRINT:$storage[storage_id]perc:LAST:%5.2lf%%\\\\l"; + $rrd_options .= " GPRINT:$storage[storage_id]perc:LAST:%5.2lf%%\\l"; $iter++; }//end foreach diff --git a/html/includes/graphs/device/ucd_load.inc.php b/html/includes/graphs/device/ucd_load.inc.php index ccdf61ee5..1a5e5ab9a 100644 --- a/html/includes/graphs/device/ucd_load.inc.php +++ b/html/includes/graphs/device/ucd_load.inc.php @@ -14,12 +14,12 @@ $rrd_options .= ' CDEF:b=5min,100,/'; $rrd_options .= ' CDEF:c=15min,100,/'; $rrd_options .= ' CDEF:cdefd=a,b,c,+,+'; $rrd_options .= " COMMENT:'Load Average Current Average Maximum\\n'"; -$rrd_options .= " AREA:a#ffeeaa:'1 Min':"; +$rrd_options .= " AREA:a#ffeeaa:'1 Min'"; $rrd_options .= ' LINE1:a#c5aa00:'; $rrd_options .= " GPRINT:a:LAST:' %7.2lf'"; $rrd_options .= " GPRINT:a:AVERAGE:' %7.2lf'"; $rrd_options .= " GPRINT:a:MAX:' %7.2lf\\n'"; -$rrd_options .= " LINE1.25:b#ea8f00:'5 Min':"; +$rrd_options .= " LINE1.25:b#ea8f00:'5 Min'"; $rrd_options .= " GPRINT:b:LAST:' %7.2lf'"; $rrd_options .= " GPRINT:b:AVERAGE:' %7.2lf'"; $rrd_options .= " GPRINT:b:MAX:' %7.2lf\\n'"; diff --git a/html/includes/graphs/device/ucd_memory.inc.php b/html/includes/graphs/device/ucd_memory.inc.php index 606fed717..05c0dd685 100644 --- a/html/includes/graphs/device/ucd_memory.inc.php +++ b/html/includes/graphs/device/ucd_memory.inc.php @@ -73,7 +73,7 @@ $rrd_options .= " 'COMMENT: \\n'"; $rrd_options .= " 'LINE1:usedreal#d0b080:'"; -$rrd_options .= " 'AREA:shared#afeced::'"; +$rrd_options .= " 'AREA:shared#afeced:'"; $rrd_options .= " 'AREA:buffered#cc0000::STACK'"; $rrd_options .= " 'AREA:cached#ffaa66::STACK'"; diff --git a/html/includes/graphs/generic_data.inc.php b/html/includes/graphs/generic_data.inc.php index 63b75fde4..46560b036 100644 --- a/html/includes/graphs/generic_data.inc.php +++ b/html/includes/graphs/generic_data.inc.php @@ -107,7 +107,7 @@ $rrd_options .= ' LINE:in'.$format."#608720:'In '"; $rrd_options .= ' GPRINT:in'.$format.':LAST:%6.2lf%s'; $rrd_options .= ' GPRINT:in'.$format.':AVERAGE:%6.2lf%s'; $rrd_options .= ' GPRINT:in'.$format.'_max:MAX:%6.2lf%s'; -$rrd_options .= " GPRINT:95thin:%6.2lf%s\\\\n"; +$rrd_options .= " GPRINT:95thin:%6.2lf%s\\n"; $rrd_options .= ' AREA:dout'.$format.'_max#E0E0FF:'; $rrd_options .= ' AREA:dout'.$format.'#8080C0:'; @@ -116,7 +116,7 @@ $rrd_options .= ' LINE:dout'.$format."#606090:'Out'"; $rrd_options .= ' GPRINT:out'.$format.':LAST:%6.2lf%s'; $rrd_options .= ' GPRINT:out'.$format.':AVERAGE:%6.2lf%s'; $rrd_options .= ' GPRINT:out'.$format.'_max:MAX:%6.2lf%s'; -$rrd_options .= " GPRINT:95thout:%6.2lf%s\\\\n"; +$rrd_options .= " GPRINT:95thout:%6.2lf%s\\n"; if ($config['rrdgraph_real_95th']) { $rrd_options .= ' HRULE:95thhigh#FF0000:"Highest"'; @@ -125,7 +125,7 @@ if ($config['rrdgraph_real_95th']) { $rrd_options .= " GPRINT:tot:'Total %6.2lf%s'"; $rrd_options .= " GPRINT:totin:'(In %6.2lf%s'"; -$rrd_options .= " GPRINT:totout:'Out %6.2lf%s)\\\\l'"; +$rrd_options .= " GPRINT:totout:'Out %6.2lf%s)\\l'"; $rrd_options .= ' LINE1:95thin#aa0000'; $rrd_options .= ' LINE1:d95thout#aa0000'; diff --git a/html/includes/graphs/generic_multi.inc.php b/html/includes/graphs/generic_multi.inc.php index d02e82ebb..6d7f78a1c 100644 --- a/html/includes/graphs/generic_multi.inc.php +++ b/html/includes/graphs/generic_multi.inc.php @@ -11,7 +11,7 @@ else { } if ($nototal) { - $descrlen += '2'; + $descr_len += '2'; $unitlen += '2'; } @@ -57,16 +57,16 @@ foreach ($rrd_list as $rrd) { if ($rrd['invert']) { $rrd_options .= ' CDEF:'.$id.'i='.$id.',-1,*'; - $rrd_optionsc .= ' AREA:'.$id.'i#'.$colour.":'$descr':".$cstack; + $rrd_optionsc .= ' AREA:'.$id.'i#'.$colour.":'$descr'".$cstack; $rrd_optionsc .= ' GPRINT:'.$id.':LAST:%5.1lf%s GPRINT:'.$id.'min:MIN:%5.1lf%s'; $rrd_optionsc .= ' GPRINT:'.$id.'max:MAX:%5.1lf%s GPRINT:'.$id.":AVERAGE:'%5.1lf%s\\n'"; - $cstack = 'STACK'; + $cstack = ':STACK'; } else { - $rrd_optionsb .= ' AREA:'.$id.'#'.$colour.":'$descr':".$bstack; + $rrd_optionsb .= ' AREA:'.$id.'#'.$colour.":'$descr'".$bstack; $rrd_optionsb .= ' GPRINT:'.$id.':LAST:%5.1lf%s GPRINT:'.$id.'min:MIN:%5.1lf%s'; $rrd_optionsb .= ' GPRINT:'.$id.'max:MAX:%5.1lf%s GPRINT:'.$id.":AVERAGE:'%5.1lf%s\\n'"; - $bstack = 'STACK'; + $bstack = ':STACK'; } $i++; diff --git a/html/includes/graphs/generic_multi_bits_separated.inc.php b/html/includes/graphs/generic_multi_bits_separated.inc.php index 181f0ae4d..88bbdec99 100644 --- a/html/includes/graphs/generic_multi_bits_separated.inc.php +++ b/html/includes/graphs/generic_multi_bits_separated.inc.php @@ -49,9 +49,6 @@ foreach ($rrd_list as $rrd) { } $descr_out = rrdtool_escape($rrd['descr_out'], $descr_len).' Out'; - $descr = str_replace("'", '', $descr); - // FIXME does this mean ' should be filtered in rrdtool_escape? probably... - $descr_out = str_replace("'", '', $descr_out); } $rrd_options .= ' DEF:'.$in.$i.'='.$rrd['filename'].':'.$ds_in.':AVERAGE '; @@ -68,10 +65,10 @@ foreach ($rrd_list as $rrd) { } if ($i) { - $stack = 'STACK'; + $stack = ':STACK'; } - $rrd_options .= ' AREA:inB'.$i.'#'.$colour_in.":'".$descr."':$stack"; + $rrd_options .= ' AREA:inB'.$i.'#'.$colour_in.":'".$descr."'$stack"; if (!$nodetails) { $rrd_options .= ' GPRINT:inB'.$i.":LAST:%6.2lf%s$units"; $rrd_options .= ' GPRINT:inB'.$i.":AVERAGE:%6.2lf%s$units"; @@ -84,7 +81,7 @@ foreach ($rrd_list as $rrd) { } $rrd_options .= " 'HRULE:0#".$colour_out.':'.$descr_out."'"; - $rrd_optionsb .= " 'AREA:outB".$i.'_neg#'.$colour_out."::$stack'"; + $rrd_optionsb .= " 'AREA:outB".$i.'_neg#'.$colour_out.":$stack'"; if (!$nodetails) { $rrd_options .= ' GPRINT:outB'.$i.":LAST:%6.2lf%s$units"; diff --git a/html/includes/graphs/generic_multi_data_separated.inc.php b/html/includes/graphs/generic_multi_data_separated.inc.php index e73ac4e85..07caefd37 100644 --- a/html/includes/graphs/generic_multi_data_separated.inc.php +++ b/html/includes/graphs/generic_multi_data_separated.inc.php @@ -45,9 +45,6 @@ foreach ($rrd_list as $rrd) { } $descr_out = rrdtool_escape($rrd['descr_out'], $descr_len).' Out'; - $descr = str_replace("'", '', $descr); - // FIXME does this mean ' should be filtered in rrdtool_escape? probably... - $descr_out = str_replace("'", '', $descr_out); $rrd_options .= ' DEF:'.$in.$i.'='.$rrd['filename'].':'.$ds_in.':AVERAGE '; $rrd_options .= ' DEF:'.$out.$i.'='.$rrd['filename'].':'.$ds_out.':AVERAGE '; @@ -69,10 +66,10 @@ foreach ($rrd_list as $rrd) { } if ($i) { - $stack = 'STACK'; + $stack = ':STACK'; } - $rrd_options .= ' AREA:inB'.$i.'#'.$colour_in.":'".$descr."':$stack"; + $rrd_options .= ' AREA:inB'.$i.'#'.$colour_in.":'".$descr."'$stack"; $rrd_options .= ' GPRINT:inB'.$i.":LAST:%6.2lf%s$units"; $rrd_options .= ' GPRINT:inB'.$i.":AVERAGE:%6.2lf%s$units"; $rrd_options .= ' GPRINT:inB'.$i.":MAX:%6.2lf%s$units\l"; @@ -82,7 +79,7 @@ foreach ($rrd_list as $rrd) { } $rrd_options .= " 'HRULE:0#".$colour_out.':'.$descr_out."'"; - $rrd_optionsb .= " 'AREA:outB".$i.'_neg#'.$colour_out."::$stack'"; + $rrd_optionsb .= " 'AREA:outB".$i.'_neg#'.$colour_out.":$stack'"; $rrd_options .= ' GPRINT:outB'.$i.":LAST:%6.2lf%s$units"; $rrd_options .= ' GPRINT:outB'.$i.":AVERAGE:%6.2lf%s$units"; $rrd_options .= ' GPRINT:outB'.$i.":MAX:%6.2lf%s$units\l"; @@ -117,7 +114,7 @@ if (!$nototal) { $rrd_options .= ' VDEF:totout=outoctets,TOTAL'; $rrd_options .= ' VDEF:tot=octets,TOTAL'; - // $rrd_options .= " AREA:totin#" . $colour_in . ":'" . $descr . "':$stack"; + // $rrd_options .= " AREA:totin#" . $colour_in . ":'" . $descr . "'$stack"; // $rrd_options .= " GPRINT:totin:LAST:%6.2lf%s$units"; // $rrd_options .= " GPRINT:totin:AVERAGE:%6.2lf%s$units"; // $rrd_options .= " GPRINT:totin:MAX:%6.2lf%s$units\l"; diff --git a/html/includes/graphs/generic_multi_line.inc.php b/html/includes/graphs/generic_multi_line.inc.php index c34d78e77..513b23674 100644 --- a/html/includes/graphs/generic_multi_line.inc.php +++ b/html/includes/graphs/generic_multi_line.inc.php @@ -11,7 +11,7 @@ else { } if ($nototal) { - $descrlen += '2'; + $descr_len += '2'; $unitlen += '2'; } diff --git a/html/includes/graphs/generic_multi_seperated.inc.php b/html/includes/graphs/generic_multi_seperated.inc.php index 8549b3b33..e45752d40 100644 --- a/html/includes/graphs/generic_multi_seperated.inc.php +++ b/html/includes/graphs/generic_multi_seperated.inc.php @@ -71,7 +71,7 @@ foreach ($rrd_list as $rrd) { } if ($i) { - $stack = 'STACK'; + $stack = ':STACK'; } $rrd_options .= ' AREA:inbits'.$i.'#'.$colour_in.":'".rrdtool_escape($rrd['descr'], 9)."In '$stack"; @@ -84,7 +84,7 @@ foreach ($rrd_list as $rrd) { } $rrd_options .= " COMMENT:'\\n'"; - $rrd_optionsb .= ' AREA:outbits'.$i.'_neg#'.$colour_out.":$stack"; + $rrd_optionsb .= ' AREA:outbits'.$i.'_neg#'.$colour_out."$stack"; $rrd_options .= ' HRULE:999999999999999#'.$colour_out.":'".str_pad('', 10)."Out'"; $rrd_options .= ' GPRINT:outbits'.$i.':LAST:%6.2lf%s'; $rrd_options .= ' GPRINT:outbits'.$i.':AVERAGE:%6.2lf%s'; diff --git a/html/includes/graphs/generic_multi_simplex_seperated.inc.php b/html/includes/graphs/generic_multi_simplex_seperated.inc.php index 18df802ae..6125cb807 100644 --- a/html/includes/graphs/generic_multi_simplex_seperated.inc.php +++ b/html/includes/graphs/generic_multi_simplex_seperated.inc.php @@ -12,7 +12,7 @@ else { } if ($nototal) { - $descrlen += '2'; + $descr_len += '2'; $unitlen += '2'; } @@ -32,7 +32,7 @@ else { $unitlen = '10'; if ($nototal) { - $descrlen += '2'; + $descr_len += '2'; $unitlen += '2'; } @@ -81,7 +81,7 @@ foreach ($rrd_list as $i => $rrd) { // This this not the first entry? if ($i) { - $stack = 'STACK'; + $stack = ':STACK'; } // if we've been passed a multiplier we must make a CDEF based on it! @@ -109,13 +109,13 @@ foreach ($rrd_list as $i => $rrd) { $t_defname = $g_defname; } - $rrd_options .= ' AREA:'.$g_defname.$i.'#'.$colour.":'".$descr."':$stack"; + $rrd_options .= ' AREA:'.$g_defname.$i.'#'.$colour.":'".$descr."'$stack"; $rrd_options .= ' GPRINT:'.$t_defname.$i.':LAST:%5.2lf%s GPRINT:'.$t_defname.$i.'min:MIN:%5.2lf%s'; $rrd_options .= ' GPRINT:'.$t_defname.$i.'max:MAX:%5.2lf%s GPRINT:'.$t_defname.$i.":AVERAGE:'%5.2lf%s\\n'"; if (!$nototal) { - $rrd_options .= ' GPRINT:tot'.$rrd['ds'].$i.':%6.2lf%s'.rrdtool_escape($total_units).''; + $rrd_options .= ' GPRINT:tot'.$rrd['ds'].$i.":%6.2lf%s'".rrdtool_escape($total_units)."'"; } $rrd_options .= " COMMENT:'\\n'"; diff --git a/html/includes/graphs/munin/graph.inc.php b/html/includes/graphs/munin/graph.inc.php index 9b634813b..cae85137f 100644 --- a/html/includes/graphs/munin/graph.inc.php +++ b/html/includes/graphs/munin/graph.inc.php @@ -50,7 +50,7 @@ foreach ($dbq as $ds) { $descr = rrdtool_escape($ds['ds_label'], $descr_len); - $cmd_graph .= ' '.$ds['ds_draw'].':'.$ds_name.'#'.$colour.':"'.$descr.'"'; + $cmd_graph .= ' '.$ds['ds_draw'].':'.$ds_name.'#'.$colour.":'".$descr."'"; $cmd_graph .= ' GPRINT:'.$ds_name.':LAST:"%6.2lf%s"'; $cmd_graph .= ' GPRINT:'.$ds_name.':AVERAGE:"%6.2lf%s"'; $cmd_graph .= ' GPRINT:'.$ds_name.':MAX:"%6.2lf%s\\n"'; diff --git a/html/includes/graphs/old_generic_simplex.inc.php b/html/includes/graphs/old_generic_simplex.inc.php index 24a93147c..91cd0612e 100644 --- a/html/includes/graphs/old_generic_simplex.inc.php +++ b/html/includes/graphs/old_generic_simplex.inc.php @@ -20,7 +20,7 @@ else { } if ($print_total) { - $rrd_options .= ' VDEF:'.$ds.'_total=ds,TOTAL'; + $rrd_options .= ' VDEF:'.$ds.'_total='.$ds.',TOTAL'; } if ($percentile) { @@ -43,7 +43,7 @@ if ($_GET['previous'] == 'yes') { } if ($print_total) { - $rrd_options .= ' VDEF:'.$ds.'_totalX=ds,TOTAL'; + $rrd_options .= ' VDEF:'.$ds.'_totalX='.$ds.',TOTAL'; } if ($percentile) { @@ -74,11 +74,11 @@ if ($percentile) { $rrd_options .= ' GPRINT:'.$ds.'_percentile:%6.2lf%s'; } -$rrd_options .= "\\\\n"; -$rrd_options .= " COMMENT:\\\\n"; +$rrd_options .= "\\n"; +$rrd_options .= " COMMENT:\\n"; if ($print_total) { - $rrd_options .= ' GPRINT:'.$ds.'_tot:Total\ %6.2lf%s\)\\\\l'; + $rrd_options .= ' GPRINT:'.$ds.'_total:Total" %6.2lf%s"\\l'; } if ($percentile) { @@ -86,6 +86,6 @@ if ($percentile) { } if ($_GET['previous'] == 'yes') { - $rrd_options .= ' LINE1.25:'.$ds."X#666666:'Prev \\\\n'"; + $rrd_options .= ' LINE1.25:'.$ds."X#666666:'Prev \\n'"; $rrd_options .= ' AREA:'.$ds.'X#99999966:'; } diff --git a/html/includes/graphs/processor/usage.inc.php b/html/includes/graphs/processor/usage.inc.php index 5954685d7..53db2c490 100644 --- a/html/includes/graphs/processor/usage.inc.php +++ b/html/includes/graphs/processor/usage.inc.php @@ -5,6 +5,7 @@ $scale_max = '100'; $ds = 'usage'; +// FIXME: As far as I can tell, $descr is never mentioned in includes/graphs/generic_simplex.inc.php -- PDG 2015-11-14 $descr = rrdtool_escape(short_hrDeviceDescr($proc['processor_descr']), 28); $colour_line = 'cc0000'; diff --git a/html/includes/graphs/sensor/temperature.inc.php b/html/includes/graphs/sensor/temperature.inc.php index c8ffb312d..05f7ed0ef 100644 --- a/html/includes/graphs/sensor/temperature.inc.php +++ b/html/includes/graphs/sensor/temperature.inc.php @@ -19,7 +19,7 @@ $rrd_options .= ' AREA:sensor_diff#c5c5c5::STACK'; $rrd_options .= " LINE1.5:sensor#cc0000:'".rrdtool_escape($sensor['sensor_descr'], 21)."'"; $rrd_options .= ' GPRINT:sensor_min:MIN:%4.1lfC'; $rrd_options .= ' GPRINT:sensor:LAST:%4.1lfC'; -$rrd_options .= ' GPRINT:sensor_max:MAX:%4.1lfC\\\\l'; +$rrd_options .= ' GPRINT:sensor_max:MAX:%4.1lfC\\l'; if (is_numeric($sensor['sensor_limit'])) { $rrd_options .= ' HRULE:'.$sensor['sensor_limit'].'#999999::dashes'; diff --git a/html/includes/print-interface.inc.php b/html/includes/print-interface.inc.php index b15c9b773..996069a44 100644 --- a/html/includes/print-interface.inc.php +++ b/html/includes/print-interface.inc.php @@ -36,8 +36,8 @@ else { $mac = ''; } -echo " - "; +echo " + "; echo ' '.generate_port_link($port, $port['ifIndex'].'. '.$port['label'])." $error_img $mac
".$port['ifAlias'].''; @@ -62,7 +62,7 @@ if ($port_details) { echo ''; -echo ''; +echo ""; if ($port_details) { $port['graph_type'] = 'port_bits'; @@ -73,7 +73,7 @@ if ($port_details) { echo generate_port_link($port, ""); } -echo ''; +echo ""; if ($port['ifOperStatus'] == 'up') { $port['in_rate'] = ($port['ifInOctets_rate'] * 8); @@ -86,7 +86,7 @@ if ($port['ifOperStatus'] == 'up') { ".format_bi($port['ifOutUcastPkts_rate']).'pps'; } -echo ''; +echo ""; if ($port['ifSpeed']) { echo ''.humanspeed($port['ifSpeed']).''; } @@ -130,19 +130,19 @@ if ($device['os'] == 'ios' || $device['os'] == 'iosxe') { }//end if if ($port_adsl['adslLineCoding']) { - echo ''; + echo ""; echo $port_adsl['adslLineCoding'].'/'.rewrite_adslLineType($port_adsl['adslLineType']); echo '
'; echo 'Sync:'.formatRates($port_adsl['adslAtucChanCurrTxRate']).'/'.formatRates($port_adsl['adslAturChanCurrTxRate']); echo '
'; echo 'Max:'.formatRates($port_adsl['adslAtucCurrAttainableRate']).'/'.formatRates($port_adsl['adslAturCurrAttainableRate']); - echo ''; + echo ""; echo 'Atten:'.$port_adsl['adslAtucCurrAtn'].'dB/'.$port_adsl['adslAturCurrAtn'].'dB'; echo '
'; echo 'SNR:'.$port_adsl['adslAtucCurrSnrMgn'].'dB/'.$port_adsl['adslAturCurrSnrMgn'].'dB'; } else { - echo ''; + echo ""; if ($port['ifType'] && $port['ifType'] != '') { echo ''.fixiftype($port['ifType']).''; } @@ -158,7 +158,7 @@ else { echo '-'; } - echo ''; + echo ""; if ($port['ifPhysAddress'] && $port['ifPhysAddress'] != '') { echo ''.formatMac($port['ifPhysAddress']).''; } @@ -176,13 +176,17 @@ else { }//end if echo ''; -echo ''; +echo ''; + +$neighborsCount=0; +$nbLinks=0; if (strpos($port['label'], 'oopback') === false && !$graph_type) { foreach (dbFetchRows('SELECT * FROM `links` AS L, `ports` AS I, `devices` AS D WHERE L.local_port_id = ? AND L.remote_port_id = I.port_id AND I.device_id = D.device_id', array($if_id)) as $link) { // echo("Directly Connected " . generate_port_link($link, makeshortif($link['label'])) . " on " . generate_device_link($link, shorthost($link['hostname'])) . "
"); // $br = "
"; $int_links[$link['port_id']] = $link['port_id']; $int_links_phys[$link['port_id']] = 1; + $nbLinks++; } unset($br); @@ -233,10 +237,23 @@ if (strpos($port['label'], 'oopback') === false && !$graph_type) { }//end foreach }//end if + if(count($int_links) > 3) + { + echo '
+ '; + } + + if ($port_details && $config['enable_port_relationship'] === true && port_permitted($int_link,$device['device_id'])) { foreach ($int_links as $int_link) { + $neighborsCount++; + if($neighborsCount == 4) + { + echo '
[...]
'; + echo '
'; + echo '
'; +} echo ''; // If we're showing graphs, generate the graph and print the img tags diff --git a/html/includes/print-map.inc.php b/html/includes/print-map.inc.php index eb41929fe..d512a7e21 100644 --- a/html/includes/print-map.inc.php +++ b/html/includes/print-map.inc.php @@ -218,7 +218,7 @@ echo $edges; var network = new vis.Network(container, data, options); network.on('click', function (properties) { if (properties.nodes > 0) { - window.location.href = "/device/device="+properties.nodes+"/tab=map/" + window.location.href = "device/device="+properties.nodes+"/tab=map/" } }); diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index 09d4b57b7..e61990ea0 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -74,6 +74,12 @@ if ($_SESSION['userlevel'] >= '10') {
  • Availability
  • Network
  • + +
  • Eventlog
  • diff --git a/html/includes/table/eventlog.inc.php b/html/includes/table/eventlog.inc.php index 797b71d77..62edbbefd 100644 --- a/html/includes/table/eventlog.inc.php +++ b/html/includes/table/eventlog.inc.php @@ -29,7 +29,7 @@ if (isset($searchPhrase) && !empty($searchPhrase)) { $sql .= " AND (`D`.`hostname` LIKE '%$searchPhrase%' OR `E`.`datetime` LIKE '%$searchPhrase%' OR `E`.`message` LIKE '%$searchPhrase%' OR `E`.`type` LIKE '%$searchPhrase%')"; } -$count_sql = "SELECT COUNT(datetime) $sql"; +$count_sql = "SELECT COUNT(event_id) $sql"; $total = dbFetchCell($count_sql, $param); if (empty($total)) { $total = 0; diff --git a/html/js/librenms.js b/html/js/librenms.js index 576362bc6..9bffaffca 100644 --- a/html/js/librenms.js +++ b/html/js/librenms.js @@ -25,6 +25,32 @@ $(document).ready(function() { }); }); + // Device override for text inputs + $(document).on('blur', 'input[name="override_config_text"]', function(event) { + event.preventDefault(); + var $this = $(this); + var attrib = $this.data('attrib'); + var device_id = $this.data('device_id'); + var value = $this.val(); + $.ajax({ + type: 'POST', + url: 'ajax_form.php', + data: { type: 'override-config', device_id: device_id, attrib: attrib, state: value }, + dataType: 'json', + success: function(data) { + if (data.status == 'ok') { + toastr.success(data.message); + } + else { + toastr.error(data.message); + } + }, + error: function() { + toastr.error('Could not set this override'); + } + }); + }); + // Checkbox config ajax calls $("[name='global-config-check']").bootstrapSwitch('offColor','danger'); $('input[name="global-config-check"]').on('switchChange.bootstrapSwitch', function(event, state) { @@ -96,6 +122,7 @@ $(document).ready(function() { } }); }); + }); function submitCustomRange(frmdata) { @@ -109,3 +136,22 @@ function submitCustomRange(frmdata) { return true; } +$(document).on("click", '.collapse-neighbors', function(event) +{ + var caller = $(this); + var button = caller.find('.neighbors-button'); + var list = caller.find('.neighbors-interface-list'); + var continued = caller.find('.neighbors-list-continued'); + + if(button.hasClass("glyphicon-plus")) + { + button.addClass('glyphicon-minus').removeClass('glyphicon-plus'); + }else + { + button.addClass('glyphicon-plus').removeClass('glyphicon-minus'); + } + + list.toggle(); + continued.toggle(); +}); + diff --git a/html/pages/device/edit/apps.inc.php b/html/pages/device/edit/apps.inc.php index c885666df..fc5e50eea 100644 --- a/html/pages/device/edit/apps.inc.php +++ b/html/pages/device/edit/apps.inc.php @@ -36,7 +36,7 @@ if ($_POST['device']) { foreach ($enabled as $app) { if (!in_array($app, $app_in_db)) { - $updated += dbInsert(array('device_id' => $device['device_id'], 'app_type' => $app), 'applications'); + $updated += dbInsert(array('device_id' => $device['device_id'], 'app_type' => $app, 'app_status' => '', 'app_instance' => ''), 'applications'); } } @@ -99,4 +99,4 @@ echo '
    '; echo ''; echo '
    '; -echo '
    '; \ No newline at end of file +echo '
    '; diff --git a/html/pages/device/edit/misc.inc.php b/html/pages/device/edit/misc.inc.php index a85689852..d1731ecdf 100644 --- a/html/pages/device/edit/misc.inc.php +++ b/html/pages/device/edit/misc.inc.php @@ -14,6 +14,12 @@ echo ' '.dynamic_override_config('checkbox','override_Oxidized_disable', $device).' +
    + +
    + '.dynamic_override_config('text','override_Unixagent_port', $device).' +
    +
    '; diff --git a/html/pages/devices.inc.php b/html/pages/devices.inc.php index a7a305a72..6d446d5c1 100644 --- a/html/pages/devices.inc.php +++ b/html/pages/devices.inc.php @@ -62,6 +62,21 @@ foreach ($menu_options as $option => $text) {
    + + + * 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 + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ +$pagetitle[] = 'RIPE NCC - API Tools'; +?> +

    RIPE NCC API Tools

    +
    +

    Whois

    +
    +
    + + + + +
    +
    +
    +
    +
    + diff --git a/html/pages/settings/external.inc.php b/html/pages/settings/external.inc.php index 2960b2e25..5459ed67e 100644 --- a/html/pages/settings/external.inc.php +++ b/html/pages/settings/external.inc.php @@ -19,12 +19,28 @@ $oxidized_conf = array( ), ); +$unixagent_conf = array( + array('name' => 'unix-agent.port', + 'descr' => 'Default unix-agent port', + 'type' => 'text', + ), + array('name' => 'unix-agent.connection-timeout', + 'descr' => 'Connection timeout', + 'type' => 'text', + ), + array('name' => 'unix-agent.read-timeout', + 'descr' => 'Read timeout', + 'type' => 'text', + ), +); + echo '
    '; echo generate_dynamic_config_panel('Oxidized integration',true,$config_groups,$oxidized_conf); +echo generate_dynamic_config_panel('Unix-agent integration',true,$config_groups,$unixagent_conf); echo '
    diff --git a/includes/definitions.inc.php b/includes/definitions.inc.php index 16873101c..16e3482e6 100644 --- a/includes/definitions.inc.php +++ b/includes/definitions.inc.php @@ -107,6 +107,17 @@ $config['os'][$os]['over'][1]['text'] = 'Processor Usage'; $config['os'][$os]['over'][2]['graph'] = 'device_ucd_memory'; $config['os'][$os]['over'][2]['text'] = 'Memory Usage'; +$os = 'infinity'; +$config['os'][$os]['text'] = 'LigoWave Infinity'; +$config['os'][$os]['type'] = 'wireless'; +$config['os'][$os]['nobulk'] = 1; +$config['os'][$os]['over'][0]['graph'] = 'device_bits'; +$config['os'][$os]['over'][0]['text'] = 'Device Traffic'; +$config['os'][$os]['over'][1]['graph'] = 'device_processor'; +$config['os'][$os]['over'][1]['text'] = 'Processor Usage'; +$config['os'][$os]['over'][2]['graph'] = 'device_mempool'; +$config['os'][$os]['over'][2]['text'] = 'Memory Usage'; + // Ubiquiti $os = 'unifi'; $config['os'][$os]['text'] = 'Ubiquiti UniFi'; diff --git a/includes/discovery/mempools/infinity.inc.php b/includes/discovery/mempools/infinity.inc.php new file mode 100644 index 000000000..a6734cb31 --- /dev/null +++ b/includes/discovery/mempools/infinity.inc.php @@ -0,0 +1,22 @@ + + * 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 + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +if ($device['os'] == 'infinity') { + echo 'INFINITY-MEMORY-POOL: '; + + $total = snmp_get($device, '.1.3.6.1.4.1.10002.1.1.1.1.1.0', '-OvQ'); + $free = snmp_get($device, '.1.3.6.1.4.1.10002.1.1.1.1.2.0', '-OvQ'); + + if (is_numeric($total) && is_numeric($free)) { + discover_mempool($valid_mempool, $device, 0, 'infinity', 'Memory', '1', null, null); + } +} diff --git a/includes/discovery/os/infinity.inc.php b/includes/discovery/os/infinity.inc.php new file mode 100644 index 000000000..517cdfaf3 --- /dev/null +++ b/includes/discovery/os/infinity.inc.php @@ -0,0 +1,17 @@ + + * 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 + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +if (!$os) { + if (preg_match('/^NFT 2N/', $sysDescr)) { + $os = 'infinity'; + } +} diff --git a/includes/discovery/processors/infinity.inc.php b/includes/discovery/processors/infinity.inc.php new file mode 100644 index 000000000..ee7779dd9 --- /dev/null +++ b/includes/discovery/processors/infinity.inc.php @@ -0,0 +1,24 @@ + + * 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 + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +if ($device['os'] == 'infinity') { + echo 'LigoWave Infinity: '; + + $descr = 'CPU'; + $usage = snmp_get($device, '.1.3.6.1.4.1.10002.1.1.1.4.2.1.3.2', '-Ovqn'); + + if (is_numeric($usage)) { + discover_processor($valid['processor'], $device, '.1.3.6.1.4.1.10002.1.1.1.4.2.1.3.2', '0', 'infinity', $descr, '1', $usage, null, null); + } +} + +unset($processors_array); diff --git a/includes/polling/mempools/infinity.inc.php b/includes/polling/mempools/infinity.inc.php new file mode 100644 index 000000000..94e3e9dd1 --- /dev/null +++ b/includes/polling/mempools/infinity.inc.php @@ -0,0 +1,17 @@ + + * 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 + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +$total = snmp_get($device, '.1.3.6.1.4.1.10002.1.1.1.1.1.0', '-OvQ'); +$free = snmp_get($device, '.1.3.6.1.4.1.10002.1.1.1.1.2.0', '-OvQ'); +$mempool['total'] = $total * 1024; +$mempool['free'] = $free * 1024; +$mempool['used'] = ($mempool['total'] - $mempool['free']); diff --git a/includes/polling/os/infinity.inc.php b/includes/polling/os/infinity.inc.php new file mode 100644 index 000000000..ddebce091 --- /dev/null +++ b/includes/polling/os/infinity.inc.php @@ -0,0 +1,15 @@ + + * 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 + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +$version = snmp_get($device, 'SNMPv2-MIB::sysDescr.0', '-Ovq'); +$version = explode(' ', $version)[2]; +$hardware = snmp_get($device, 'IEEE802dot11-MIB::dot11manufacturerProductName.5', '-Ovq'); diff --git a/includes/polling/unix-agent.inc.php b/includes/polling/unix-agent.inc.php index 18d30e58e..bdaf7df49 100644 --- a/includes/polling/unix-agent.inc.php +++ b/includes/polling/unix-agent.inc.php @@ -3,14 +3,22 @@ if ($device['os_group'] == 'unix') { echo $config['project_name'].' UNIX Agent: '; - // FIXME - this should be in config and overridable in database - $agent_port = '6556'; + $agent_port = get_dev_attrib($device,'override_Unixagent_port'); + if (empty($agent_port)) { + $agent_port = $config['unix-agent']['port']; + } + if (empty($config['unix-agent']['connection-timeout'])) { + $config['unix-agent']['connection-timeout'] = $config['unix-agent-connection-time-out']; + } + if (empty($config['unix-agent']['read-timeout'])) { + $config['unix-agent']['read-timeout'] = $config['unix-agent-read-time-out']; + } $agent_start = utime(); - $agent = fsockopen($device['hostname'], $agent_port, $errno, $errstr, $config['unix-agent-connection-time-out']); + $agent = fsockopen($device['hostname'], $agent_port, $errno, $errstr, $config['unix-agent']['connection-timeout']); // Set stream timeout (for timeouts during agent fetch - stream_set_timeout($agent, $config['unix-agent-read-time-out']); + stream_set_timeout($agent, $config['unix-agent']['read-timeout']); $agentinfo = stream_get_meta_data($agent); if (!$agent) { @@ -108,7 +116,7 @@ if ($device['os_group'] == 'unix') { if (in_array($key, array('apache', 'mysql', 'nginx', 'proxmox', 'ceph'))) { if (dbFetchCell('SELECT COUNT(*) FROM `applications` WHERE `device_id` = ? AND `app_type` = ?', array($device['device_id'], $key)) == '0') { echo "Found new application '$key'\n"; - dbInsert(array('device_id' => $device['device_id'], 'app_type' => $key), 'applications'); + dbInsert(array('device_id' => $device['device_id'], 'app_type' => $key, 'app_status' => '', 'app_instance' => ''), 'applications'); } } } @@ -120,7 +128,7 @@ if ($device['os_group'] == 'unix') { foreach ($agent_data['app']['memcached'] as $memcached_host => $memcached_data) { if (dbFetchCell('SELECT COUNT(*) FROM `applications` WHERE `device_id` = ? AND `app_type` = ? AND `app_instance` = ?', array($device['device_id'], 'memcached', $memcached_host)) == '0') { echo "Found new application 'Memcached' $memcached_host\n"; - dbInsert(array('device_id' => $device['device_id'], 'app_type' => 'memcached', 'app_instance' => $memcached_host), 'applications'); + dbInsert(array('device_id' => $device['device_id'], 'app_type' => 'memcached', 'app_status' => '', 'app_instance' => $memcached_host), 'applications'); } } } @@ -134,7 +142,7 @@ if ($device['os_group'] == 'unix') { $agent_data['app']['drbd'][$drbd_dev] = $drbd_data; if (dbFetchCell('SELECT COUNT(*) FROM `applications` WHERE `device_id` = ? AND `app_type` = ? AND `app_instance` = ?', array($device['device_id'], 'drbd', $drbd_dev)) == '0') { echo "Found new application 'DRBd' $drbd_dev\n"; - dbInsert(array('device_id' => $device['device_id'], 'app_type' => 'drbd', 'app_instance' => $drbd_dev), 'applications'); + dbInsert(array('device_id' => $device['device_id'], 'app_type' => 'drbd', 'app_status' => '', 'app_instance' => $drbd_dev), 'applications'); } } } diff --git a/includes/rrdtool.inc.php b/includes/rrdtool.inc.php index b71eee7a0..3c35cec22 100644 --- a/includes/rrdtool.inc.php +++ b/includes/rrdtool.inc.php @@ -280,7 +280,8 @@ function rrdtool_lastupdate($filename, $options){ function rrdtool_escape($string, $maxlength=null){ $result = shorten_interface_type($string); - $result = str_replace('%', '%%', $result); + $result = str_replace("'", '', $result); # remove quotes + $result = str_replace('%', '%%', $result); # double percent signs if (is_numeric($maxlength)) { $extra = substr_count($string, ':', 0, $maxlength); $result = substr(str_pad($result, $maxlength), 0, ($maxlength + $extra)); @@ -289,7 +290,7 @@ function rrdtool_escape($string, $maxlength=null){ } } - $result = str_replace(':', '\:', $result); + $result = str_replace(':', '\:', $result); # escape colons return $result.' '; } diff --git a/sql-schema/076.sql b/sql-schema/076.sql index 83e9a08a2..80cb87c4a 100644 --- a/sql-schema/076.sql +++ b/sql-schema/076.sql @@ -1 +1 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('alert.transports.clickatell.token','','','Clickatell access token','alerting',0,'transports',0,'0','0'),('alert.transports.playsms.url','','','PlaySMS API URL','alerting',0,'transports',0,'0','0'),('alert.transports.playsms.user','','','PlaySMS User','alerting',0,'transports',0,'0','0'),('alert.transports.playsms.from','','','PlaySMS From','alerting',0,'transports',0,'0','0'),('alert.transports.playsms.token','','','PlaySMS Token','alerting',0,'transports',0,'0','0'); +INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('unix-agent.port','6556','6556','Default port for the Unix-agent (check_mk)','external',0,'unix-agent',0,'0','0'),('unix-agent.connection-timeout','10','10','Unix-agent connection timeout','external',0,'unix-agent',0,'0','0'),('unix-agent.read-timeout','10','10','Unix-agent read timeout','external',0,'unix-agent',0,'0','0'); diff --git a/sql-schema/077.sql b/sql-schema/077.sql new file mode 100644 index 000000000..83e9a08a2 --- /dev/null +++ b/sql-schema/077.sql @@ -0,0 +1 @@ +INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('alert.transports.clickatell.token','','','Clickatell access token','alerting',0,'transports',0,'0','0'),('alert.transports.playsms.url','','','PlaySMS API URL','alerting',0,'transports',0,'0','0'),('alert.transports.playsms.user','','','PlaySMS User','alerting',0,'transports',0,'0','0'),('alert.transports.playsms.from','','','PlaySMS From','alerting',0,'transports',0,'0','0'),('alert.transports.playsms.token','','','PlaySMS Token','alerting',0,'transports',0,'0','0');