From 605f67b9353d8446b6044b413b0b932648dcc550 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Mon, 28 Jun 2010 12:49:26 +0000 Subject: [PATCH] bad klaver :> git-svn-id: http://www.observium.org/svn/observer/trunk@1277 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/discovery/services.inc.php | 11 ----------- includes/functions.php | 1 + includes/services.inc.php | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 includes/services.inc.php diff --git a/includes/discovery/services.inc.php b/includes/discovery/services.inc.php index 159f408462..b81c41bb8a 100644 --- a/includes/discovery/services.inc.php +++ b/includes/discovery/services.inc.php @@ -9,17 +9,6 @@ $known_services = array(22 => "ssh", 25 => "smtp", 53 => "dns", 80 => "http", 110 => "pop", 143 => "imap"); - function add_service($service) { - global $id; - global $hostname; - echo "$service "; - $sql = "INSERT INTO `services` (`device_id`,`service_ip`,`service_type`,`service_desc`,`service_param`,`service_ignore`) - VALUES ('" . mres($id). "','" . mres($hostname) . "','" . mres($service) . "', - '" . mres("auto discovered: $service") . "','" . mres("") . "','0')"; - - $query = mysql_query($sql); - } - ## Services if($device['type'] == "server") { $oids = shell_exec($config['snmpwalk'] . " -".$device['snmpver']." -CI -Osqn -c ".$community." ".$hostname.":".$port." .1.3.6.1.2.1.6.13.1.1.0.0.0.0"); diff --git a/includes/functions.php b/includes/functions.php index b095159369..2ebd5fe296 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -17,6 +17,7 @@ include_once($config['install_dir'] . "/includes/cisco-entities.php"); include_once($config['install_dir'] . "/includes/syslog.php"); include_once($config['install_dir'] . "/includes/rewrites.php"); include_once($config['install_dir'] . "/includes/snmp.inc.php"); +include_once($config['install_dir'] . "/includes/services.inc.php"); ## CollectD diff --git a/includes/services.inc.php b/includes/services.inc.php new file mode 100644 index 0000000000..97783cfcb5 --- /dev/null +++ b/includes/services.inc.php @@ -0,0 +1,15 @@ +