diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index cea4e9d582..d2f90cb64c 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2014-05-10 Junichi Satoh + + * util/recon_script/ipmi-recon.pl, util/recon_script/snmpdevices.pl, + util/recon_script/wmi-recon.pl: Added support for FreeBSD. + 2014-05-09 Ramon Novoa * bin/tentacle_server.exe: Added to repository. Tentacle server win32 diff --git a/pandora_server/util/recon_scripts/ipmi-recon.pl b/pandora_server/util/recon_scripts/ipmi-recon.pl index e567c86c19..7cfea2d0c4 100644 --- a/pandora_server/util/recon_scripts/ipmi-recon.pl +++ b/pandora_server/util/recon_scripts/ipmi-recon.pl @@ -27,7 +27,15 @@ my $pkg_timeout = 3; #Pkg ping timeout wait ########################################################################## # Code begins here, do not touch ########################################################################## -my $pandora_conf = "/etc/pandora/pandora_server.conf"; +my $OSNAME = $^O; +my $pandora_conf; + +if ($OSNAME eq "freebsd") { + $pandora_conf = "/usr/local/etc/pandora/pandora_server.conf"; +} else { + $pandora_conf = "/etc/pandora/pandora_server.conf"; +} + my $task_id = $ARGV[0]; # Passed automatically by the server my $target_group = $ARGV[1]; # Defined by user my $create_incident = $ARGV[2]; # Defined by user diff --git a/pandora_server/util/recon_scripts/snmpdevices.pl b/pandora_server/util/recon_scripts/snmpdevices.pl index a15fd7d496..914ad205ab 100755 --- a/pandora_server/util/recon_scripts/snmpdevices.pl +++ b/pandora_server/util/recon_scripts/snmpdevices.pl @@ -27,7 +27,15 @@ my $target_interval = 600; ########################################################################## # Code begins here, do not touch ########################################################################## -my $pandora_conf = "/etc/pandora/pandora_server.conf"; +my $OSNAME = $^O; +my $pandora_conf; + +if ($OSNAME eq "freebsd") { + $pandora_conf = "/usr/local/etc/pandora/pandora_server.conf"; +} else { + $pandora_conf = "/etc/pandora/pandora_server.conf"; +} + my $task_id = $ARGV[0]; # Passed automatically by the server my $target_group = $ARGV[1]; # Defined by user my $create_incident = $ARGV[2]; # Defined by user diff --git a/pandora_server/util/recon_scripts/wmi-recon.pl b/pandora_server/util/recon_scripts/wmi-recon.pl index 9d59cff938..dc0f5c801a 100755 --- a/pandora_server/util/recon_scripts/wmi-recon.pl +++ b/pandora_server/util/recon_scripts/wmi-recon.pl @@ -18,7 +18,20 @@ use PandoraFMS::Config; use PandoraFMS::NmapParser; # Pandora FMS configuration hash. -my %CONF = ('quiet' => 0, +my $OSNAME = $^O; +my %CONF; + +if ($OSNAME eq "freebsd") { + %CONF = ('quiet' => 0, + 'verbosity' => 1, + 'daemon' => 0, + 'PID' => '', + 'pandora_path' => '/usr/local/etc/pandora/pandora_server.conf', + 'ping_timeout' => 2, + 'ping_retries' => 1, + 'wmi_client' => '/usr/local/bin/wmic'); +} else { + %CONF = ('quiet' => 0, 'verbosity' => 1, 'daemon' => 0, 'PID' => '', @@ -26,6 +39,7 @@ my %CONF = ('quiet' => 0, 'ping_timeout' => 2, 'ping_retries' => 1, 'wmi_client' => '/usr/bin/wmic'); +} # If set to 1 incidents will be created in the Pandora FMS Console. my $CREATE_INCIDENT;