Commit 8069b76d authored by ueli heuer's avatar ueli heuer 👾
Browse files

diverse fixes ... long ago applied

parent 39b7ee87
......@@ -8,4 +8,6 @@ data/*.rrd
/dump/
/tmp/
/ideen/
*backup
*test*
exec_rrd_.pl
......@@ -442,7 +442,7 @@ while (<TEMPLATE>) {
start_date,stop_date,activ,check_host,user,changed,creator,
created)
values (null,'$hostname','$name',$loc_id,'$type_id',
'$group_id','$cust_id',$hw_id,$rt_id,'$snmpversion',
$group_id,'$cust_id',$hw_id,$rt_id,'$snmpversion',
'$community','$port','$has_HC', now(),null,'$activ','$check',
'$user',now(),'$user',now())";
......
#!$DVG_HOME/bin/tool/add_host.pl
#
# $Id$
#
# CISCO 2950
#
# Typ:snmpversion:check:activ:HC
0:Switch:snmpv2c:y:n:y:ES-16-XG:device
# Interfaces
#ord:name:probe:activ:params
20:Vlan11:loopback:y:
21:0/1:ifOctet ifError ifDrop ifPacket:y:#0/1:1250000000:1250000000:y:y:
21:0/2:ifOctet ifError ifDrop ifPacket:y:#0/2:1250000000:1250000000:y:y:
21:0/3:ifOctet ifError ifDrop ifPacket:y:#0/3:1250000000:1250000000:y:y:
21:0/4:ifOctet ifError ifDrop ifPacket:y:#0/4:1250000000:1250000000:y:y:
21:0/5:ifOctet ifError ifDrop ifPacket:y:#0/5:1250000000:1250000000:y:y:
21:0/6:ifOctet ifError ifDrop ifPacket:y:#0/6:1250000000:1250000000:y:y:
21:0/7:ifOctet ifError ifDrop ifPacket:y:#0/7:1250000000:1250000000:y:y:
21:0/8:ifOctet ifError ifDrop ifPacket:y:#0/8:1250000000:1250000000:y:y:
21:0/9:ifOctet ifError ifDrop ifPacket:y:#0/9:1250000000:1250000000:y:y:
22:0/10:ifOctet ifError ifDrop ifPacket:y:#0/10:1250000000:1250000000:y:y:
22:0/11:ifOctet ifError ifDrop ifPacket:y:#0/11:1250000000:1250000000:y:y:
22:0/12:ifOctet ifError ifDrop ifPacket:y:#0/12:1250000000:1250000000:y:y:
22:0/13:ifOctet ifError ifDrop ifPacket:y:#0/13:1250000000:1250000000:y:y:
22:0/14:ifOctet ifError ifDrop ifPacket:y:#0/14:1250000000:1250000000:y:y:
22:0/15:ifOctet ifError ifDrop ifPacket:y:#0/15:1250000000:1250000000:y:y:
22:0/16:ifOctet ifError ifDrop ifPacket:y:#0/16:1250000000:1250000000:y:y:
22:3/1:ifOctet ifError ifDrop ifPacket:y:#3/1:2500000000:2500000000:y:y:
22:3/2:ifOctet ifError ifDrop ifPacket:y:#3/2:2500000000:2500000000:y:y:
22:3/3:ifOctet ifError ifDrop ifPacket:y:#3/3:2500000000:2500000000:y:y:
23:3/4:ifOctet ifError ifDrop ifPacket:y:#3/4:2500000000:2500000000:y:y:
23:3/5:ifOctet ifError ifDrop ifPacket:y:#3/5:2500000000:2500000000:y:y:
23:3/6:ifOctet ifError ifDrop ifPacket:y:#3/6:2500000000:2500000000:y:y:
23:5/1:ifOctet ifError ifDrop ifPacket:y:#CPU Interface\: 5/1:1250000000:1250000000:y:y:
keepalive SNMP:
.1.3.6.1.4.1.9586.100.5.1.1.0
https://raw.githubusercontent.com/acassen/keepalived/master/doc/KEEPALIVED-MIB.txt
\ No newline at end of file
......@@ -1040,10 +1040,11 @@ function save_link($link_id) # {{{
$speedout = DVG_input::check(DVG_input::CHECK_UNSIGNED_INTEGER,'speedout',
DVG_input::SRC_POST,0);
$warning = '';
// lock the speed if set
if ( $_POST['speedlock'] == 'on' ) { $speedin = $speedout; };
// without a name tztz do you have a better idea?
if ( $link_name == '' && $link_id ) {
// if we edit a link, just fetch the old one
......
......@@ -447,7 +447,8 @@ public function device_edit($device_id,$error = null) // {{{
$error_msg = $error;
$error = (array) null;
}
if ( isset($_POST['hint']) && $_POST['hint'] == 'newdevice' ) {
$hint = isset($_POST['hint']) && $_POST['hint'] == 'newdevice';
if ( $hint ) {
$probe_id = DVG_input::check(DVG_input::CHECK_UNSIGNED_INTEGER,
'probe_id',DVG_input::SRC_POST);
$device_name = DVG_input::check(DVG_input::CHECK_STRING,'dev_name',
......@@ -635,8 +636,8 @@ public function device_edit($device_id,$error = null) // {{{
$table->close_table();
list($script,$post) = DVG_uri::uri2post(DVG_uri::modify(
array('action','device_id','host_id','probe_id','pcount'),
array('save',$device_id,$this->host_id,$probe_id,$param_count)));
array('hint','action','device_id','host_id','probe_id','pcount'),
array($hint? 'newdevice' : null,'save',$device_id,$this->host_id,$probe_id,$param_count)));
$output = sprintf ('
<form action="%s" method="post">
<div>
......@@ -756,6 +757,7 @@ public function device_save() // {{{
$device_id = $CONFIG->DBW->lastInsertID('dvg_device');
DVG_error::check($device_id);
#print ("device_id = $device_id; \n $device_sql"); exit;
DVG_log::syslog(LOG_INFO,sprintf("insert DVG_device: id='$device_id', ".
"host_id='$host_id', device_group=$device_group, ord='$ord', " .
"name='$device_name', probe_id='$probe_id', " .
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment