2011-09-01 Sergio Martin <sergio.martin@artica.es>
* util/pandora_manage.pl util/recon_scripts/snmpdevices.pl: Fixed entities conversions git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4865 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
bcda65f08e
commit
17534052ed
|
@ -1,3 +1,8 @@
|
|||
2011-09-01 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* util/pandora_manage.pl
|
||||
util/recon_scripts/snmpdevices.pl: Fixed entities conversions
|
||||
|
||||
2011-08-30 Tomas Palacios <tomas.palacios@artica.es>
|
||||
|
||||
* pandora_server/pandora_server_installer: Added missing Perl Socket6 references.
|
||||
|
|
|
@ -1219,7 +1219,7 @@ sub pandora_manage_main ($$$) {
|
|||
|
||||
my $configuration_data = "";
|
||||
|
||||
my $policy_id = enterprise_hook('get_policy_id',[$dbh, $policy_name]);
|
||||
my $policy_id = enterprise_hook('get_policy_id',[$dbh, safe_input($policy_name)]);
|
||||
exist_check($policy_id,'policy',$policy_name);
|
||||
|
||||
my $ret = enterprise_hook('pandora_add_policy_queue', [$dbh, $conf, $policy_id, 'apply']);
|
||||
|
@ -1237,7 +1237,7 @@ sub pandora_manage_main ($$$) {
|
|||
|
||||
my $configuration_data = "";
|
||||
|
||||
my $policy_id = enterprise_hook('get_policy_id',[$dbh, $policy_name]);
|
||||
my $policy_id = enterprise_hook('get_policy_id',[$dbh, safe_input($policy_name)]);
|
||||
exist_check($policy_id,'policy',$policy_name);
|
||||
|
||||
# Flag as disabled the policy alerts
|
||||
|
|
|
@ -67,21 +67,6 @@ sub show_help {
|
|||
exit;
|
||||
}
|
||||
|
||||
##########################################################################
|
||||
# Return the ID of the agent with the given IP.
|
||||
##########################################################################
|
||||
sub get_agent_from_addr ($$) {
|
||||
my ($dbh, $ip_address) = @_;
|
||||
|
||||
return 0 if (! defined ($ip_address) || $ip_address eq '');
|
||||
|
||||
my $agent_id = get_db_value ($dbh, 'SELECT id_agent FROM taddress, taddress_agent, tagente
|
||||
WHERE tagente.id_agente = taddress_agent.id_agent
|
||||
AND taddress_agent.id_a = taddress.id_a
|
||||
AND ip = ?', $ip_address);
|
||||
return (defined ($agent_id)) ? $agent_id : -1;
|
||||
}
|
||||
|
||||
##########################################################################
|
||||
# Get SNMP response.
|
||||
##########################################################################
|
||||
|
@ -288,6 +273,7 @@ for (my $i = 1; $net_addr <= $net_addr->broadcast; $i++, $net_addr++) {
|
|||
|
||||
# Remove forbidden caracters
|
||||
$interface =~ s/\"|\n|\<|\>|\&|\[|\]//g;
|
||||
$agent_id = pandora_create_agent (\%conf, $conf{'servername'}, 'Interface'.$interface, $addr, $target_group, 0, 11, '', 300, $dbh);
|
||||
|
||||
process_module_snmp ($dbh, $target_community, $addr, ".1.3.6.1.2.1.2.2.1.8.$ax", "interface", "$interface Status", "remote_snmp_proc", "Operative status for $interface at position $ax. IP Address: $ip_address", $conf);
|
||||
|
||||
|
|
Loading…
Reference in New Issue