Merge branch 'develop' of github.com:pandorafms/pandorafms into develop
This commit is contained in:
commit
d58e077868
|
@ -1,5 +1,5 @@
|
||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 5.1-140916
|
Version: 5.1-140922
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="5.1-140916"
|
pandora_version="5.1-140922"
|
||||||
|
|
||||||
echo "Test if you has the tools for to make the packages."
|
echo "Test if you has the tools for to make the packages."
|
||||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||||
|
|
|
@ -41,7 +41,7 @@ my $Sem = undef;
|
||||||
my $ThreadSem = undef;
|
my $ThreadSem = undef;
|
||||||
|
|
||||||
use constant AGENT_VERSION => '5.1';
|
use constant AGENT_VERSION => '5.1';
|
||||||
use constant AGENT_BUILD => '140916';
|
use constant AGENT_BUILD => '140922';
|
||||||
|
|
||||||
# Commands to retrieve total memory information in kB
|
# Commands to retrieve total memory information in kB
|
||||||
use constant TOTALMEMORY_CMDS => {
|
use constant TOTALMEMORY_CMDS => {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 5.1
|
%define version 5.1
|
||||||
%define release 140916
|
%define release 140922
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 5.1
|
%define version 5.1
|
||||||
%define release 140916
|
%define release 140922
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
|
|
@ -191,7 +191,7 @@ uninstall () {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -Rf $PANDORA_BASE$PANDORA_HOME 2> /dev/null
|
rm -Rf $PANDORA_BASE$PANDORA_HOME 2> /dev/null
|
||||||
rm -Rf $PANDORA_BASE$PANDORA_LOG_DIR 2> /dev/null
|
rm -Rf $PANDORA_BASE$PANDORA_LOG_DIR/$PANDORA_LOG 2> /dev/null
|
||||||
rm -Rf $PANDORA_BASE$TENTACLE 2> /dev/null
|
rm -Rf $PANDORA_BASE$TENTACLE 2> /dev/null
|
||||||
|
|
||||||
rm -Rf $PANDORA_BASE$PANDORA_MAN/{man1,cat1}/tentacle_client.1.gz 2> /dev/null
|
rm -Rf $PANDORA_BASE$PANDORA_MAN/{man1,cat1}/tentacle_client.1.gz 2> /dev/null
|
||||||
|
@ -307,8 +307,8 @@ install () {
|
||||||
mv $DAEMON_TEMP $DAEMON_SCRIPT
|
mv $DAEMON_TEMP $DAEMON_SCRIPT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sed -e "s|^temporal[ ]*|temporal $PANDORA_BASE|" \
|
sed -e "s|^temporal[ \t][ \t]*|temporal $PANDORA_BASE|" \
|
||||||
-e "s|^logfile[ ]*|logfile $PANDORA_BASE|" \
|
-e "s|^logfile[ \t][ \t]*|logfile $PANDORA_BASE|" \
|
||||||
$AGENT_CFG > $AGENT_CFG_TEMP
|
$AGENT_CFG > $AGENT_CFG_TEMP
|
||||||
mv $AGENT_CFG_TEMP $AGENT_CFG
|
mv $AGENT_CFG_TEMP $AGENT_CFG
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
OUT=`netstat -as | grep "OutOctets" | awk '{ print $2 }'`
|
OUT=`netstat -as | grep "OutOctets" | awk '{ print $2 }'`
|
||||||
IN=`netstat -as | grep "InOctets" | awk '{ print $2 }'`
|
IN=`netstat -as | grep "InOctets" | awk '{ print $2 }'`
|
||||||
|
|
|
@ -67,7 +67,7 @@ server_port 41121
|
||||||
# (only works on enterprise version). Set to 0 to disable it
|
# (only works on enterprise version). Set to 0 to disable it
|
||||||
remote_config 0
|
remote_config 0
|
||||||
|
|
||||||
# Set XML encoding (ISO-8859-1 by default). You can set encoding UTF-8 for Windows 7 or higher
|
# XML encoding (ISO-8859-1 by default). Most windows servers experience problems when you set to UTF-8. Other special codepages may be specified here.
|
||||||
#encoding ISO-8859-1
|
#encoding ISO-8859-1
|
||||||
|
|
||||||
# If set to 1 start Drone Agent's Proxy Mode
|
# If set to 1 start Drone Agent's Proxy Mode
|
||||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{140916}
|
{140922}
|
||||||
|
|
||||||
ViewReadme
|
ViewReadme
|
||||||
{Yes}
|
{Yes}
|
||||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
||||||
using namespace Pandora_Strutils;
|
using namespace Pandora_Strutils;
|
||||||
|
|
||||||
#define PATH_SIZE _MAX_PATH+1
|
#define PATH_SIZE _MAX_PATH+1
|
||||||
#define PANDORA_VERSION ("5.1(Build 140916)")
|
#define PANDORA_VERSION ("5.1(Build 140922)")
|
||||||
|
|
||||||
string pandora_path;
|
string pandora_path;
|
||||||
string pandora_dir;
|
string pandora_dir;
|
||||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
||||||
VALUE "LegalCopyright", "Artica ST"
|
VALUE "LegalCopyright", "Artica ST"
|
||||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||||
VALUE "ProductVersion", "(5.1(Build 140916))"
|
VALUE "ProductVersion", "(5.1(Build 140922))"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package: pandorafms-console
|
package: pandorafms-console
|
||||||
Version: 5.1-140916
|
Version: 5.1-140922
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="5.1-140916"
|
pandora_version="5.1-140922"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
|
|
@ -245,3 +245,20 @@ INSERT INTO `talert_commands` (`name`, `command`, `description`, `internal`, `fi
|
||||||
-- Table `talert_actions`
|
-- Table `talert_actions`
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
INSERT INTO `talert_actions` (`name`, `id_alert_command`, `field1`, `field2`, `field3`, `field4`, `field5`, `field6`, `field7`, `field8`, `field9`, `field10`, `id_group`, `action_threshold`) VALUES ('Create a ticket in Integria IMS',13,'http://localhost/integria/include/api.php','1234','admin','_agent_: _alert_name_','1','3','_alert_description_','','','',0,0);
|
INSERT INTO `talert_actions` (`name`, `id_alert_command`, `field1`, `field2`, `field3`, `field4`, `field5`, `field6`, `field7`, `field8`, `field9`, `field10`, `id_group`, `action_threshold`) VALUES ('Create a ticket in Integria IMS',13,'http://localhost/integria/include/api.php','1234','admin','_agent_: _alert_name_','1','3','_alert_description_','','','',0,0);
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- Table `tconfig`
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
DELETE FROM `tconfig` WHERE `token`='sla_period';
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- Table `network_component`
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
UPDATE FROM `network_component` SET `module_inteval`= 3600 WHERE `id_nc`=53;
|
||||||
|
UPDATE FROM `network_component` SET `post_process`= 0.000000115740741 WHERE `id_nc`=53;
|
||||||
|
UPDATE FROM `network_component` SET `unit`= 'day' WHERE `id_nc`=53;
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- Table `network_component`
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
ALTER TABLE `tnetwork_component` MODIFY COLUMN `post_process` DOUBLE(18,15) DEFAULT 0;
|
||||||
|
|
|
@ -233,3 +233,7 @@ INSERT INTO talert_commands (name, command, description, internal, fields_descri
|
||||||
-- Table `talert_actions`
|
-- Table `talert_actions`
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
INSERT INTO talert_actions (name, id_alert_command, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, id_group, action_threshold) VALUES ('Create a ticket in Integria IMS',13,'http://localhost/integria/include/api.php','1234','admin','_agent_: _alert_name_','1','3','_alert_description_','','','',0,0);
|
INSERT INTO talert_actions (name, id_alert_command, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, id_group, action_threshold) VALUES ('Create a ticket in Integria IMS',13,'http://localhost/integria/include/api.php','1234','admin','_agent_: _alert_name_','1','3','_alert_description_','','','',0,0);
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
-- Table `tconfig`
|
||||||
|
-- ---------------------------------------------------------------------
|
||||||
|
DELETE FROM tconfig WHERE token='sla_period';
|
||||||
|
|
|
@ -25,6 +25,7 @@ if (! check_acl ($config['id_user'], 0, "AW")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$config["past_planned_downtimes"] = isset($config["past_planned_downtimes"]) ? $config["past_planned_downtimes"] : 1;
|
||||||
|
|
||||||
require_once ('include/functions_users.php');
|
require_once ('include/functions_users.php');
|
||||||
|
|
||||||
|
@ -51,7 +52,7 @@ $once_time_to = (string) get_parameter ('once_time_to', date(TIME_FORMAT));
|
||||||
$periodically_day_from = (int) get_parameter ('periodically_day_from', 1);
|
$periodically_day_from = (int) get_parameter ('periodically_day_from', 1);
|
||||||
$periodically_day_to = (int) get_parameter ('periodically_day_to', 31);
|
$periodically_day_to = (int) get_parameter ('periodically_day_to', 31);
|
||||||
$periodically_time_from = (string) get_parameter ('periodically_time_from', date(TIME_FORMAT));
|
$periodically_time_from = (string) get_parameter ('periodically_time_from', date(TIME_FORMAT));
|
||||||
$periodically_time_to = (string) get_parameter ('periodically_time_to', date(TIME_FORMAT));
|
$periodically_time_to = (string) get_parameter ('periodically_time_to', date(TIME_FORMAT, time() + SECONDS_1HOUR));
|
||||||
|
|
||||||
$first_create = (int) get_parameter ('first_create', 0);
|
$first_create = (int) get_parameter ('first_create', 0);
|
||||||
|
|
||||||
|
@ -152,12 +153,19 @@ if ($create_downtime || $update_downtime) {
|
||||||
$datetime_to = strtotime ($once_date_to . ' ' . $once_time_to);
|
$datetime_to = strtotime ($once_date_to . ' ' . $once_time_to);
|
||||||
$now = strtotime(date(DATE_FORMAT). ' ' . date(TIME_FORMAT));
|
$now = strtotime(date(DATE_FORMAT). ' ' . date(TIME_FORMAT));
|
||||||
|
|
||||||
if ($datetime_from < $now) {
|
if ($type_execution == 'once' && !$config["past_planned_downtimes"] && $datetime_from < $now) {
|
||||||
ui_print_error_message(__('Not created. Error inserting data. Start time must be higher than the current time' ));
|
ui_print_error_message(__('Not created. Error inserting data. Start time must be higher than the current time' ));
|
||||||
}
|
}
|
||||||
else if ($datetime_from >= $datetime_to) {
|
else if ($type_execution == 'once' && $datetime_from >= $datetime_to) {
|
||||||
ui_print_error_message(__('Not created. Error inserting data' ).
|
ui_print_error_message(__('Not created. Error inserting data') . ". " .__('The end date must be higher than the start date'));
|
||||||
': START >= END');
|
}
|
||||||
|
else if ($type_execution == 'periodically'
|
||||||
|
&& (($type_periodicity == 'weekly' && $periodically_time_from >= $periodically_time_to)
|
||||||
|
|| ($type_periodicity == 'monthly' && $periodically_day_from == $periodically_day_to && $periodically_time_from >= $periodically_time_to))) {
|
||||||
|
ui_print_error_message(__('Not created. Error inserting data') . ". " .__('The end time must be higher than the start time'));
|
||||||
|
}
|
||||||
|
else if ($type_execution == 'periodically' && $type_periodicity == 'monthly' && $periodically_day_from >= $periodically_day_to) {
|
||||||
|
ui_print_error_message(__('Not created. Error inserting data') . ". " .__('The end day must be higher than the start day'));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sql = '';
|
$sql = '';
|
||||||
|
@ -323,35 +331,35 @@ $table->data[3][1] = html_print_select(array('quiet' => __('Quiet'),
|
||||||
'type_downtime', $type_downtime, 'change_type_downtime()', '', 0, true, false, true,
|
'type_downtime', $type_downtime, 'change_type_downtime()', '', 0, true, false, true,
|
||||||
'');
|
'');
|
||||||
$table->data[4][0] = __('Execution');
|
$table->data[4][0] = __('Execution');
|
||||||
$table->data[4][1] = html_print_select(array('once' => __('once'),
|
$table->data[4][1] = html_print_select(array('once' => __('Once'),
|
||||||
'periodically' => __('Periodically')),
|
'periodically' => __('Periodically')),
|
||||||
'type_execution', $type_execution, 'change_type_execution();', '', 0, true);
|
'type_execution', $type_execution, 'change_type_execution();', '', 0, true);
|
||||||
|
|
||||||
$days = array_combine(range(1, 31), range(1, 31));
|
$days = array_combine(range(1, 31), range(1, 31));
|
||||||
$table->data[5][0] = __('Configure the time');
|
$table->data[5][0] = __('Configure the time') . " " . ui_print_help_icon ('planned_downtime_time', true);;
|
||||||
$table->data[5][1] = "
|
$table->data[5][1] = "
|
||||||
<div id='once_time' style='display: none;'>
|
<div id='once_time' style='display: none;'>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>" .
|
<td>" .
|
||||||
__('From:') .
|
__('From:') .
|
||||||
ui_print_help_tip(__('Date format in Pandora is year/month/day'), true) .
|
|
||||||
ui_print_help_tip(__('Time format in Pandora is hours(24h):minutes:seconds'), true) .
|
|
||||||
"</td>
|
"</td>
|
||||||
<td>".
|
<td>".
|
||||||
html_print_input_text ('once_date_from', $once_date_from, '', 10, 10, true) .
|
html_print_input_text ('once_date_from', $once_date_from, '', 10, 10, true) .
|
||||||
|
ui_print_help_tip(__('Date format in Pandora is year/month/day'), true) .
|
||||||
html_print_input_text ('once_time_from', $once_time_from, '', 9, 9, true) .
|
html_print_input_text ('once_time_from', $once_time_from, '', 9, 9, true) .
|
||||||
|
ui_print_help_tip(__('Time format in Pandora is hours(24h):minutes:seconds'), true) .
|
||||||
"</td>
|
"</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>" .
|
<td>" .
|
||||||
__('To:') .
|
__('To:') .
|
||||||
ui_print_help_tip(__('Date format in Pandora is year/month/day'), true) .
|
|
||||||
ui_print_help_tip(__('Time format in Pandora is hours(24h):minutes:seconds'), true) .
|
|
||||||
"</td>
|
"</td>
|
||||||
<td>".
|
<td>".
|
||||||
html_print_input_text ('once_date_to', $once_date_to, '', 10, 10, true) .
|
html_print_input_text ('once_date_to', $once_date_to, '', 10, 10, true) .
|
||||||
|
ui_print_help_tip(__('Date format in Pandora is year/month/day'), true) .
|
||||||
html_print_input_text ('once_time_to', $once_time_to, '', 9, 9, true) .
|
html_print_input_text ('once_time_to', $once_time_to, '', 9, 9, true) .
|
||||||
|
ui_print_help_tip(__('Time format in Pandora is hours(24h):minutes:seconds'), true) .
|
||||||
"</td>
|
"</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -359,8 +367,7 @@ $table->data[5][1] = "
|
||||||
<div id='periodically_time' style='display: none;'>
|
<div id='periodically_time' style='display: none;'>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>" . __('Type Periodicity:') . "</td>
|
<td>" . __('Type Periodicity:') . " ".
|
||||||
<td>".
|
|
||||||
html_print_select(array(
|
html_print_select(array(
|
||||||
'weekly' => __('Weekly'),
|
'weekly' => __('Weekly'),
|
||||||
'monthly' => __('Monthly')),
|
'monthly' => __('Monthly')),
|
||||||
|
@ -407,6 +414,7 @@ $table->data[5][1] = "
|
||||||
html_print_select($days,
|
html_print_select($days,
|
||||||
'periodically_day_to', $periodically_day_to, '', '', 0, true) .
|
'periodically_day_to', $periodically_day_to, '', '', 0, true) .
|
||||||
"</td>
|
"</td>
|
||||||
|
<td>" . ui_print_help_tip(__('The end day must be higher than the start day'), true) . "</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table>
|
<table>
|
||||||
|
@ -416,12 +424,16 @@ $table->data[5][1] = "
|
||||||
html_print_input_text (
|
html_print_input_text (
|
||||||
'periodically_time_from',
|
'periodically_time_from',
|
||||||
$periodically_time_from, '', 7, 7, true) .
|
$periodically_time_from, '', 7, 7, true) .
|
||||||
|
ui_print_help_tip(__('Time format in Pandora is hours(24h):minutes:seconds').
|
||||||
|
".<br>".__('The end time must be higher than the start time'), true) .
|
||||||
"</td>
|
"</td>
|
||||||
<td>" . __('To hour:') . "</td>
|
<td>" . __('To hour:') . "</td>
|
||||||
<td>".
|
<td>".
|
||||||
html_print_input_text (
|
html_print_input_text (
|
||||||
'periodically_time_to',
|
'periodically_time_to',
|
||||||
$periodically_time_to, '', 7, 7, true) .
|
$periodically_time_to, '', 7, 7, true) .
|
||||||
|
ui_print_help_tip(__('Time format in Pandora is hours(24h):minutes:seconds').
|
||||||
|
".<br>".__('The end time must be higher than the start time'), true) .
|
||||||
"</td>
|
"</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -511,7 +523,7 @@ if ($id_downtime > 0) {
|
||||||
echo html_print_select (array(), "module[]", '', '', '', 0, false, true, true, '', false, 'width: 180px;');
|
echo html_print_select (array(), "module[]", '', '', '', 0, false, true, true, '', false, 'width: 180px;');
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
echo "<br /><br /><br />";
|
echo "<br /><br /><br />";
|
||||||
html_print_submit_button (__('Add'), '', $disabled_add_button, 'class="sub next"',false);
|
html_print_submit_button (__('Add'), 'add_item', $disabled_add_button, 'class="sub next"',false);
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
|
|
||||||
|
@ -969,5 +981,18 @@ ui_require_jquery_file("ui.datepicker-" . get_user_language(), "include/javascri
|
||||||
$("#id_agent").blur (function () {
|
$("#id_agent").blur (function () {
|
||||||
$(this).css ("width", "180px");
|
$(this).css ("width", "180px");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Warning message about the problems caused updating a past planned downtime
|
||||||
|
var type_execution = "<?php echo $type_execution; ?>";
|
||||||
|
var datetime_from = <?php echo json_encode(strtotime($once_date_from . ' ' . $once_time_from)); ?>;
|
||||||
|
var datetime_now = <?php echo json_encode(strtotime(date(DATE_FORMAT). ' ' . date(TIME_FORMAT))); ?>;
|
||||||
|
var create = <?php echo json_encode($create); ?>;
|
||||||
|
if (!create && (type_execution == 'periodically' || (type_execution == 'once' && datetime_from < datetime_now))) {
|
||||||
|
$("input#submit-updbutton, input#submit-add_item, table#list a").click(function (e) {
|
||||||
|
if (!confirm("<?php echo __('WARNING: If you edit this planned downtime, the data of future SLA reports may be altered'); ?>")) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -0,0 +1,249 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// Pandora FMS - http://pandorafms.com
|
||||||
|
// ==================================================
|
||||||
|
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
|
||||||
|
// Please see http://pandorafms.org for full contribution list
|
||||||
|
|
||||||
|
// 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 for version 2.
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
session_start ();
|
||||||
|
|
||||||
|
require_once ("../../include/config.php");
|
||||||
|
require_once ("../../include/functions.php");
|
||||||
|
require_once ("../../include/functions_db.php");
|
||||||
|
require_once ("../../include/functions_users.php");
|
||||||
|
require_once ("../../include/functions_groups.php");
|
||||||
|
|
||||||
|
$config["id_user"] = $_SESSION["id_usuario"];
|
||||||
|
if (! check_acl ($config['id_user'], 0, "AW")) {
|
||||||
|
db_pandora_audit("ACL Violation", "Trying to access downtime scheduler");
|
||||||
|
require ("general/noaccess.php");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Filter parameters
|
||||||
|
$offset = (int) get_parameter('offset');
|
||||||
|
$search_text = (string) get_parameter('search_text');
|
||||||
|
$date_from = (string) get_parameter('date_from');
|
||||||
|
$date_to = (string) get_parameter('date_to');
|
||||||
|
$execution_type = (string) get_parameter('execution_type');
|
||||||
|
$show_archived = (bool) get_parameter('archived');
|
||||||
|
$agent_id = (int) get_parameter('agent_id');
|
||||||
|
$agent_name = !empty($agent_id) ? (string) get_parameter('agent_name') : "";
|
||||||
|
$module_id = (int) get_parameter('module_name_hidden');
|
||||||
|
$module_name = !empty($module_id) ? (string) get_parameter('module_name') : "";
|
||||||
|
|
||||||
|
$separator = (string) get_parameter("separator", ";");
|
||||||
|
$items_separator = (string) get_parameter("items_separator", ",");
|
||||||
|
|
||||||
|
// SQL QUERY CREATION
|
||||||
|
$where_values = "1=1";
|
||||||
|
|
||||||
|
$groups = users_get_groups();
|
||||||
|
$groups_string = implode (",", array_keys ($groups));
|
||||||
|
$where_values .= " AND id_group IN ($groups_string)";
|
||||||
|
|
||||||
|
if (!empty($search_text)) {
|
||||||
|
$where_values .= " AND (name LIKE '%$search_text%' OR description LIKE '%$search_text%')";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($execution_type)) {
|
||||||
|
$where_values .= " AND type_execution = '$execution_type'";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($date_from)) {
|
||||||
|
$where_values .= " AND (type_execution = 'periodically' OR (type_execution = 'once' AND date_from >= '".strtotime("$date_from 00:00:00")."'))";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($date_to)) {
|
||||||
|
$periodically_monthly_w = "type_periodicity = 'monthly' AND (periodically_day_from <= '".date('d', strtotime($date_from))."' AND periodically_time_to >= '".date('d', strtotime($date_to))."')";
|
||||||
|
|
||||||
|
$periodically_weekly_days = array();
|
||||||
|
$date_from_aux = strtotime($date_from);
|
||||||
|
$date_end = strtotime($date_to);
|
||||||
|
$days_number = 0;
|
||||||
|
|
||||||
|
while ($date_from_aux <= $date_end && $days_number < 7) {
|
||||||
|
$weekday_actual = strtolower(date('l', $date_from_aux));
|
||||||
|
|
||||||
|
$periodically_weekly_days[] = "$weekday_actual = 1";
|
||||||
|
|
||||||
|
$date_from_aux = $date_from_aux + SECONDS_1DAY;
|
||||||
|
$days_number++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$periodically_weekly_w = "type_periodicity = 'weekly' AND (".implode(" OR ", $periodically_weekly_days).")";
|
||||||
|
|
||||||
|
$periodically_w = "type_execution = 'periodically' AND (($periodically_monthly_w) OR ($periodically_weekly_w))";
|
||||||
|
|
||||||
|
$once_w = "type_execution = 'once' AND date_to <= '".strtotime("$date_to 23:59:59")."'";
|
||||||
|
|
||||||
|
$where_values .= " AND (($periodically_w) OR ($once_w))";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$show_archived) {
|
||||||
|
$where_values .= " AND (type_execution = 'periodically' OR (type_execution = 'once' AND date_to >= '".time()."'))";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($agent_id)) {
|
||||||
|
$where_values .= " AND id IN (SELECT id_downtime FROM tplanned_downtime_agents WHERE id_agent = $agent_id)";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($module_id)) {
|
||||||
|
$where_values .= " AND (id IN (SELECT id_downtime
|
||||||
|
FROM tplanned_downtime_modules
|
||||||
|
WHERE id_agent_module = $module_id)
|
||||||
|
OR id IN (SELECT id_downtime
|
||||||
|
FROM tplanned_downtime_agents tpda, tagente_modulo tam
|
||||||
|
WHERE tpda.id_agent = tam.id_agente
|
||||||
|
AND tam.id_agente_modulo = $module_id
|
||||||
|
AND tpda.all_modules = 1))";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "SELECT *
|
||||||
|
FROM tplanned_downtime
|
||||||
|
WHERE $where_values
|
||||||
|
ORDER BY type_execution DESC, date_from DESC";
|
||||||
|
$downtimes = @db_get_all_rows_sql($sql);
|
||||||
|
html_debug_print($sql);
|
||||||
|
html_debug_print($downtimes);
|
||||||
|
if (!empty($downtimes)) {
|
||||||
|
ob_clean();
|
||||||
|
// Show contentype header
|
||||||
|
Header("Content-type: text/csv");
|
||||||
|
header('Content-Disposition: attachment; filename="pandora_planned_downtime_'.date("Y/m/d H:i:s").'.csv"');
|
||||||
|
|
||||||
|
$titles = array();
|
||||||
|
$titles[] = "id";
|
||||||
|
$titles[] = "name";
|
||||||
|
$titles[] = "description";
|
||||||
|
$titles[] = "group";
|
||||||
|
$titles[] = "type";
|
||||||
|
$titles[] = "execution_type";
|
||||||
|
$titles[] = "execution_date";
|
||||||
|
$titles[] = "affected_items";
|
||||||
|
|
||||||
|
echo implode($separator, $titles);
|
||||||
|
echo chr(13);
|
||||||
|
|
||||||
|
foreach ($downtimes as $downtime) {
|
||||||
|
$id = $downtime['id'];
|
||||||
|
$name = io_safe_output($downtime['name']);
|
||||||
|
$description = io_safe_output($downtime['description']);
|
||||||
|
$group = ucfirst(io_safe_output(groups_get_name($downtime['id_group'])));
|
||||||
|
$type = ucfirst(io_safe_output($downtime['type_downtime']));
|
||||||
|
$execution_type = ucfirst(io_safe_output($downtime['type_execution']));
|
||||||
|
|
||||||
|
switch ($downtime['type_execution']) {
|
||||||
|
case 'once':
|
||||||
|
$execution_date = date ("Y-m-d H:i", $downtime['date_from']) .
|
||||||
|
" " . __('to') . " ".
|
||||||
|
date ("Y-m-d H:i", $downtime['date_to']);
|
||||||
|
break;
|
||||||
|
case 'periodically':
|
||||||
|
switch ($downtime['type_periodicity']) {
|
||||||
|
case 'weekly':
|
||||||
|
$execution_date = __('Weekly:');
|
||||||
|
$execution_date .= " ";
|
||||||
|
if ($downtime['monday']) {
|
||||||
|
$execution_date .= __('Mon');
|
||||||
|
$execution_date .= " ";
|
||||||
|
}
|
||||||
|
if ($downtime['tuesday']) {
|
||||||
|
$execution_date .= __('Tue');
|
||||||
|
$execution_date .= " ";
|
||||||
|
}
|
||||||
|
if ($downtime['wednesday']) {
|
||||||
|
$execution_date .= __('Wed');
|
||||||
|
$execution_date .= " ";
|
||||||
|
}
|
||||||
|
if ($downtime['thursday']) {
|
||||||
|
$execution_date .= __('Thu');
|
||||||
|
$execution_date .= " ";
|
||||||
|
}
|
||||||
|
if ($downtime['friday']) {
|
||||||
|
$execution_date .= __('Fri');
|
||||||
|
$execution_date .= " ";
|
||||||
|
}
|
||||||
|
if ($downtime['saturday']) {
|
||||||
|
$execution_date .= __('Sat');
|
||||||
|
$execution_date .= " ";
|
||||||
|
}
|
||||||
|
if ($downtime['sunday']) {
|
||||||
|
$execution_date .= __('Sun');
|
||||||
|
$execution_date .= " ";
|
||||||
|
}
|
||||||
|
$execution_date .= " (" . $downtime['periodically_time_from'];
|
||||||
|
$execution_date .= "-" . $downtime['periodically_time_to'] . ")";
|
||||||
|
break;
|
||||||
|
case 'monthly':
|
||||||
|
$execution_date = __('Monthly:');
|
||||||
|
$execution_date .= __('From day') . " " . $downtime['periodically_day_from'];
|
||||||
|
$execution_date .= "/" . __('To day') . " ";
|
||||||
|
$execution_date .= $downtime['periodically_day_to'];
|
||||||
|
$execution_date .= " (" . $downtime['periodically_time_from'];
|
||||||
|
$execution_date .= "-" . $downtime['periodically_time_to'] . ")";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$execution_date = io_safe_output($execution_date);
|
||||||
|
|
||||||
|
$affected_items = array();
|
||||||
|
|
||||||
|
$sql_agents = "SELECT tpda.id_agent AS agent_id, tpda.all_modules AS all_modules, ta.nombre AS agent_name
|
||||||
|
FROM tplanned_downtime_agents tpda, tagente ta
|
||||||
|
WHERE tpda.id_downtime = $id
|
||||||
|
AND tpda.id_agent = ta.id_agente";
|
||||||
|
$downtime_agents = @db_get_all_rows_sql($sql_agents);
|
||||||
|
|
||||||
|
if (!empty($downtime_agents)) {
|
||||||
|
foreach ($downtime_agents as $downtime_agent) {
|
||||||
|
$downtime_items = array();
|
||||||
|
$downtime_items[] = $downtime_agent['agent_name'];
|
||||||
|
|
||||||
|
if (!$downtime_agent['all_modules']) {
|
||||||
|
$agent_id = $downtime_agent['agent_id'];
|
||||||
|
$sql_modules = "SELECT tpdm.id_agent_module AS module_id, tam.nombre AS module_name
|
||||||
|
FROM tplanned_downtime_modules tpdm, tagente_modulo tam
|
||||||
|
WHERE tpdm.id_downtime = $id
|
||||||
|
AND tpdm.id_agent = $agent_id
|
||||||
|
AND tpdm.id_agent_module = tam.id_agente_modulo";
|
||||||
|
$downtime_modules = @db_get_all_rows_sql($sql_modules);
|
||||||
|
|
||||||
|
if (!empty($downtime_modules)) {
|
||||||
|
foreach ($downtime_modules as $downtime_module) {
|
||||||
|
$downtime_items[] = $downtime_module['module_name'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$affected_items[] = "[".implode("|", $downtime_items)."]";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$affected_items = implode(",", $affected_items);
|
||||||
|
|
||||||
|
$values = array();
|
||||||
|
$values[] = $id;
|
||||||
|
$values[] = $name;
|
||||||
|
$values[] = $description;
|
||||||
|
$values[] = $group;
|
||||||
|
$values[] = $type;
|
||||||
|
$values[] = $execution_type;
|
||||||
|
$values[] = $execution_date;
|
||||||
|
$values[] = $affected_items;
|
||||||
|
|
||||||
|
echo implode($separator, $values);
|
||||||
|
echo chr(13);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo '<div class="nf">'.__('No planned downtime').'</div>';
|
||||||
|
}
|
||||||
|
?>
|
|
@ -180,9 +180,95 @@ if ($delete_downtime) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$groups = users_get_groups ();
|
// Filter parameters
|
||||||
|
$offset = (int) get_parameter('offset');
|
||||||
|
$search_text = (string) get_parameter('search_text');
|
||||||
|
$date_from = (string) get_parameter('date_from');
|
||||||
|
$date_to = (string) get_parameter('date_to');
|
||||||
|
$execution_type = (string) get_parameter('execution_type');
|
||||||
|
$show_archived = (bool) get_parameter('archived');
|
||||||
|
$agent_id = (int) get_parameter('agent_id');
|
||||||
|
$agent_name = !empty($agent_id) ? (string) get_parameter('agent_name') : "";
|
||||||
|
$module_id = (int) get_parameter('module_name_hidden');
|
||||||
|
$module_name = !empty($module_id) ? (string) get_parameter('module_name') : "";
|
||||||
|
|
||||||
|
$filter_params = array();
|
||||||
|
$filter_params['search_text'] = $search_text;
|
||||||
|
$filter_params['date_from'] = $date_from;
|
||||||
|
$filter_params['date_to'] = $date_to;
|
||||||
|
$filter_params['execution_type'] = $execution_type;
|
||||||
|
$filter_params['archived'] = $show_archived;
|
||||||
|
$filter_params['agent_id'] = $agent_id;
|
||||||
|
$filter_params['agent_name'] = $agent_name;
|
||||||
|
$filter_params['module_id'] = $module_id;
|
||||||
|
$filter_params['module_name'] = $module_name;
|
||||||
|
|
||||||
|
$filter_params_aux = array();
|
||||||
|
foreach ($filter_params as $name => $value) {
|
||||||
|
$filter_params_aux[] = is_bool($value) ? $name."=".(int)$value : "$name=$value";
|
||||||
|
}
|
||||||
|
$filter_params_str = !empty($filter_params_aux) ? implode("&", $filter_params_aux) : "";
|
||||||
|
|
||||||
|
// Table filter
|
||||||
|
$table = new StdClass();
|
||||||
|
$table->class = 'databox';
|
||||||
|
$table->width = '99%';
|
||||||
|
$table->rowstyle = array();
|
||||||
|
$table->rowstyle[0] = "background-color: #f9faf9;";
|
||||||
|
$table->rowstyle[1] = "background-color: #f9faf9;";
|
||||||
|
$table->rowstyle[2] = "background-color: #f9faf9;";
|
||||||
|
$table->data = array();
|
||||||
|
|
||||||
|
$row = array();
|
||||||
|
|
||||||
|
// Search text
|
||||||
|
$row[] = __('Search') . ' ' . html_print_input_text("search_text", $search_text, '', 50, 250, true);
|
||||||
|
// Dates
|
||||||
|
$date_inputs = __('From') . ' ' . html_print_input_text('date_from', $date_from, '', 10, 10, true);
|
||||||
|
$date_inputs .= " ";
|
||||||
|
$date_inputs .= __('To') . ' ' . html_print_input_text('date_to', $date_to, '', 10, 10, true);
|
||||||
|
$row[] = $date_inputs;
|
||||||
|
|
||||||
|
$table->data[] = $row;
|
||||||
|
|
||||||
|
$row = array();
|
||||||
|
|
||||||
|
// Execution type
|
||||||
|
$execution_type_fields = array('once' => __('Once'), 'periodically' => __('Periodically'));
|
||||||
|
$row[] = __('Execution type') . ' ' . html_print_select($execution_type_fields, 'execution_type', $execution_type, '', __('Any'), '', true, false, false);
|
||||||
|
// Show past downtimes
|
||||||
|
$row[] = __('Show past downtimes') . ' ' . html_print_checkbox ("archived", 1, $show_archived, true);
|
||||||
|
|
||||||
|
$table->data[] = $row;
|
||||||
|
|
||||||
|
$row = array();
|
||||||
|
|
||||||
|
// Agent
|
||||||
|
$params = array();
|
||||||
|
$params['show_helptip'] = true;
|
||||||
|
$params['input_name'] = 'agent_name';
|
||||||
|
$params['value'] = $agent_name;
|
||||||
|
$params['return'] = true;
|
||||||
|
$params['print_hidden_input_idagent'] = true;
|
||||||
|
$params['hidden_input_idagent_name'] = 'agent_id';
|
||||||
|
$params['hidden_input_idagent_value'] = $agent_id;
|
||||||
|
$agent_input = __('Agent') . ' ' . ui_print_agent_autocomplete_input($params);
|
||||||
|
$row[] = $agent_input;
|
||||||
|
|
||||||
|
// Module
|
||||||
|
$module_input = __('Module') . ' ' . html_print_autocomplete_modules('module_name', $module_name, false, true, '', array(), true);
|
||||||
|
$row[] = $module_input;
|
||||||
|
|
||||||
|
$row[] = html_print_submit_button('Search', 'search', false, 'class="sub search"', true);
|
||||||
|
|
||||||
|
$table->data[] = $row;
|
||||||
|
|
||||||
|
echo "<form method='post' action='index.php?sec=estado&sec2=godmode/agentes/planned_downtime.list'>";
|
||||||
|
html_print_table($table);
|
||||||
|
echo "</form>";
|
||||||
|
|
||||||
// View available downtimes present in database (if any of them)
|
// View available downtimes present in database (if any of them)
|
||||||
|
$table = new StdClass();
|
||||||
$table->class = 'databox';
|
$table->class = 'databox';
|
||||||
//Start Overview of existing planned downtime
|
//Start Overview of existing planned downtime
|
||||||
$table->width = '98%';
|
$table->width = '98%';
|
||||||
|
@ -194,10 +280,10 @@ $table->head[2] = __('Group');
|
||||||
$table->head[3] = __('Type');
|
$table->head[3] = __('Type');
|
||||||
$table->head[4] = __('Execution');
|
$table->head[4] = __('Execution');
|
||||||
$table->head[5] = __('Configuration');
|
$table->head[5] = __('Configuration');
|
||||||
$table->head[6] = __('Delete');
|
$table->head[6] = __('Running');
|
||||||
$table->head[7] = __('Update');
|
$table->head[7] = __('Stop downtime');
|
||||||
$table->head[8] = __('Running');
|
$table->head[8] = __('Edit');
|
||||||
$table->head[9] = __('Stop downtime');
|
$table->head[9] = __('Delete');
|
||||||
$table->align[2] = "center";
|
$table->align[2] = "center";
|
||||||
//$table->align[5] = "center";
|
//$table->align[5] = "center";
|
||||||
$table->align[6] = "center";
|
$table->align[6] = "center";
|
||||||
|
@ -205,11 +291,85 @@ $table->align[7] = "center";
|
||||||
$table->align[8] = "center";
|
$table->align[8] = "center";
|
||||||
$table->align[9] = "center";
|
$table->align[9] = "center";
|
||||||
|
|
||||||
|
$groups = users_get_groups ();
|
||||||
if(!empty($groups)) {
|
if(!empty($groups)) {
|
||||||
|
$where_values = "1=1";
|
||||||
|
|
||||||
|
$groups_string = implode (",", array_keys ($groups));
|
||||||
|
$where_values .= " AND id_group IN ($groups_string)";
|
||||||
|
|
||||||
|
if (!empty($search_text)) {
|
||||||
|
$where_values .= " AND (name LIKE '%$search_text%' OR description LIKE '%$search_text%')";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($execution_type)) {
|
||||||
|
$where_values .= " AND type_execution = '$execution_type'";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($date_from)) {
|
||||||
|
$where_values .= " AND (type_execution = 'periodically' OR (type_execution = 'once' AND date_from >= '".strtotime("$date_from 00:00:00")."'))";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($date_to)) {
|
||||||
|
$periodically_monthly_w = "type_periodicity = 'monthly'
|
||||||
|
AND ((periodically_day_from <= '".date('d', strtotime($date_from))."' AND periodically_day_to >= '".date('d', strtotime($date_to))."')
|
||||||
|
OR (periodically_day_from > periodically_day_to
|
||||||
|
AND (periodically_day_from <= '".date('d', strtotime($date_from))."' OR periodically_day_to >= '".date('d', strtotime($date_to))."')))";
|
||||||
|
|
||||||
|
$periodically_weekly_days = array();
|
||||||
|
$date_from_aux = strtotime($date_from);
|
||||||
|
$date_end = strtotime($date_to);
|
||||||
|
$days_number = 0;
|
||||||
|
|
||||||
|
while ($date_from_aux <= $date_end && $days_number < 7) {
|
||||||
|
$weekday_actual = strtolower(date('l', $date_from_aux));
|
||||||
|
|
||||||
|
$periodically_weekly_days[] = "$weekday_actual = 1";
|
||||||
|
|
||||||
|
$date_from_aux = $date_from_aux + SECONDS_1DAY;
|
||||||
|
$days_number++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$periodically_weekly_w = "type_periodicity = 'weekly' AND (".implode(" OR ", $periodically_weekly_days).")";
|
||||||
|
|
||||||
|
$periodically_w = "type_execution = 'periodically' AND (($periodically_monthly_w) OR ($periodically_weekly_w))";
|
||||||
|
|
||||||
|
$once_w = "type_execution = 'once' AND date_to <= '".strtotime("$date_to 23:59:59")."'";
|
||||||
|
|
||||||
|
$where_values .= " AND (($periodically_w) OR ($once_w))";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$show_archived) {
|
||||||
|
$where_values .= " AND (type_execution = 'periodically' OR (type_execution = 'once' AND date_to >= '".time()."'))";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($agent_id)) {
|
||||||
|
$where_values .= " AND id IN (SELECT id_downtime FROM tplanned_downtime_agents WHERE id_agent = $agent_id)";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($module_id)) {
|
||||||
|
$where_values .= " AND (id IN (SELECT id_downtime
|
||||||
|
FROM tplanned_downtime_modules
|
||||||
|
WHERE id_agent_module = $module_id)
|
||||||
|
OR id IN (SELECT id_downtime
|
||||||
|
FROM tplanned_downtime_agents tpda, tagente_modulo tam
|
||||||
|
WHERE tpda.id_agent = tam.id_agente
|
||||||
|
AND tam.id_agente_modulo = $module_id
|
||||||
|
AND tpda.all_modules = 1))";
|
||||||
|
}
|
||||||
|
|
||||||
$sql = "SELECT *
|
$sql = "SELECT *
|
||||||
FROM tplanned_downtime
|
FROM tplanned_downtime
|
||||||
WHERE id_group IN (" . implode (",", array_keys ($groups)) . ")";
|
WHERE $where_values
|
||||||
|
ORDER BY type_execution DESC, date_from DESC
|
||||||
|
LIMIT ".$config["block_size"]."
|
||||||
|
OFFSET $offset";
|
||||||
|
$sql_count = "SELECT COUNT(id) AS num
|
||||||
|
FROM tplanned_downtime
|
||||||
|
WHERE $where_values";
|
||||||
$downtimes = db_get_all_rows_sql ($sql);
|
$downtimes = db_get_all_rows_sql ($sql);
|
||||||
|
$downtimes_number_res = db_get_all_rows_sql($sql_count);
|
||||||
|
$downtimes_number = $downtimes_number_res != false ? $downtimes_number_res[0]['num'] : 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$downtimes = array();
|
$downtimes = array();
|
||||||
|
@ -219,6 +379,8 @@ if (!$downtimes) {
|
||||||
echo '<div class="nf">'.__('No planned downtime').'</div>';
|
echo '<div class="nf">'.__('No planned downtime').'</div>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
ui_pagination($downtimes_number, "index.php?sec=estado&sec2=godmode/agentes/planned_downtime.list&$filter_params_str", $offset);
|
||||||
|
|
||||||
foreach ($downtimes as $downtime) {
|
foreach ($downtimes as $downtime) {
|
||||||
$data = array();
|
$data = array();
|
||||||
$total = db_get_sql ("SELECT COUNT(id_agent)
|
$total = db_get_sql ("SELECT COUNT(id_agent)
|
||||||
|
@ -295,44 +457,71 @@ else {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($downtime["executed"] == 0) {
|
if ($downtime["executed"] == 0) {
|
||||||
$data[6] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime.list&'.
|
$data[6] = html_print_image ("images/pixel_red.png", true,
|
||||||
'delete_downtime=1&id_downtime='.$downtime['id'].'">' .
|
|
||||||
html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete')));
|
|
||||||
$data[7] = '<a
|
|
||||||
href="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime.editor&edit_downtime=1&id_downtime='.$downtime['id'].'">' .
|
|
||||||
html_print_image("images/config.png", true, array("border" => '0', "alt" => __('Update'))) . '</a>';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$data[6]= "N/A";
|
|
||||||
$data[7]= "N/A";
|
|
||||||
|
|
||||||
}
|
|
||||||
if ($downtime["executed"] == 0) {
|
|
||||||
$data[8] = html_print_image ("images/pixel_red.png", true,
|
|
||||||
array ('width' => 20, 'height' => 20, 'alt' => __('Executed')));
|
array ('width' => 20, 'height' => 20, 'alt' => __('Executed')));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$data[8] = html_print_image ("images/pixel_green.png", true,
|
$data[6] = html_print_image ("images/pixel_green.png", true,
|
||||||
array ('width' => 20, 'height' => 20, 'alt' => __('Not executed')));
|
array ('width' => 20, 'height' => 20, 'alt' => __('Not executed')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($downtime['type_execution'] == 'once' && $downtime["executed"] == 1) {
|
||||||
|
|
||||||
if (($downtime['type_execution'] == 'once')
|
$data[7] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime.list&' .
|
||||||
&& ($downtime["executed"] == 1)) {
|
|
||||||
|
|
||||||
$data[9] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime.list&' .
|
|
||||||
'stop_downtime=1&' .
|
'stop_downtime=1&' .
|
||||||
'id_downtime=' . $downtime['id'] . '">' .
|
'id_downtime=' . $downtime['id'] . '">' .
|
||||||
html_print_image("images/cancel.png", true, array("border" => '0', "alt" => __('Stop downtime')));
|
html_print_image("images/cancel.png", true, array("border" => '0', "alt" => __('Stop downtime')));
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$data[7] = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($downtime["executed"] == 0) {
|
||||||
|
$data[8] = '<a
|
||||||
|
href="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime.editor&edit_downtime=1&id_downtime='.$downtime['id'].'">' .
|
||||||
|
html_print_image("images/config.png", true, array("border" => '0', "alt" => __('Update'))) . '</a>';
|
||||||
|
$data[9] = '<a id="delete_downtime" href="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime.list&'.
|
||||||
|
'delete_downtime=1&id_downtime='.$downtime['id'].'">' .
|
||||||
|
html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete')));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$data[8]= "N/A";
|
||||||
|
$data[9]= "N/A";
|
||||||
|
|
||||||
|
}
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
}
|
}
|
||||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||||
|
|
||||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime.editor">';
|
echo '<br>';
|
||||||
|
echo '<div style="display: inline;">';
|
||||||
|
html_print_button(__('Export to CSV'), 'csv_export', false, "location.href='godmode/agentes/planned_downtime.export_csv.php?$filter_params_str'", 'class="sub next"');
|
||||||
|
echo '</div>';
|
||||||
|
echo ' ';
|
||||||
|
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime.editor" style="display: inline;">';
|
||||||
html_print_submit_button (__('Create'), 'create', false, 'class="sub next"');
|
html_print_submit_button (__('Create'), 'create', false, 'class="sub next"');
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
ui_require_jquery_file("ui.datepicker-" . get_user_language(), "include/javascript/i18n/");
|
||||||
|
|
||||||
|
?>
|
||||||
|
<script language="javascript" type="text/javascript">
|
||||||
|
|
||||||
|
$("input[name=module_name_hidden]").val(<?php echo (int)$module_id; ?>);
|
||||||
|
|
||||||
|
$(document).ready (function () {
|
||||||
|
$("#text-date_from, #text-date_to").datepicker({dateFormat: "<?php echo DATE_FORMAT_JS; ?>"});
|
||||||
|
$.datepicker.setDefaults($.datepicker.regional[ "<?php echo get_user_language(); ?>"]);
|
||||||
|
|
||||||
|
$("a#delete_downtime").click(function (e) {
|
||||||
|
if (!confirm("<?php echo __('WARNING: If you delete this planned downtime, it will not be taken into account in future SLA reports'); ?>")) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
|
@ -87,9 +87,6 @@ $intervals[SECONDS_1WEEK] = __('Last week');
|
||||||
$intervals[SECONDS_2WEEK] = __('2 weeks');
|
$intervals[SECONDS_2WEEK] = __('2 weeks');
|
||||||
$intervals[SECONDS_1MONTH] = __('Last month');
|
$intervals[SECONDS_1MONTH] = __('Last month');
|
||||||
|
|
||||||
$table_other->data[2][0] = __('SLA period (seconds)') . ui_print_help_tip(__('You can see this in SLA agent tab.'), true);
|
|
||||||
$table_other->data[2][1] = html_print_select ($intervals, 'sla_period', $config["sla_period"], '', '', '0', true);
|
|
||||||
|
|
||||||
$table_other->data[3][0] = __('Default hours for event view');
|
$table_other->data[3][0] = __('Default hours for event view');
|
||||||
$table_other->data[3][1] = html_print_input_text ('event_view_hr', $config["event_view_hr"], '', 5, 5, true);
|
$table_other->data[3][1] = html_print_input_text ('event_view_hr', $config["event_view_hr"], '', 5, 5, true);
|
||||||
|
|
||||||
|
@ -107,6 +104,10 @@ $table_other->data[7][1] .= __('No').' '.html_print_radio_button ('agentacc
|
||||||
$table_other->data[8][0] = __('Max. recommended number of files in attachment directory') . ui_print_help_tip(__('This number is the maximum number of files in attachment directory. If this number is reached then a warning message will appear in the header notification space.'), true);
|
$table_other->data[8][0] = __('Max. recommended number of files in attachment directory') . ui_print_help_tip(__('This number is the maximum number of files in attachment directory. If this number is reached then a warning message will appear in the header notification space.'), true);
|
||||||
$table_other->data[8][1] = html_print_input_text ('num_files_attachment', $config["num_files_attachment"], '', 5, 5, true);
|
$table_other->data[8][1] = html_print_input_text ('num_files_attachment', $config["num_files_attachment"], '', 5, 5, true);
|
||||||
|
|
||||||
|
$table_other->data[9][0] = __('Delete not init modules');
|
||||||
|
$table_other->data[9][1] = __('Yes').' '.html_print_radio_button ('delete_notinit', 1, '', $config["delete_notinit"], true).' ';
|
||||||
|
$table_other->data[9][1] .= __('No').' '.html_print_radio_button ('delete_notinit', 0, '', $config["delete_notinit"], true);
|
||||||
|
|
||||||
echo '<form id="form_setup" method="post">';
|
echo '<form id="form_setup" method="post">';
|
||||||
echo "<fieldset>";
|
echo "<fieldset>";
|
||||||
echo "<legend>" . __('Database maintenance options') . "</legend>";
|
echo "<legend>" . __('Database maintenance options') . "</legend>";
|
||||||
|
|
|
@ -263,6 +263,12 @@ $table->data['tutorial_mode'][1] =
|
||||||
html_print_select($modes_tutorial, 'tutorial_mode',
|
html_print_select($modes_tutorial, 'tutorial_mode',
|
||||||
$config["tutorial_mode"], '', '', 0, true);
|
$config["tutorial_mode"], '', '', 0, true);
|
||||||
|
|
||||||
|
$config["past_planned_downtimes"] = isset($config["past_planned_downtimes"]) ? $config["past_planned_downtimes"] : 1;
|
||||||
|
$table->data[33][0] = __('Allow create planned downtimes in the past') .
|
||||||
|
ui_print_help_tip(__('The planned downtimes created in the past will affect the SLA reports'), true);
|
||||||
|
$table->data[33][1] = __('Yes').' '.html_print_radio_button ('past_planned_downtimes', 1, '', $config["past_planned_downtimes"], true).' ';
|
||||||
|
$table->data[33][1] .= __('No').' '.html_print_radio_button ('past_planned_downtimes', 0, '', $config["past_planned_downtimes"], true);
|
||||||
|
|
||||||
echo '<form id="form_setup" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=general&pure='.$config['pure'].'">';
|
echo '<form id="form_setup" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=general&pure='.$config['pure'].'">';
|
||||||
|
|
||||||
echo "<fieldset>";
|
echo "<fieldset>";
|
||||||
|
|
|
@ -48,7 +48,7 @@ if ($get_plugin_macros) {
|
||||||
|
|
||||||
if ($search_modules) {
|
if ($search_modules) {
|
||||||
$id_agents = json_decode(io_safe_output(get_parameter('id_agents')));
|
$id_agents = json_decode(io_safe_output(get_parameter('id_agents')));
|
||||||
$filter = get_parameter('q', '') . '%';
|
$filter = '%' . get_parameter('q', '') . '%';
|
||||||
$other_filter = json_decode(io_safe_output(get_parameter('other_filter')), true);
|
$other_filter = json_decode(io_safe_output(get_parameter('other_filter')), true);
|
||||||
|
|
||||||
$modules = agents_get_modules($id_agents, false,
|
$modules = agents_get_modules($id_agents, false,
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC140916';
|
$build_version = 'PC140922';
|
||||||
$pandora_version = 'v5.1';
|
$pandora_version = 'v5.1';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
|
|
|
@ -184,6 +184,8 @@ function config_update_config () {
|
||||||
$error_update[] = __('Server logs directory');
|
$error_update[] = __('Server logs directory');
|
||||||
if (!config_update_value ('tutorial_mode', get_parameter('tutorial_mode')))
|
if (!config_update_value ('tutorial_mode', get_parameter('tutorial_mode')))
|
||||||
$error_update[] = __('Tutorial mode');
|
$error_update[] = __('Tutorial mode');
|
||||||
|
if (!config_update_value ('past_planned_downtimes', get_parameter('past_planned_downtimes')))
|
||||||
|
$error_update[] = __('Allow create planned downtimes in the past');
|
||||||
break;
|
break;
|
||||||
case 'enterprise':
|
case 'enterprise':
|
||||||
if (isset($config['enterprise_installed']) && $config['enterprise_installed'] == 1) {
|
if (isset($config['enterprise_installed']) && $config['enterprise_installed'] == 1) {
|
||||||
|
@ -345,8 +347,6 @@ function config_update_config () {
|
||||||
$error_update[] = __('Max. days before compact data');
|
$error_update[] = __('Max. days before compact data');
|
||||||
if (!config_update_value ('step_compact', (int) get_parameter ('step_compact')))
|
if (!config_update_value ('step_compact', (int) get_parameter ('step_compact')))
|
||||||
$error_update[] = __('Compact interpolation in hours (1 Fine-20 bad)');
|
$error_update[] = __('Compact interpolation in hours (1 Fine-20 bad)');
|
||||||
if (!config_update_value ('sla_period', (int) get_parameter ('sla_period')))
|
|
||||||
$error_update[] = __('SLA period (seconds)');
|
|
||||||
if (!config_update_value ('event_view_hr', (int) get_parameter ('event_view_hr')))
|
if (!config_update_value ('event_view_hr', (int) get_parameter ('event_view_hr')))
|
||||||
$error_update[] = __('Default hours for event view');
|
$error_update[] = __('Default hours for event view');
|
||||||
if (!config_update_value ('realtimestats', get_parameter ('realtimestats')))
|
if (!config_update_value ('realtimestats', get_parameter ('realtimestats')))
|
||||||
|
@ -359,6 +359,8 @@ function config_update_config () {
|
||||||
$error_update[] = 'Deprecated compact_header';
|
$error_update[] = 'Deprecated compact_header';
|
||||||
if (!config_update_value ('num_files_attachment', (int) get_parameter ('num_files_attachment')))
|
if (!config_update_value ('num_files_attachment', (int) get_parameter ('num_files_attachment')))
|
||||||
$error_update[] = __('Max. recommended number of files in attachment directory');
|
$error_update[] = __('Max. recommended number of files in attachment directory');
|
||||||
|
if (!config_update_value ('delete_notinit', get_parameter ('delete_notinit')))
|
||||||
|
$error_update[] = __('Delete not init modules');
|
||||||
/////////////
|
/////////////
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -616,10 +618,6 @@ function config_process_config () {
|
||||||
config_update_value ('trap2agent', 0);
|
config_update_value ('trap2agent', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset ($config["sla_period"]) || empty ($config["sla_period"])) {
|
|
||||||
config_update_value ('sla_period', SECONDS_1WEEK);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset ($config["prominent_time"])) {
|
if (!isset ($config["prominent_time"])) {
|
||||||
// Prominent time tells us what to show prominently when a timestamp is
|
// Prominent time tells us what to show prominently when a timestamp is
|
||||||
// displayed. The comparation (... days ago) or the timestamp (full date)
|
// displayed. The comparation (... days ago) or the timestamp (full date)
|
||||||
|
@ -677,6 +675,10 @@ function config_process_config () {
|
||||||
config_update_value ('realtimestats', 1);
|
config_update_value ('realtimestats', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset ($config["delete_notinit"])) {
|
||||||
|
config_update_value ('delete_notinit', 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset ($config["event_purge"])) {
|
if (!isset ($config["event_purge"])) {
|
||||||
config_update_value ('event_purge', 15);
|
config_update_value ('event_purge', 15);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1921,9 +1921,15 @@ function html_print_autocomplete_modules($name = 'module',
|
||||||
$groups = users_get_groups($config['id_user'], "AW", false);
|
$groups = users_get_groups($config['id_user'], "AW", false);
|
||||||
$groups = array_keys($groups);
|
$groups = array_keys($groups);
|
||||||
|
|
||||||
|
if (empty($groups)) {
|
||||||
|
$id_groups = 0;
|
||||||
|
} else {
|
||||||
|
$id_groups = implode(',', $groups);
|
||||||
|
}
|
||||||
|
|
||||||
$agents = db_get_all_rows_sql('SELECT id_agente
|
$agents = db_get_all_rows_sql('SELECT id_agente
|
||||||
FROM tagente
|
FROM tagente
|
||||||
WHERE id_grupo IN (' . implode(',', $groups) . ')');
|
WHERE id_grupo IN (' . $id_groups . ')');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$agents = db_get_all_rows_sql('SELECT id_agente
|
$agents = db_get_all_rows_sql('SELECT id_agente
|
||||||
|
@ -2009,6 +2015,12 @@ function html_print_autocomplete_modules($name = 'module',
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
change: function( event, ui ) {
|
||||||
|
if (!ui.item)
|
||||||
|
$("input[name='<?php echo $name; ?>_hidden']")
|
||||||
|
.val(0);
|
||||||
|
return false;
|
||||||
|
},
|
||||||
select: function( event, ui ) {
|
select: function( event, ui ) {
|
||||||
$("input[name='<?php echo $name; ?>_hidden']")
|
$("input[name='<?php echo $name; ?>_hidden']")
|
||||||
.val(ui.item.value);
|
.val(ui.item.value);
|
||||||
|
|
|
@ -46,12 +46,11 @@ include_once($config['homedir'] . "/include/functions_netflow.php");
|
||||||
*
|
*
|
||||||
* @return float The average module value in the interval.
|
* @return float The average module value in the interval.
|
||||||
*/
|
*/
|
||||||
function reporting_get_agentmodule_data_average ($id_agent_module, $period, $date = 0) {
|
function reporting_get_agentmodule_data_average ($id_agent_module, $period=0, $date = 0) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
// Initialize variables
|
// Initialize variables
|
||||||
if (empty ($date)) $date = get_system_time ();
|
if (empty ($date)) $date = get_system_time ();
|
||||||
if ((empty ($period)) OR ($period == 0)) $period = $config["sla_period"];
|
|
||||||
$datelimit = $date - $period;
|
$datelimit = $date - $period;
|
||||||
|
|
||||||
$id_module_type = modules_get_agentmodule_type ($id_agent_module);
|
$id_module_type = modules_get_agentmodule_type ($id_agent_module);
|
||||||
|
@ -150,12 +149,11 @@ function reporting_get_agentmodule_data_average ($id_agent_module, $period, $dat
|
||||||
*
|
*
|
||||||
* @return float The maximum module value in the interval.
|
* @return float The maximum module value in the interval.
|
||||||
*/
|
*/
|
||||||
function reporting_get_agentmodule_data_max ($id_agent_module, $period, $date = 0) {
|
function reporting_get_agentmodule_data_max ($id_agent_module, $period=0, $date = 0) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
// Initialize variables
|
// Initialize variables
|
||||||
if (empty ($date)) $date = get_system_time ();
|
if (empty ($date)) $date = get_system_time ();
|
||||||
if ((empty ($period)) OR ($period == 0)) $period = $config["sla_period"];
|
|
||||||
$datelimit = $date - $period;
|
$datelimit = $date - $period;
|
||||||
|
|
||||||
$id_module_type = modules_get_agentmodule_type ($id_agent_module);
|
$id_module_type = modules_get_agentmodule_type ($id_agent_module);
|
||||||
|
@ -230,12 +228,11 @@ function reporting_get_agentmodule_data_max ($id_agent_module, $period, $date =
|
||||||
*
|
*
|
||||||
* @return float The minimum module value of the module
|
* @return float The minimum module value of the module
|
||||||
*/
|
*/
|
||||||
function reporting_get_agentmodule_data_min ($id_agent_module, $period, $date = 0) {
|
function reporting_get_agentmodule_data_min ($id_agent_module, $period=0, $date = 0) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
// Initialize variables
|
// Initialize variables
|
||||||
if (empty ($date)) $date = get_system_time ();
|
if (empty ($date)) $date = get_system_time ();
|
||||||
if ((empty ($period)) OR ($period == 0)) $period = $config["sla_period"];
|
|
||||||
$datelimit = $date - $period;
|
$datelimit = $date - $period;
|
||||||
|
|
||||||
$id_module_type = modules_get_agentmodule_type ($id_agent_module);
|
$id_module_type = modules_get_agentmodule_type ($id_agent_module);
|
||||||
|
@ -305,12 +302,10 @@ function reporting_get_agentmodule_data_min ($id_agent_module, $period, $date =
|
||||||
*
|
*
|
||||||
* @return float The sumatory of the module values in the interval.
|
* @return float The sumatory of the module values in the interval.
|
||||||
*/
|
*/
|
||||||
function reporting_get_agentmodule_data_sum ($id_agent_module, $period, $date = 0) {
|
function reporting_get_agentmodule_data_sum ($id_agent_module, $period=0, $date = 0) {
|
||||||
global $config;
|
global $config;
|
||||||
// Initialize variables
|
// Initialize variables
|
||||||
if (empty ($date)) $date = get_system_time ();
|
if (empty ($date)) $date = get_system_time ();
|
||||||
if ((empty ($period)) OR ($period == 0))
|
|
||||||
$period = $config["sla_period"];
|
|
||||||
$datelimit = $date - $period;
|
$datelimit = $date - $period;
|
||||||
|
|
||||||
$id_module_type = db_get_value ('id_tipo_modulo', 'tagente_modulo','id_agente_modulo', $id_agent_module);
|
$id_module_type = db_get_value ('id_tipo_modulo', 'tagente_modulo','id_agente_modulo', $id_agent_module);
|
||||||
|
@ -414,9 +409,6 @@ function reporting_get_agentmodule_sla ($id_agent_module, $period = 0, $min_valu
|
||||||
if (empty ($date)) {
|
if (empty ($date)) {
|
||||||
$date = get_system_time ();
|
$date = get_system_time ();
|
||||||
}
|
}
|
||||||
if ((empty ($period)) OR ($period == 0)) {
|
|
||||||
$period = $config["sla_period"];
|
|
||||||
}
|
|
||||||
if ($daysWeek === null) {
|
if ($daysWeek === null) {
|
||||||
$daysWeek = array();
|
$daysWeek = array();
|
||||||
}
|
}
|
||||||
|
@ -478,27 +470,8 @@ function reporting_get_agentmodule_sla ($id_agent_module, $period = 0, $min_valu
|
||||||
$interval_data = array ();
|
$interval_data = array ();
|
||||||
}
|
}
|
||||||
|
|
||||||
//calculate planned downtime dates
|
// Calculate planned downtime dates
|
||||||
$id_agent = db_get_value('id_agente', 'tagente_modulo', 'id_agente_modulo', $id_agent_module);
|
$downtime_dates = reporting_get_planned_downtimes_intervals($id_agent_module, $datelimit, $date, true);
|
||||||
$sql_downtime = "SELECT id_downtime FROM tplanned_downtime_agents WHERE id_agent=$id_agent";
|
|
||||||
$downtimes = db_get_all_rows_sql($sql_downtime);
|
|
||||||
if ($downtimes == false) {
|
|
||||||
$downtimes = array();
|
|
||||||
}
|
|
||||||
$i = 0;
|
|
||||||
$downtime_dates = array();
|
|
||||||
foreach ($downtimes as $downtime) {
|
|
||||||
$id_downtime = $downtime['id_downtime'];
|
|
||||||
$sql_date = "SELECT date_from, date_to FROM tplanned_downtime WHERE id=$id_downtime";
|
|
||||||
$date_downtime = db_get_row_sql($sql_date);
|
|
||||||
|
|
||||||
if ($date_downtime != false) {
|
|
||||||
$downtime_dates[$i]['date_from'] = $date_downtime['date_from'];
|
|
||||||
$downtime_dates[$i]['date_to'] = $date_downtime['date_to'];
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/////
|
|
||||||
|
|
||||||
// Get previous data
|
// Get previous data
|
||||||
$previous_data = modules_get_previous_data ($id_agent_module, $datelimit);
|
$previous_data = modules_get_previous_data ($id_agent_module, $datelimit);
|
||||||
|
@ -600,9 +573,6 @@ function reporting_get_agentmodule_sla_array ($id_agent_module, $period = 0, $mi
|
||||||
if (empty ($date)) {
|
if (empty ($date)) {
|
||||||
$date = get_system_time ();
|
$date = get_system_time ();
|
||||||
}
|
}
|
||||||
if ((empty ($period)) OR ($period == 0)) {
|
|
||||||
$period = $config["sla_period"];
|
|
||||||
}
|
|
||||||
if ($daysWeek === null) {
|
if ($daysWeek === null) {
|
||||||
$daysWeek = array();
|
$daysWeek = array();
|
||||||
}
|
}
|
||||||
|
@ -772,29 +742,19 @@ function reporting_get_agentmodule_sla_array ($id_agent_module, $period = 0, $mi
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
||||||
//--------Calculate planned downtime dates--------------------------
|
//--------Calculate planned downtime dates--------------------------
|
||||||
$id_agent = db_get_value('id_agente', 'tagente_modulo', 'id_agente_modulo', $id_agent_module);
|
$downtime_dates = reporting_get_planned_downtimes_intervals($id_agent_module, $datelimit, $date, true);
|
||||||
$sql_downtime = "SELECT id_downtime FROM tplanned_downtime_agents WHERE id_agent=$id_agent";
|
|
||||||
$downtimes = db_get_all_rows_sql($sql_downtime);
|
|
||||||
if ($downtimes == false) {
|
|
||||||
$downtimes = array();
|
|
||||||
}
|
|
||||||
$i = 0;
|
|
||||||
$downtime_dates = array();
|
|
||||||
|
|
||||||
foreach ($downtimes as $downtime) {
|
foreach ($downtime_dates as $downtime_date) {
|
||||||
$id_downtime = $downtime['id_downtime'];
|
|
||||||
$sql_date = "SELECT date_from, date_to FROM tplanned_downtime WHERE id=$id_downtime";
|
|
||||||
$date_downtime = db_get_row_sql($sql_date);
|
|
||||||
|
|
||||||
if ($date_downtime != false) {
|
|
||||||
// Delete data of the planned downtime and put the last data on the upper limit
|
// Delete data of the planned downtime and put the last data on the upper limit
|
||||||
$interval_data_indexed[$date_downtime['date_from']]['data'] = 0;
|
$interval_data_indexed[$downtime_date['date_from']]['data'] = 0;
|
||||||
$interval_data_indexed[$date_downtime['date_from']]['status'] = 5;
|
$interval_data_indexed[$downtime_date['date_from']]['status'] = 5;
|
||||||
|
$interval_data_indexed[$downtime_date['date_to']]['data'] = 0;
|
||||||
|
$interval_data_indexed[$downtime_date['date_to']]['status'] = 4;
|
||||||
|
|
||||||
$last_downtime_data = false;
|
$last_downtime_data = false;
|
||||||
foreach ($interval_data_indexed as $idi_timestamp => $idi) {
|
foreach ($interval_data_indexed as $idi_timestamp => $idi) {
|
||||||
if ($idi_timestamp != $date_downtime['date_from'] && $idi_timestamp != $date_downtime['date_to'] &&
|
if ($idi_timestamp != $downtime_date['date_from'] && $idi_timestamp != $downtime_date['date_to'] &&
|
||||||
$idi_timestamp >= $date_downtime['date_from'] && $idi_timestamp <= $date_downtime['date_to']) {
|
$idi_timestamp >= $downtime_date['date_from'] && $idi_timestamp <= $downtime_date['date_to']) {
|
||||||
$last_downtime_data = $idi['data'];
|
$last_downtime_data = $idi['data'];
|
||||||
unset($interval_data_indexed[$idi_timestamp]);
|
unset($interval_data_indexed[$idi_timestamp]);
|
||||||
}
|
}
|
||||||
|
@ -802,13 +762,7 @@ function reporting_get_agentmodule_sla_array ($id_agent_module, $period = 0, $mi
|
||||||
|
|
||||||
// Set the last data of the interval as limit
|
// Set the last data of the interval as limit
|
||||||
if ($last_downtime_data !== false) {
|
if ($last_downtime_data !== false) {
|
||||||
$interval_data_indexed[$date_downtime['date_to']]['data'] = $last_downtime_data;
|
$interval_data_indexed[$downtime_date['date_to']]['data'] = $last_downtime_data;
|
||||||
}// If there arent data into the downtime, set unknown
|
|
||||||
else {
|
|
||||||
$interval_data_indexed[$date_downtime['date_to']]['data'] = 0;
|
|
||||||
$interval_data_indexed[$date_downtime['date_to']]['status'] = 4;
|
|
||||||
}
|
|
||||||
$i++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
@ -906,6 +860,337 @@ function reporting_get_agentmodule_sla_array ($id_agent_module, $period = 0, $mi
|
||||||
return $data_colors;
|
return $data_colors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the time intervals where an agentmodule is affected by the planned downtimes.
|
||||||
|
*
|
||||||
|
* @param int Agent module to calculate planned downtimes intervals.
|
||||||
|
* @param int Start date in utimestamp.
|
||||||
|
* @param int End date in utimestamp.
|
||||||
|
* @param bool Whether ot not to get the planned downtimes that affect the service associated with the agentmodule.
|
||||||
|
*
|
||||||
|
* @return Array with time intervals.
|
||||||
|
*/
|
||||||
|
function reporting_get_planned_downtimes_intervals ($id_agent_module, $start_date, $end_date, $check_services = false) {
|
||||||
|
$sql_downtime = "SELECT DISTINCT(tpd.id), tpd.*
|
||||||
|
FROM tplanned_downtime tpd, tplanned_downtime_agents tpda, tplanned_downtime_modules tpdm, tagente_modulo tam
|
||||||
|
WHERE (tpd.id = tpda.id_downtime
|
||||||
|
AND tpda.all_modules = 1
|
||||||
|
AND tpda.id_agent = tam.id_agente
|
||||||
|
AND tam.id_agente_modulo = $id_agent_module)
|
||||||
|
OR (tpd.id = tpdm.id_downtime
|
||||||
|
AND tpdm.id_agent_module = $id_agent_module)";
|
||||||
|
$downtimes = db_get_all_rows_sql($sql_downtime);
|
||||||
|
if ($downtimes == false) {
|
||||||
|
$downtimes = array();
|
||||||
|
}
|
||||||
|
$downtime_dates = array();
|
||||||
|
foreach ($downtimes as $downtime) {
|
||||||
|
$downtime_id = $downtime['id'];
|
||||||
|
$downtime_type = $downtime['type_execution'];
|
||||||
|
$downtime_periodicity = $downtime['type_periodicity'];
|
||||||
|
|
||||||
|
if ($downtime_type == 'once') {
|
||||||
|
$dates = array();
|
||||||
|
$dates['date_from'] = $downtime['date_from'];
|
||||||
|
$dates['date_to'] = $downtime['date_to'];
|
||||||
|
$downtime_dates[] = $dates;
|
||||||
|
}
|
||||||
|
else if ($downtime_type == 'periodically') {
|
||||||
|
$downtime_time_from = $downtime['periodically_time_from'];
|
||||||
|
$downtime_time_to = $downtime['periodically_time_to'];
|
||||||
|
|
||||||
|
$downtime_hour_from = date("H", strtotime($downtime_time_from));
|
||||||
|
$downtime_minute_from = date("i", strtotime($downtime_time_from));
|
||||||
|
$downtime_second_from = date("s", strtotime($downtime_time_from));
|
||||||
|
$downtime_hour_to = date("H", strtotime($downtime_time_to));
|
||||||
|
$downtime_minute_to = date("i", strtotime($downtime_time_to));
|
||||||
|
$downtime_second_to = date("s", strtotime($downtime_time_to));
|
||||||
|
|
||||||
|
if ($downtime_periodicity == "monthly") {
|
||||||
|
$downtime_day_from = $downtime['periodically_day_from'];
|
||||||
|
$downtime_day_to = $downtime['periodically_day_to'];
|
||||||
|
|
||||||
|
$date_aux = strtotime(date("Y-m-01", $start_date));
|
||||||
|
$year_aux = date("Y", $date_aux);
|
||||||
|
$month_aux = date("m", $date_aux);
|
||||||
|
|
||||||
|
$end_year = date("Y", $end_date);
|
||||||
|
$end_month = date("m", $end_date);
|
||||||
|
|
||||||
|
while ($year_aux < $end_year || ($year_aux == $end_year && $month_aux <= $end_month)) {
|
||||||
|
|
||||||
|
if ($downtime_day_from > $downtime_day_to) {
|
||||||
|
$dates = array();
|
||||||
|
$dates['date_from'] = strtotime("$year_aux-$month_aux-$downtime_day_from $downtime_hour_from:$downtime_minute_from:$downtime_second_from");
|
||||||
|
$dates['date_to'] = strtotime(date("Y-m-t H:i:s", strtotime("$year_aux-$month_aux-28 23:59:59")));
|
||||||
|
$downtime_dates[] = $dates;
|
||||||
|
|
||||||
|
$dates = array();
|
||||||
|
if ($month_aux + 1 <= 12) {
|
||||||
|
$dates['date_from'] = strtotime("$year_aux-".($month_aux + 1)."-01 00:00:00");
|
||||||
|
$dates['date_to'] = strtotime("$year_aux-".($month_aux + 1)."-$downtime_day_to $downtime_hour_to:$downtime_minute_to:$downtime_second_to");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$dates['date_from'] = strtotime(($year_aux + 1)."-01-01 00:00:00");
|
||||||
|
$dates['date_to'] = strtotime(($year_aux + 1)."-01-$downtime_day_to $downtime_hour_to:$downtime_minute_to:$downtime_second_to");
|
||||||
|
}
|
||||||
|
$downtime_dates[] = $dates;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if ($downtime_day_from == $downtime_day_to && strtotime($downtime_time_from) > strtotime($downtime_time_to)) {
|
||||||
|
$date_aux_from = strtotime("$year_aux-$month_aux-$downtime_day_from $downtime_hour_from:$downtime_minute_from:$downtime_second_from");
|
||||||
|
$max_day_num = date('t', $date_aux);
|
||||||
|
|
||||||
|
$dates = array();
|
||||||
|
$dates['date_from'] = strtotime("$year_aux-$month_aux-$downtime_day_from $downtime_hour_from:$downtime_minute_from:$downtime_second_from");
|
||||||
|
$dates['date_to'] = strtotime("$year_aux-$month_aux-$downtime_day_from 23:59:59");
|
||||||
|
$downtime_dates[] = $dates;
|
||||||
|
|
||||||
|
if ($downtime_day_to + 1 > $max_day_num) {
|
||||||
|
|
||||||
|
$dates = array();
|
||||||
|
if ($month_aux + 1 <= 12) {
|
||||||
|
$dates['date_from'] = strtotime("$year_aux-".($month_aux + 1)."-01 00:00:00");
|
||||||
|
$dates['date_to'] = strtotime("$year_aux-".($month_aux + 1)."-01 $downtime_hour_to:$downtime_minute_to:$downtime_second_to");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$dates['date_from'] = strtotime(($year_aux + 1)."-01-01 00:00:00");
|
||||||
|
$dates['date_to'] = strtotime(($year_aux + 1)."-01-01 $downtime_hour_to:$downtime_minute_to:$downtime_second_to");
|
||||||
|
}
|
||||||
|
$downtime_dates[] = $dates;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$dates = array();
|
||||||
|
$dates['date_from'] = strtotime("$year_aux-$month_aux-".($downtime_day_to + 1)." 00:00:00");
|
||||||
|
$dates['date_to'] = strtotime("$year_aux-$month_aux-".($downtime_day_to + 1)." $downtime_hour_to:$downtime_minute_to:$downtime_second_to");
|
||||||
|
$downtime_dates[] = $dates;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$dates = array();
|
||||||
|
$dates['date_from'] = strtotime("$year_aux-$month_aux-$downtime_day_from $downtime_hour_from:$downtime_minute_from:$downtime_second_from");
|
||||||
|
$dates['date_to'] = strtotime("$year_aux-$month_aux-$downtime_day_to $downtime_hour_to:$downtime_minute_to:$downtime_second_to");
|
||||||
|
$downtime_dates[] = $dates;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$month_aux++;
|
||||||
|
if ($month_aux > 12) {
|
||||||
|
$month_aux = 1;
|
||||||
|
$year_aux++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ($downtime_periodicity == "weekly") {
|
||||||
|
$date_aux = $start_date;
|
||||||
|
$active_days = array();
|
||||||
|
$active_days[0] = ($downtime['sunday'] == 1) ? true : false;
|
||||||
|
$active_days[1] = ($downtime['monday'] == 1) ? true : false;
|
||||||
|
$active_days[2] = ($downtime['tuesday'] == 1) ? true : false;
|
||||||
|
$active_days[3] = ($downtime['wednesday'] == 1) ? true : false;
|
||||||
|
$active_days[4] = ($downtime['thursday'] == 1) ? true : false;
|
||||||
|
$active_days[5] = ($downtime['friday'] == 1) ? true : false;
|
||||||
|
$active_days[6] = ($downtime['saturday'] == 1) ? true : false;
|
||||||
|
|
||||||
|
while ($date_aux <= $end_date) {
|
||||||
|
$weekday_num = date('w', $date_aux);
|
||||||
|
|
||||||
|
if ($active_days[$weekday_num]) {
|
||||||
|
$day_num = date('d', $date_aux);
|
||||||
|
$month_num = date('m', $date_aux);
|
||||||
|
$year_num = date('Y', $date_aux);
|
||||||
|
|
||||||
|
$max_day_num = date('t', $date_aux);
|
||||||
|
|
||||||
|
if (strtotime($downtime_time_from) > strtotime($downtime_time_to)) {
|
||||||
|
$dates = array();
|
||||||
|
$dates['date_from'] = strtotime("$year_num-$month_num-$day_num $downtime_hour_from:$downtime_minute_from:$downtime_second_from");
|
||||||
|
$dates['date_to'] = strtotime("$year_num-$month_num-$day_num 23:59:59");
|
||||||
|
$downtime_dates[] = $dates;
|
||||||
|
|
||||||
|
$dates = array();
|
||||||
|
if ($day_num + 1 > $max_day_num) {
|
||||||
|
if ($month_num + 1 > 12) {
|
||||||
|
$dates['date_from'] = strtotime(($year_num + 1)."-01-01 00:00:00");
|
||||||
|
$dates['date_to'] = strtotime(($year_num + 1)."-01-01 $downtime_hour_to:$downtime_minute_to:$downtime_second_to");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$dates['date_from'] = strtotime("$year_num-".($month_num + 1)."-01 00:00:00");
|
||||||
|
$dates['date_to'] = strtotime("$year_num-".($month_num + 1)."-01 $downtime_hour_to:$downtime_minute_to:$downtime_second_to");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$dates['date_from'] = strtotime("$year_num-$month_num-".($day_num + 1)." 00:00:00");
|
||||||
|
$dates['date_to'] = strtotime("$year_num-$month_num-".($day_num + 1)." $downtime_hour_to:$downtime_minute_to:$downtime_second_to");
|
||||||
|
}
|
||||||
|
$downtime_dates[] = $dates;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$dates = array();
|
||||||
|
$dates['date_from'] = strtotime("$year_num-$month_num-$day_num $downtime_hour_from:$downtime_minute_from:$downtime_second_from");
|
||||||
|
$dates['date_to'] = strtotime("$year_num-$month_num-$day_num $downtime_hour_to:$downtime_minute_to:$downtime_second_to");
|
||||||
|
$downtime_dates[] = $dates;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$date_aux += SECONDS_1DAY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($check_services) {
|
||||||
|
enterprise_include_once("include/functions_services.php");
|
||||||
|
if (function_exists("services_get_planned_downtimes_intervals")) {
|
||||||
|
services_get_planned_downtimes_intervals($downtime_dates, $start_date, $end_date, false, $id_agent_module);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $downtime_dates;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the planned downtimes that affect the passed modules on an specific datetime range.
|
||||||
|
*
|
||||||
|
* @param int Start date in utimestamp.
|
||||||
|
* @param int End date in utimestamp.
|
||||||
|
* @param array The agent modules ids.
|
||||||
|
*
|
||||||
|
* @return Array with the planned downtimes that are executed in any moment of the range selected and affect the
|
||||||
|
* agent modules selected.
|
||||||
|
*/
|
||||||
|
function reporting_get_planned_downtimes ($start_date, $end_date, $id_agent_modules = false) {
|
||||||
|
$start_time = date("H:i:s", $start_date);
|
||||||
|
$end_time = date("H:i:s", $end_date);
|
||||||
|
|
||||||
|
$start_day = date("d", $start_date);
|
||||||
|
$end_day = date("d", $end_date);
|
||||||
|
|
||||||
|
$start_month = date("m", $start_date);
|
||||||
|
$end_month = date("m", $end_date);
|
||||||
|
|
||||||
|
if ($start_date > $end_date) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($end_date - $start_date >= SECONDS_1MONTH) {
|
||||||
|
// If the date range is larger than 1 month, every monthly planned downtime will be inside
|
||||||
|
$periodically_monthly_w = "type_periodicity = 'monthly'";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Check if the range is larger than the planned downtime execution, or if its start or end
|
||||||
|
// is inside the planned downtime execution.
|
||||||
|
// The start and end time is very important.
|
||||||
|
$periodically_monthly_w = "type_periodicity = 'monthly'
|
||||||
|
AND (((periodically_day_from > '$start_day'
|
||||||
|
OR (periodically_day_from = '$start_day'
|
||||||
|
AND periodically_time_from >= '$start_time'))
|
||||||
|
AND (periodically_day_to < '$end_day'
|
||||||
|
OR (periodically_day_to = '$end_day'
|
||||||
|
AND periodically_time_to <= '$end_time')))
|
||||||
|
OR ((periodically_day_from < '$start_day'
|
||||||
|
OR (periodically_day_from = '$start_day'
|
||||||
|
AND periodically_time_from <= '$start_time'))
|
||||||
|
AND (periodically_day_to > '$start_day'
|
||||||
|
OR (periodically_day_to = '$start_day'
|
||||||
|
AND periodically_time_to >= '$start_time')))
|
||||||
|
OR ((periodically_day_from < '$end_day'
|
||||||
|
OR (periodically_day_from = '$end_day'
|
||||||
|
AND periodically_time_from <= '$end_time'))
|
||||||
|
AND (periodically_day_to > '$end_day'
|
||||||
|
OR (periodically_day_to = '$end_day'
|
||||||
|
AND periodically_time_to >= '$end_time'))))";
|
||||||
|
}
|
||||||
|
|
||||||
|
$periodically_weekly_days = array();
|
||||||
|
$date_aux = $start_date;
|
||||||
|
$i = 0;
|
||||||
|
|
||||||
|
if (($end_date - $start_date) >= SECONDS_1WEEK) {
|
||||||
|
// If the date range is larger than 7 days, every weekly planned downtime will be inside.
|
||||||
|
for ($i = 0; $i < 7; $i++) {
|
||||||
|
$weekday_actual = strtolower(date('l', $date_aux));
|
||||||
|
$periodically_weekly_days[] = "($weekday_actual = 1)";
|
||||||
|
$date_aux += SECONDS_1DAY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (($end_date - $start_date) <= SECONDS_1DAY && $start_day == $end_day) {
|
||||||
|
// If the date range is smaller than 1 day, the start and end days can be equal or consecutive.
|
||||||
|
// If they are equal, the execution times have to be contained in the date range times or contain
|
||||||
|
// the start or end time of the date range.
|
||||||
|
$weekday_actual = strtolower(date('l', $start_date));
|
||||||
|
$periodically_weekly_days[] = "($weekday_actual = 1
|
||||||
|
AND ((periodically_time_from > '$start_time' AND periodically_time_to < '$end_time')
|
||||||
|
OR (periodically_time_from = '$start_time'
|
||||||
|
OR (periodically_time_from < '$start_time'
|
||||||
|
AND periodically_time_to >= '$start_time'))
|
||||||
|
OR (periodically_time_from = '$end_time'
|
||||||
|
OR (periodically_time_from < '$end_time'
|
||||||
|
AND periodically_time_to >= '$end_time'))))";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
while ($date_aux <= $end_date && $i < 7) {
|
||||||
|
|
||||||
|
$weekday_actual = strtolower(date('l', $date_aux));
|
||||||
|
$day_num_actual = date('d', $date_aux);
|
||||||
|
|
||||||
|
if ($date_aux == $start_date) {
|
||||||
|
$periodically_weekly_days[] = "($weekday_actual = 1 AND periodically_time_to >= '$start_time')";
|
||||||
|
}
|
||||||
|
else if ($day_num_actual == $end_day) {
|
||||||
|
$periodically_weekly_days[] = "($weekday_actual = 1 AND periodically_time_from <= '$end_time')";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$periodically_weekly_days[] = "($weekday_actual = 1)";
|
||||||
|
}
|
||||||
|
|
||||||
|
$date_aux += SECONDS_1DAY;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($periodically_weekly_days)) {
|
||||||
|
$periodically_weekly_w = "type_periodicity = 'weekly' AND (".implode(" OR ", $periodically_weekly_days).")";
|
||||||
|
$periodically_condition = "(($periodically_monthly_w) OR ($periodically_weekly_w))";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$periodically_condition = "($periodically_monthly_w)";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($id_agent_modules)) {
|
||||||
|
$id_agent_modules_str = implode(",", $id_agent_modules);
|
||||||
|
$agent_modules_condition_tpda = "AND tam.id_agente_modulo IN ($id_agent_modules_str)";
|
||||||
|
$agent_modules_condition_tpdm = "AND tpdm.id_agent_module IN ($id_agent_modules_str)";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$agent_modules_condition_tpda = "";
|
||||||
|
$agent_modules_condition_tpdm = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql_downtime = "SELECT DISTINCT(tpd.id), tpd.*
|
||||||
|
FROM tplanned_downtime tpd, tplanned_downtime_agents tpda, tplanned_downtime_modules tpdm, tagente_modulo tam
|
||||||
|
WHERE ((tpd.id = tpda.id_downtime
|
||||||
|
AND tpda.all_modules = 1
|
||||||
|
AND tpda.id_agent = tam.id_agente
|
||||||
|
$agent_modules_condition_tpda)
|
||||||
|
OR (tpd.id = tpdm.id_downtime
|
||||||
|
$agent_modules_condition_tpdm))
|
||||||
|
AND ((type_execution = 'periodically'
|
||||||
|
AND $periodically_condition)
|
||||||
|
OR (type_execution = 'once'
|
||||||
|
AND ((date_from >= '$start_date' AND date_to <= '$end_date')
|
||||||
|
OR (date_from <= '$start_date' AND date_to >= '$end_date')
|
||||||
|
OR (date_from <= '$start_date' AND date_to >= '$start_date')
|
||||||
|
OR (date_from <= '$end_date' AND date_to >= '$end_date'))))";
|
||||||
|
|
||||||
|
$downtimes = db_get_all_rows_sql($sql_downtime);
|
||||||
|
if ($downtimes == false) {
|
||||||
|
$downtimes = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $downtimes;
|
||||||
|
}
|
||||||
|
|
||||||
function reporting_get_stats_servers($tiny = true) {
|
function reporting_get_stats_servers($tiny = true) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
@ -1460,11 +1745,11 @@ function reporting_get_group_stats ($id_group = 0, $access = 'AR') {
|
||||||
ORDER BY nombre");
|
ORDER BY nombre");
|
||||||
|
|
||||||
$data["monitor_checks"] += $group_stat[0]["modules"];
|
$data["monitor_checks"] += $group_stat[0]["modules"];
|
||||||
$data["monitor_not_init"] += $group_stat[0]["non-init"];
|
$data["agent_not_init"] += $group_stat[0]["non-init"];
|
||||||
$data["monitor_unknown"] += $group_stat[0]["unknown"];
|
$data["agent_unknown"] += $group_stat[0]["unknown"];
|
||||||
$data["monitor_ok"] += $group_stat[0]["normal"];
|
$data["agent_ok"] += $group_stat[0]["normal"];
|
||||||
$data["monitor_warning"] += $group_stat[0]["warning"];
|
$data["agent_warning"] += $group_stat[0]["warning"];
|
||||||
$data["monitor_critical"] += $group_stat[0]["critical"];
|
$data["agent_critical"] += $group_stat[0]["critical"];
|
||||||
$data["monitor_alerts"] += $group_stat[0]["alerts"];
|
$data["monitor_alerts"] += $group_stat[0]["alerts"];
|
||||||
$data["monitor_alerts_fired"] += $group_stat[0]["alerts_fired"];
|
$data["monitor_alerts_fired"] += $group_stat[0]["alerts_fired"];
|
||||||
$data["monitor_alerts_fire_count"] += $group_stat[0]["alerts_fired"];
|
$data["monitor_alerts_fire_count"] += $group_stat[0]["alerts_fired"];
|
||||||
|
@ -1475,17 +1760,11 @@ function reporting_get_group_stats ($id_group = 0, $access = 'AR') {
|
||||||
$data["utimestamp"] = $group_stat[0]["utimestamp"];
|
$data["utimestamp"] = $group_stat[0]["utimestamp"];
|
||||||
|
|
||||||
// This fields are not in database
|
// This fields are not in database
|
||||||
// Get Agents OK
|
$data["monitor_ok"] += groups_monitor_ok($group);
|
||||||
$data["agent_ok"] += groups_agent_ok($group);
|
$data["monitor_warning"] += groups_monitor_warning($group);
|
||||||
// Get Agents Warning
|
$data["monitor_critical"] += groups_monitor_critical($group);
|
||||||
$data["agent_warning"] += groups_agent_warning($group);
|
$data["monitor_unknown"] += groups_monitor_unknown($group);
|
||||||
// Get Agents Critical
|
$data["monitor_not_init"] += groups_monitor_not_init($group);
|
||||||
$data["agent_critical"] += groups_agent_critical($group);
|
|
||||||
// Get Agents Unknown
|
|
||||||
$data["agent_unknown"] += groups_agent_unknown($group);
|
|
||||||
// Get Agents Not init
|
|
||||||
$data["agent_not_init"] += groups_agent_not_init($group);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
@ -1784,11 +2063,6 @@ function reporting_alert_reporting_agent ($id_agent, $period = 0, $date = 0, $re
|
||||||
if (empty ($date)) {
|
if (empty ($date)) {
|
||||||
$date = get_system_time ();
|
$date = get_system_time ();
|
||||||
}
|
}
|
||||||
if (empty ($period)) {
|
|
||||||
global $config;
|
|
||||||
$period = $config["sla_period"];
|
|
||||||
}
|
|
||||||
|
|
||||||
$table->width = '99%';
|
$table->width = '99%';
|
||||||
$table->data = array ();
|
$table->data = array ();
|
||||||
$table->head = array ();
|
$table->head = array ();
|
||||||
|
@ -1893,10 +2167,6 @@ function reporting_alert_reporting_group ($id_group, $period = 0, $date = 0, $re
|
||||||
if (empty ($date)) {
|
if (empty ($date)) {
|
||||||
$date = get_system_time ();
|
$date = get_system_time ();
|
||||||
}
|
}
|
||||||
if (empty ($period)) {
|
|
||||||
global $config;
|
|
||||||
$period = $config["sla_period"];
|
|
||||||
}
|
|
||||||
|
|
||||||
$table->width = '99%';
|
$table->width = '99%';
|
||||||
$table->data = array ();
|
$table->data = array ();
|
||||||
|
@ -2035,10 +2305,6 @@ function reporting_alert_reporting_module ($id_agent_module, $period = 0, $date
|
||||||
if (empty ($date)) {
|
if (empty ($date)) {
|
||||||
$date = get_system_time ();
|
$date = get_system_time ();
|
||||||
}
|
}
|
||||||
if (empty ($period)) {
|
|
||||||
global $config;
|
|
||||||
$period = $config["sla_period"];
|
|
||||||
}
|
|
||||||
|
|
||||||
$table->width = '99%';
|
$table->width = '99%';
|
||||||
$table->data = array ();
|
$table->data = array ();
|
||||||
|
@ -2548,10 +2814,6 @@ function reporting_get_agents_detailed_event ($id_agents, $period = 0,
|
||||||
if (empty ($date)) {
|
if (empty ($date)) {
|
||||||
$date = get_system_time ();
|
$date = get_system_time ();
|
||||||
}
|
}
|
||||||
if (empty ($period)) {
|
|
||||||
global $config;
|
|
||||||
$period = $config["sla_period"];
|
|
||||||
}
|
|
||||||
|
|
||||||
$table->width = '99%';
|
$table->width = '99%';
|
||||||
|
|
||||||
|
@ -2670,10 +2932,6 @@ function reporting_get_group_detailed_event ($id_group, $period = 0,
|
||||||
if (empty ($date)) {
|
if (empty ($date)) {
|
||||||
$date = get_system_time ();
|
$date = get_system_time ();
|
||||||
}
|
}
|
||||||
if (empty ($period)) {
|
|
||||||
global $config;
|
|
||||||
$period = $config["sla_period"];
|
|
||||||
}
|
|
||||||
|
|
||||||
$table->width = '99%';
|
$table->width = '99%';
|
||||||
|
|
||||||
|
@ -2794,10 +3052,6 @@ function reporting_get_module_detailed_event ($id_modules, $period = 0, $date =
|
||||||
if (empty ($date)) {
|
if (empty ($date)) {
|
||||||
$date = get_system_time ();
|
$date = get_system_time ();
|
||||||
}
|
}
|
||||||
if (empty ($period)) {
|
|
||||||
global $config;
|
|
||||||
$period = $config["sla_period"];
|
|
||||||
}
|
|
||||||
|
|
||||||
$table->width = '99%';
|
$table->width = '99%';
|
||||||
$table->data = array ();
|
$table->data = array ();
|
||||||
|
@ -3373,9 +3627,11 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'SLA_monthly':
|
case 'SLA_monthly':
|
||||||
|
if (function_exists("reporting_enterprise_sla_monthly"))
|
||||||
reporting_enterprise_sla_monthly($mini, $content, $report, $table, $item_title);
|
reporting_enterprise_sla_monthly($mini, $content, $report, $table, $item_title);
|
||||||
break;
|
break;
|
||||||
case 'SLA_services':
|
case 'SLA_services':
|
||||||
|
if (function_exists("reporting_enterprise_sla_services"))
|
||||||
reporting_enterprise_sla_services($mini, $content, $report, $table, $item_title);
|
reporting_enterprise_sla_services($mini, $content, $report, $table, $item_title);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
@ -3664,10 +3920,115 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
|
|
||||||
$table->colspan[$next_row][0] = 3;
|
$table->colspan[$next_row][0] = 3;
|
||||||
|
$next_row++;
|
||||||
$data = array();
|
$data = array();
|
||||||
$data[0] = html_print_table($tableslice, true);
|
$data[0] = html_print_table($tableslice, true);
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Table Planned Downtimes
|
||||||
|
$id_agent_modules = array();
|
||||||
|
foreach ($slas as $sla) {
|
||||||
|
if (!empty($sla['id_agent_module']))
|
||||||
|
$id_agent_modules[] = $sla['id_agent_module'];
|
||||||
|
}
|
||||||
|
$planned_downtimes = reporting_get_planned_downtimes(($report['datetime']-$content['period']), $report['datetime'], $id_agent_modules);
|
||||||
|
|
||||||
|
if (!empty($planned_downtimes)) {
|
||||||
|
|
||||||
|
$table_planned_downtimes = new StdClass();
|
||||||
|
$table_planned_downtimes->width = '100%';
|
||||||
|
$table_planned_downtimes->title = __('This SLA has been affected by the following planned downtimes');
|
||||||
|
$table_planned_downtimes->head = array();
|
||||||
|
$table_planned_downtimes->head[0] = __('Name');
|
||||||
|
$table_planned_downtimes->head[1] = __('Description');
|
||||||
|
$table_planned_downtimes->head[2] = __('Execution');
|
||||||
|
$table_planned_downtimes->head[3] = __('Dates');
|
||||||
|
$table_planned_downtimes->headstyle = array();
|
||||||
|
$table_planned_downtimes->style = array();
|
||||||
|
$table_planned_downtimes->data = array();
|
||||||
|
|
||||||
|
if ($for_pdf) {
|
||||||
|
$table_planned_downtimes->titlestyle = 'background: #373737; color: #FFF; display: table-cell; font-size: 12px; border: 1px solid grey';
|
||||||
|
$table_planned_downtimes->class = 'table_sla table_beauty';
|
||||||
|
|
||||||
|
for ($i = 0; $i < count($table_planned_downtimes->head); $i++) {
|
||||||
|
$table_planned_downtimes->headstyle[$i] = 'background: #666; color: #FFF; display: table-cell; font-size: 11px; border: 1px solid grey';
|
||||||
|
}
|
||||||
|
for ($i = 0; $i < count($table_planned_downtimes->head); $i++) {
|
||||||
|
$table_planned_downtimes->style[$i] = 'display: table-cell; font-size: 10px;';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($planned_downtimes as $planned_downtime) {
|
||||||
|
$data = array();
|
||||||
|
$data[0] = $planned_downtime['name'];
|
||||||
|
$data[1] = $planned_downtime['description'];
|
||||||
|
$data[2] = ucfirst($planned_downtime['type_execution']);
|
||||||
|
|
||||||
|
switch ($planned_downtime['type_execution']) {
|
||||||
|
case 'once':
|
||||||
|
$data[3] = date ("Y-m-d H:i", $planned_downtime['date_from']) .
|
||||||
|
" " . __('to') . " ".
|
||||||
|
date ("Y-m-d H:i", $planned_downtime['date_to']);
|
||||||
|
break;
|
||||||
|
case 'periodically':
|
||||||
|
switch ($planned_downtime['type_periodicity']) {
|
||||||
|
case 'weekly':
|
||||||
|
$data[3] = __('Weekly:');
|
||||||
|
$data[3] .= " ";
|
||||||
|
if ($planned_downtime['monday']) {
|
||||||
|
$data[3] .= __('Mon');
|
||||||
|
$data[3] .= " ";
|
||||||
|
}
|
||||||
|
if ($planned_downtime['tuesday']) {
|
||||||
|
$data[3] .= __('Tue');
|
||||||
|
$data[3] .= " ";
|
||||||
|
}
|
||||||
|
if ($planned_downtime['wednesday']) {
|
||||||
|
$data[3] .= __('Wed');
|
||||||
|
$data[3] .= " ";
|
||||||
|
}
|
||||||
|
if ($planned_downtime['thursday']) {
|
||||||
|
$data[3] .= __('Thu');
|
||||||
|
$data[3] .= " ";
|
||||||
|
}
|
||||||
|
if ($planned_downtime['friday']) {
|
||||||
|
$data[3] .= __('Fri');
|
||||||
|
$data[3] .= " ";
|
||||||
|
}
|
||||||
|
if ($planned_downtime['saturday']) {
|
||||||
|
$data[3] .= __('Sat');
|
||||||
|
$data[3] .= " ";
|
||||||
|
}
|
||||||
|
if ($planned_downtime['sunday']) {
|
||||||
|
$data[3] .= __('Sun');
|
||||||
|
$data[3] .= " ";
|
||||||
|
}
|
||||||
|
$data[3] .= " (" . $planned_downtime['periodically_time_from'];
|
||||||
|
$data[3] .= "-" . $planned_downtime['periodically_time_to'] . ")";
|
||||||
|
break;
|
||||||
|
case 'monthly':
|
||||||
|
$data[3] = __('Monthly:') . " ";
|
||||||
|
$data[3] .= __('From day') . " " . $planned_downtime['periodically_day_from'];
|
||||||
|
$data[3] .= " " . strtolower(__('To day')) . " ";
|
||||||
|
$data[3] .= $planned_downtime['periodically_day_to'];
|
||||||
|
$data[3] .= " (" . $planned_downtime['periodically_time_from'];
|
||||||
|
$data[3] .= "-" . $planned_downtime['periodically_time_to'] . ")";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$table_planned_downtimes->data[] = $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
$data[0] = html_print_table($table_planned_downtimes, true);
|
||||||
|
$table->colspan[$next_row][0] = 3;
|
||||||
|
$next_row++;
|
||||||
|
array_push ($table->data, $data);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
case 'monitor_report':
|
case 'monitor_report':
|
||||||
|
@ -6531,11 +6892,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||||
*
|
*
|
||||||
* @return float The MTBF value in the interval.
|
* @return float The MTBF value in the interval.
|
||||||
*/
|
*/
|
||||||
function reporting_get_agentmodule_mtbf ($id_agent_module, $period, $date = 0) {
|
function reporting_get_agentmodule_mtbf ($id_agent_module, $period = 0, $date = 0) {
|
||||||
|
|
||||||
// Initialize variables
|
// Initialize variables
|
||||||
if (empty ($date)) $date = get_system_time ();
|
if (empty ($date)) $date = get_system_time ();
|
||||||
if ((empty ($period)) OR ($period == 0)) $period = $config["sla_period"];
|
|
||||||
|
|
||||||
// Read module configuration
|
// Read module configuration
|
||||||
$datelimit = $date - $period;
|
$datelimit = $date - $period;
|
||||||
|
@ -6642,11 +7002,10 @@ function reporting_get_agentmodule_mtbf ($id_agent_module, $period, $date = 0) {
|
||||||
*
|
*
|
||||||
* @return float The MTTR value in the interval.
|
* @return float The MTTR value in the interval.
|
||||||
*/
|
*/
|
||||||
function reporting_get_agentmodule_mttr ($id_agent_module, $period, $date = 0) {
|
function reporting_get_agentmodule_mttr ($id_agent_module, $period = 0, $date = 0) {
|
||||||
|
|
||||||
// Initialize variables
|
// Initialize variables
|
||||||
if (empty ($date)) $date = get_system_time ();
|
if (empty ($date)) $date = get_system_time ();
|
||||||
if ((empty ($period)) OR ($period == 0)) $period = $config["sla_period"];
|
|
||||||
|
|
||||||
// Read module configuration
|
// Read module configuration
|
||||||
$datelimit = $date - $period;
|
$datelimit = $date - $period;
|
||||||
|
@ -6752,11 +7111,10 @@ function reporting_get_agentmodule_mttr ($id_agent_module, $period, $date = 0) {
|
||||||
*
|
*
|
||||||
* @return float The TTO value in the interval.
|
* @return float The TTO value in the interval.
|
||||||
*/
|
*/
|
||||||
function reporting_get_agentmodule_tto ($id_agent_module, $period, $date = 0) {
|
function reporting_get_agentmodule_tto ($id_agent_module, $period = 0, $date = 0) {
|
||||||
|
|
||||||
// Initialize variables
|
// Initialize variables
|
||||||
if (empty ($date)) $date = get_system_time ();
|
if (empty ($date)) $date = get_system_time ();
|
||||||
if ((empty ($period)) OR ($period == 0)) $period = $config["sla_period"];
|
|
||||||
|
|
||||||
// Read module configuration
|
// Read module configuration
|
||||||
$datelimit = $date - $period;
|
$datelimit = $date - $period;
|
||||||
|
@ -6853,11 +7211,10 @@ function reporting_get_agentmodule_tto ($id_agent_module, $period, $date = 0) {
|
||||||
*
|
*
|
||||||
* @return float The TTR value in the interval.
|
* @return float The TTR value in the interval.
|
||||||
*/
|
*/
|
||||||
function reporting_get_agentmodule_ttr ($id_agent_module, $period, $date = 0) {
|
function reporting_get_agentmodule_ttr ($id_agent_module, $period = 0, $date = 0) {
|
||||||
|
|
||||||
// Initialize variables
|
// Initialize variables
|
||||||
if (empty ($date)) $date = get_system_time ();
|
if (empty ($date)) $date = get_system_time ();
|
||||||
if ((empty ($period)) OR ($period == 0)) $period = $config["sla_period"];
|
|
||||||
|
|
||||||
// Read module configuration
|
// Read module configuration
|
||||||
$datelimit = $date - $period;
|
$datelimit = $date - $period;
|
||||||
|
@ -7017,11 +7374,6 @@ function reporting_get_count_events_by_agent ($id_group, $period = 0,
|
||||||
if (empty ($date)) {
|
if (empty ($date)) {
|
||||||
$date = get_system_time ();
|
$date = get_system_time ();
|
||||||
}
|
}
|
||||||
if (empty ($period)) {
|
|
||||||
global $config;
|
|
||||||
|
|
||||||
$period = $config["sla_period"];
|
|
||||||
}
|
|
||||||
|
|
||||||
return events_get_count_events_by_agent($id_group, $period, $date,
|
return events_get_count_events_by_agent($id_group, $period, $date,
|
||||||
$filter_event_validated, $filter_event_critical,
|
$filter_event_validated, $filter_event_critical,
|
||||||
|
@ -7050,11 +7402,6 @@ function reporting_get_count_events_validated_by_user ($filter, $period = 0,
|
||||||
if (empty ($date)) {
|
if (empty ($date)) {
|
||||||
$date = get_system_time ();
|
$date = get_system_time ();
|
||||||
}
|
}
|
||||||
if (empty ($period)) {
|
|
||||||
global $config;
|
|
||||||
|
|
||||||
$period = $config["sla_period"];
|
|
||||||
}
|
|
||||||
|
|
||||||
return events_get_count_events_validated_by_user($filter, $period, $date,
|
return events_get_count_events_validated_by_user($filter, $period, $date,
|
||||||
$filter_event_validated, $filter_event_critical,
|
$filter_event_validated, $filter_event_critical,
|
||||||
|
@ -7083,11 +7430,6 @@ function reporting_get_count_events_by_criticity ($filter, $period = 0,
|
||||||
if (empty ($date)) {
|
if (empty ($date)) {
|
||||||
$date = get_system_time ();
|
$date = get_system_time ();
|
||||||
}
|
}
|
||||||
if (empty ($period)) {
|
|
||||||
global $config;
|
|
||||||
|
|
||||||
$period = $config["sla_period"];
|
|
||||||
}
|
|
||||||
|
|
||||||
return events_get_count_events_by_criticity($filter, $period, $date,
|
return events_get_count_events_by_criticity($filter, $period, $date,
|
||||||
$filter_event_validated, $filter_event_critical,
|
$filter_event_validated, $filter_event_critical,
|
||||||
|
@ -7116,11 +7458,6 @@ function reporting_get_count_events_validated ($filter, $period = 0,
|
||||||
if (empty ($date)) {
|
if (empty ($date)) {
|
||||||
$date = get_system_time ();
|
$date = get_system_time ();
|
||||||
}
|
}
|
||||||
if (empty ($period)) {
|
|
||||||
global $config;
|
|
||||||
|
|
||||||
$period = $config["sla_period"];
|
|
||||||
}
|
|
||||||
|
|
||||||
return events_get_count_events_validated($filter, $period, $date,
|
return events_get_count_events_validated($filter, $period, $date,
|
||||||
$filter_event_validated, $filter_event_critical,
|
$filter_event_validated, $filter_event_critical,
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Include/help/en
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<h1>Scheduled downtimes. Time and date configuration</h1>
|
||||||
|
|
||||||
|
<h2>Once execution</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The date format must be year/month/day and the time format must be hour:minute:second.
|
||||||
|
It's possible to create a scheduled downtime with a past date, if that option aren't disabled by the admin of Pandora FMS.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>Periodically execution</h2>
|
||||||
|
|
||||||
|
<h3>Monthly</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The downtime will be executed every month, from the start day at the start time, to the end date at the end time selected.
|
||||||
|
The time format must be hour:minute:second and the start day can't be lower than the end day.
|
||||||
|
To reflect a downtime which ends away than the last day of the month, it's necessary to create two scheduled downtimes, the first should ends the day 31 at 23:59:59 and the other should start the day 1 at 00:00:00.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Weekly</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The downtime will be executed every selected day, from the start time, to the end time selected.
|
||||||
|
The start time can't be lower than the end time.
|
||||||
|
To reflect a downtime which ends away than the last day time, it's necessary to create two scheduled downtimes, the first should end at 23:59:59 and the other should start at 00:00:00 on the next day.
|
||||||
|
</p>
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Include/help/es
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<h1>Desconexiones programadas. Configuración de tiempo y fecha</h1>
|
||||||
|
|
||||||
|
<h2>Ejecución única</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
El formato de la fecha debe ser año/mes/día y el del tiempo hora:minuto:segundo.
|
||||||
|
Se pueden crear paradas planificadas en fechas pasadas, siempre que el administrador de Pandora FMS no haya deshabilitado esa opción.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>Ejecución periódica</h2>
|
||||||
|
|
||||||
|
<h3>Mensual</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
La parada se ejecutará cada mes, desde el día de inicio a la hora de inicio, hasta el día final a la hora final indicados.
|
||||||
|
El formato del tiempo debe ser hora:minuto:segundo y el día de inicio no puede ser menor al día final.
|
||||||
|
Para reflejar una parada que va más allá del último día del mes, habría que crear dos paradas, una que terminase el día 31 a las 23:59:59 y otra que empezase el día 1 a las 00:00:00.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Semanal</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
La parada se ejecutará cada día seleccionado, desde la hora de inicio a la hora final indicadas.
|
||||||
|
La hora de inicio no puede ser superior a la hora final.
|
||||||
|
Para reflejar una parada que va más allá de la última hora del día, habría que crear dos paradas, una que terminase a las 23:59:59 y otra que empezase a las 00:00:00 del día siguiente.
|
||||||
|
</p>
|
|
@ -63,7 +63,7 @@
|
||||||
<div style='height: 10px'>
|
<div style='height: 10px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '5.1';
|
$version = '5.1';
|
||||||
$build = '140916';
|
$build = '140922';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
|
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 5.1
|
%define version 5.1
|
||||||
%define release 140916
|
%define release 140922
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 5.1
|
%define version 5.1
|
||||||
%define release 140916
|
%define release 140922
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name apache2
|
%define httpd_name apache2
|
||||||
|
|
|
@ -70,7 +70,6 @@ INSERT INTO tconfig (token, value) VALUES ('graph_color7', '#99FF99');
|
||||||
INSERT INTO tconfig (token, value) VALUES ('graph_color8', '#330066');
|
INSERT INTO tconfig (token, value) VALUES ('graph_color8', '#330066');
|
||||||
INSERT INTO tconfig (token, value) VALUES ('graph_color9', '#66FFFF');
|
INSERT INTO tconfig (token, value) VALUES ('graph_color9', '#66FFFF');
|
||||||
INSERT INTO tconfig (token, value) VALUES ('graph_color10', '#6666FF');
|
INSERT INTO tconfig (token, value) VALUES ('graph_color10', '#6666FF');
|
||||||
INSERT INTO tconfig (token, value) VALUES ('sla_period', '604800');
|
|
||||||
INSERT INTO tconfig (token, value) VALUES ('trap2agent', '0');
|
INSERT INTO tconfig (token, value) VALUES ('trap2agent', '0');
|
||||||
INSERT INTO tconfig (token, value) VALUES ('date_format', 'F j, Y, g:i a');
|
INSERT INTO tconfig (token, value) VALUES ('date_format', 'F j, Y, g:i a');
|
||||||
INSERT INTO tconfig (token, value) VALUES ('event_view_hr', 8);
|
INSERT INTO tconfig (token, value) VALUES ('event_view_hr', 8);
|
||||||
|
|
|
@ -707,7 +707,7 @@ CREATE TABLE IF NOT EXISTS `tnetwork_component` (
|
||||||
`custom_string_3` text,
|
`custom_string_3` text,
|
||||||
`custom_integer_1` int(10) default 0,
|
`custom_integer_1` int(10) default 0,
|
||||||
`custom_integer_2` int(10) default 0,
|
`custom_integer_2` int(10) default 0,
|
||||||
`post_process` double(18,5) default 0,
|
`post_process` double(18,15) default 0,
|
||||||
`unit` text,
|
`unit` text,
|
||||||
`wizard_level` enum('basic','advanced','nowizard') default 'nowizard',
|
`wizard_level` enum('basic','advanced','nowizard') default 'nowizard',
|
||||||
`macros` text,
|
`macros` text,
|
||||||
|
|
|
@ -38,7 +38,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
||||||
('graph_res','5'),
|
('graph_res','5'),
|
||||||
('step_compact','1'),
|
('step_compact','1'),
|
||||||
('db_scheme_version','5.1'),
|
('db_scheme_version','5.1'),
|
||||||
('db_scheme_build','PD140916'),
|
('db_scheme_build','PD140922'),
|
||||||
('show_unknown','0'),
|
('show_unknown','0'),
|
||||||
('show_lastalerts','1'),
|
('show_lastalerts','1'),
|
||||||
('style','pandora'),
|
('style','pandora'),
|
||||||
|
@ -53,7 +53,6 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
||||||
('graph_color8', '#330066'),
|
('graph_color8', '#330066'),
|
||||||
('graph_color9', '#ffff00'),
|
('graph_color9', '#ffff00'),
|
||||||
('graph_color10', '#99ffff'),
|
('graph_color10', '#99ffff'),
|
||||||
('sla_period', '604800'),
|
|
||||||
('trap2agent', '0'),
|
('trap2agent', '0'),
|
||||||
('date_format', 'F j, Y, g:i a'),
|
('date_format', 'F j, Y, g:i a'),
|
||||||
('event_view_hr', 8),
|
('event_view_hr', 8),
|
||||||
|
@ -293,41 +292,35 @@ INSERT INTO tmodule VALUES (4,'Plugin module');
|
||||||
INSERT INTO tmodule VALUES (5,'Prediction module');
|
INSERT INTO tmodule VALUES (5,'Prediction module');
|
||||||
INSERT INTO tmodule VALUES (6,'WMI module');
|
INSERT INTO tmodule VALUES (6,'WMI module');
|
||||||
|
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (1,'OS Total process','Total process in Operating System (UNIX MIB)',13,15,0,0,180,0,'','','public','HOST-RESOURCES-MIB::hrSystemProcesses.0 ',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (1,'OS Total process','Total process in Operating System (UNIX MIB)',13,15,0,0,300,0,'','','public','HOST-RESOURCES-MIB::hrSystemProcesses.0 ',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (2,'OS CPU Load (1 min)','CPU Load in Operating System (UNIX MIB)',13,15,0,0,180,0,'','','public','UCD-SNMP-MIB::laLoad.1',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (2,'OS CPU Load (1 min)','CPU Load in Operating System (UNIX MIB)',13,15,0,0,300,0,'','','public','UCD-SNMP-MIB::laLoad.1',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (3,'Sysname','Get name of system using SNMP standard MIB',1,17,0,0,900,0,'','','public','.1.3.6.1.2.1.1.1.0',1,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (3,'Sysname','Get name of system using SNMP standard MIB',1,17,0,0,900,0,'','','public','.1.3.6.1.2.1.1.1.0',1,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (4,'OS Users','Active users in Operating System (UNIX MIB)',13,15,0,0,180,0,'','','public','HOST-RESOURCES-MIB::hrSystemNumUsers.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (4,'OS Users','Active users in Operating System (UNIX MIB)',13,15,0,0,300,0,'','','public','HOST-RESOURCES-MIB::hrSystemNumUsers.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (11,'Catalyst CPU Usage (5min)','Cisco Catayst Switches CPU Usage. Taken from ftp://ftp.cisco.com/pub/mibs/oid/OLD-CISCO-CPU-MIB.oid',2,15,0,0,180,0,'','','public','1.3.6.1.4.1.9.2.1.58',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (11,'Catalyst CPU Usage (5min)','Cisco Catayst Switches CPU Usage. Taken from ftp://ftp.cisco.com/pub/mibs/oid/OLD-CISCO-CPU-MIB.oid',2,15,0,0,300,0,'','','public','1.3.6.1.4.1.9.2.1.58',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (22,'HSRP Status','Get status of HSRP',2,18,0,0,180,0,'','','public','1.3.6.1.4.1.9.9.106.1.2.1.1.15.12.106',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (22,'HSRP Status','Get status of HSRP',2,18,0,0,300,0,'','','public','1.3.6.1.4.1.9.9.106.1.2.1.1.15.12.106',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (24,'NIC #1 status','Status of NIC#1',10,18,0,0,180,0,'','','public','.1.3.6.1.2.1.2.2.1.8.1',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `module_macros`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`) VALUES (24,'ifOperStatus_if1','Status of NIC#1',10,18,0,0,300,0,'1','','public','.1.3.6.1.2.1.2.2.1.8.1',2,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.00000,'','basic','','','','',0,0,0,'','{\"going_unknown\":0}','',0,0,0,0);
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (25,'NIC #2 status','Status of NIC #2',10,18,0,0,180,0,'','','public','.1.3.6.1.2.1.2.2.1.8.2',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `module_macros`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`) VALUES (25,'ifOperStatus_if2','Status of NIC #2',10,18,0,0,300,0,'1','','public','.1.3.6.1.2.1.2.2.1.8.2',2,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.00000,'','basic','','','','',0,0,0,'','{\"going_unknown\":0}','',0,0,0,0);
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (26,'NIC #3 status','Status of NIC #3',10,18,0,0,180,0,'','','public','.1.3.6.1.2.1.2.2.1.8.3',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `module_macros`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`) VALUES (26,'ifOperStatus_if3','Status of NIC #3',10,18,0,0,300,0,'1','','public','.1.3.6.1.2.1.2.2.1.8.3',2,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.00000,'','basic','','','','',0,0,0,'','{\"going_unknown\":0}','',0,0,0,0);
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (27,'NIC #1 outOctects','Output throughtput on Interface #1',10,16,0,0,180,0,'','','public','.1.3.6.1.2.1.2.2.1.16.1',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `module_macros`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`) VALUES (27,'ifOutOctets_if1','Output throughtput on Interface #1',10,16,0,0,300,0,'1','','public','.1.3.6.1.2.1.2.2.1.16.1',2,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.00000,'bytes/sec','basic','','','','',0,0,0,'','{\"going_unknown\":0}','',0,0,0,0);
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (28,'NIC #2 outOctects','Output troughtput on interface #2',10,16,0,0,180,0,'','','public','.1.3.6.1.2.1.2.2.1.16.2',1,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `module_macros`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`) VALUES (28,'ifOutOctets_if2','Output troughtput on interface #2',10,16,0,0,300,0,'1','','public','.1.3.6.1.2.1.2.2.1.16.2',1,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.00000,'bytes/sec','basic','','','','',0,0,0,'','{\"going_unknown\":0}','',0,0,0,0);
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (29,'NIC #3 outOctects','Output troughtput on Interface #3',10,16,0,0,180,0,'','','public','.1.3.6.1.2.1.2.2.1.16.3',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `module_macros`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`) VALUES (29,'ifOutOctets_if3','Output troughtput on Interface #3',10,16,0,0,300,0,'1','','public','.1.3.6.1.2.1.2.2.1.16.3',2,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.00000,'bytes/sec','basic','','','','',0,0,0,'','{\"going_unknown\":0}','',0,0,0,0);
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (30,'NIC #1 inOctects','Input troughtput on Interface #1',10,16,0,0,180,0,'','','public','.1.3.6.1.2.1.2.2.1.10.1',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `module_macros`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`) VALUES (30,'ifInOctets_if1','Input troughtput on Interface #1',10,16,0,0,300,0,'1','','public','.1.3.6.1.2.1.2.2.1.10.1',2,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.00000,'bytes/sec','basic','','','','',0,0,0,'','{\"going_unknown\":0}','',0,0,0,0);
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (31,'NIC #2 inOctects','Input throughtput for interface #2',10,16,0,0,180,0,'','NULL','public','.1.3.6.1.2.1.2.2.1.10.2',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `module_macros`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`) VALUES (31,'ifInOctets_if2','Input throughtput for interface #2',10,16,0,0,300,0,'1','','public','.1.3.6.1.2.1.2.2.1.10.2',2,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.00000,'bytes/sec','basic','','','','',0,0,0,'','{\"going_unknown\":0}','',0,0,0,0);
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (32,'NIC #3 inOctects','Input throught on interface #3',10,16,0,0,180,0,'','','public','.1.3.6.1.2.1.2.2.1.10.3',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `module_macros`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`) VALUES (32,'ifInOctets_if3','Input throught on interface #3',10,16,0,0,300,0,'1','','public','.1.3.6.1.2.1.2.2.1.10.3',2,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.00000,'bytes/sec','basic','','','','',0,0,0,'','{\"going_unknown\":0}','',0,0,0,0);
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (34,'Host Alive','Check if host is alive using ICMP ping check.',10,6,0,0,120,0,'','','','',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (34,'Host Alive','Check if host is alive using ICMP ping check.',10,6,0,0,300,0,'','','','',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (36,'Host Latency','Get host network latency in miliseconds, using ICMP.',10,7,0,0,180,0,'','','','',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (36,'Host Latency','Get host network latency in miliseconds, using ICMP.',10,7,0,0,300,0,'','','','',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (37,'Check HTTP Server','Test APACHE2 HTTP service remotely (Protocol response, not only openport)',10,9,0,0,300,80,'GET / HTTP/1.0^M^M','HTTP/1.1 200 OK','','',3,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (37,'Check HTTP Server','Test APACHE2 HTTP service remotely (Protocol response, not only openport)',10,9,0,0,300,80,'GET / HTTP/1.0^M^M','HTTP/1.1 200 OK','','',3,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (38,'Check FTP Server','Check FTP protocol, not only check port.',10,9,0,0,300,21,'QUIT','220','','',3,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (38,'Check FTP Server','Check FTP protocol, not only check port.',10,9,0,0,300,21,'QUIT','220','','',3,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (39,'Check SSH Server','Checks port 22 is opened',10,9,0,0,300,22,'','','','',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (39,'Check SSH Server','Checks port 22 is opened',10,9,0,0,300,22,'','','','',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (40,'Check Telnet server','Check telnet port',10,9,0,0,300,23,'','','','',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (40,'Check Telnet server','Check telnet port',10,9,0,0,300,23,'','','','',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (41,'Check SMTP server','Check if SMTP port it's open',10,9,0,0,300,25,'','','','',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (41,'Check SMTP server','Check if SMTP port it's open',10,9,0,0,300,25,'','','','',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (42,'Check POP3 server','Check POP3 port.',10,9,0,0,300,110,'','','','',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (42,'Check POP3 server','Check POP3 port.',10,9,0,0,300,110,'','','','',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (43,'NIC #7 outOctects','Get outcoming octects from NIC #7',10,16,0,0,180,0,'','','public','.1.3.6.1.2.1.2.2.1.16.7',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (49,'OS CPU Load (5 min)','CPU load on a 5 min average interval. UCD-SNMP Mib (Usually for all Linux and some UNIX)',13,15,0,0,300,0,'','','public','UCD-SNMP-MIB::laLoad.2',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (44,'NIC #7 inOctects','Get incoming octects from NIC #7',10,16,0,0,180,0,'','','public','.1.3.6.1.2.1.2.2.1.10.7',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (45,'NIC #4 Status','Get status of NIC #4',10,18,0,0,180,0,'','','public','.1.3.6.1.2.1.2.2.1.8.4',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (46,'NIC #5 Status','Get status of NIC #5',10,18,0,0,180,0,'','','public','.1.3.6.1.2.1.2.2.1.8.5',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (47,'NIC #6 Status','Get status of NIC #6',10,18,0,0,180,0,'','','public','.1.3.6.1.2.1.2.2.1.8.6',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (48,'NIC #7 Status','Get status of NIC #7',10,18,0,0,180,0,'','','public','.1.3.6.1.2.1.2.2.1.8.7',2,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (49,'OS CPU Load (5 min)','CPU load on a 5 min average interval. UCD-SNMP Mib (Usually for all Linux and some UNIX)',13,15,0,0,180,0,'','','public','UCD-SNMP-MIB::laLoad.2',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (50,'System Description','Get system description (all mibs).',1,17,0,0,9000,0,'','','public','SNMPv2-MIB::sysDescr.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (50,'System Description','Get system description (all mibs).',1,17,0,0,9000,0,'','','public','SNMPv2-MIB::sysDescr.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (51,'OS Raw Interrupts','Get system raw interrupts from SO',13,16,0,0,180,0,'','','public','UCD-SNMP-MIB::ssRawInterrupts.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (51,'OS Raw Interrupts','Get system raw interrupts from SO',13,16,0,0,300,0,'','','public','UCD-SNMP-MIB::ssRawInterrupts.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (52,'OS IO Signals sent','IO Signals sent by Kernel',13,16,0,0,180,0,'','','public','UCD-SNMP-MIB::ssIOSent.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (52,'OS IO Signals sent','IO Signals sent by Kernel',13,16,0,0,300,0,'','','public','UCD-SNMP-MIB::ssIOSent.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (53,'System Uptime','Sistem uptime in timeticks',1,15,0,0,180,0,'','','public','HOST-RESOURCES-MIB::hrSystemUptime.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (53,'System Uptime','Sistem uptime in timeticks',1,15,0,0,3600,0,'','','public','.1.3.6.1.2.1.1.3.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.000000115740741,'days','basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (176,'Catalyst Free Mem','Taken from ftp://ftp.cisco.com/pub/mibs/oid/OLD-CISCO-MEMORY-MIB.oid',2,15,0,0,180,0,'','','public','1.3.6.1.4.1.9.2.1.8',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (176,'Catalyst Free Mem','Taken from ftp://ftp.cisco.com/pub/mibs/oid/OLD-CISCO-MEMORY-MIB.oid',2,15,0,0,300,0,'','','public','1.3.6.1.4.1.9.2.1.8',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (200,'CPU load','CPU0 load average',16,1,100,0,300,1,'','','','SELECT LoadPercentage from Win32_Processor WHERE DeviceID = "CPU0"',1,6,0,'Administrator','','',0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (200,'CPU load','CPU0 load average',16,1,100,0,300,1,'','','','SELECT LoadPercentage from Win32_Processor WHERE DeviceID = "CPU0"',1,6,0,'Administrator','','',0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (201,'Free RAM','Available RAM memory in bytes',16,1,0,0,300,0,'','','','SELECT AvailableBytes from Win32_PerfRawData_PerfOS_Memory',1,6,0,'Administrator',NULL,NULL,10,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (201,'Free RAM','Available RAM memory in bytes',16,1,0,0,300,0,'','','','SELECT AvailableBytes from Win32_PerfRawData_PerfOS_Memory',1,6,0,'Administrator',NULL,NULL,10,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (202,'Windows version','Operating system version',16,3,0,0,300,1,'','','','SELECT Caption FROM Win32_OperatingSystem',1,6,0,'Administrator',NULL,NULL,10,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (202,'Windows version','Operating system version',16,3,0,0,300,1,'','','','SELECT Caption FROM Win32_OperatingSystem',1,6,0,'Administrator',NULL,NULL,10,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
|
||||||
|
@ -907,6 +900,7 @@ INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `t
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (782,'Check_MSSQLServer_Port','Check port MSSQL Server',27,9,0,0,300,1433,'','','public','',2,2,0,'','','',0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (782,'Check_MSSQLServer_Port','Check port MSSQL Server',27,9,0,0,300,1433,'','','public','',2,2,0,'','','',0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (783,'Check Informix Port','',19,9,0,0,300,1526,'','','public','',2,2,0,'','','',0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (783,'Check Informix Port','',19,9,0,0,300,1526,'','','public','',2,2,0,'','','',0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.0000000000000,'basic','','','','','','');
|
||||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (784,'Check port DB2','',49,9,0,0,300,50000,'','','public','',2,2,0,'','','',0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.0000000000000,'basic','','','','','','');
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (784,'Check port DB2','',49,9,0,0,300,50000,'','','public','',2,2,0,'','','',0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.0000000000000,'basic','','','','','','');
|
||||||
|
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `module_macros`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`) VALUES (785,'Packet Loss','Measure packet loss in the network, using a flood ping (50 ping in 8 secons) and counting back missing packets. It should be zero on most cases. ',10,1,0,0,300,0,'','','','',2,4,9,'','','',0,0,1,10.00,0.00,'',30.00,0.00,'',0,'','','',0,0,0.00000,'%','nowizard','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Test time\",\"help\":\"\",\"value\":\"8\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Target IP\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"}}','You should check manually the packet loss of the network with a flood ping on targeted host (ping -c 100 -f xxxx). Aditionally, and due the major packet loss, probably you can see a simple ping failing here. Check your network equipment.','You should check manually the packet loss of the network with a flood ping on targeted host (ping -c 100 -f xxxx)','',0,0,0,'','{\"going_unknown\":0}','',0,0,0,0);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -960,15 +954,26 @@ INSERT INTO `tnetwork_component_group` VALUES (49,'DB2',15);
|
||||||
|
|
||||||
-- Network profile
|
-- Network profile
|
||||||
|
|
||||||
INSERT INTO `tnetwork_profile` (`id_np`, `name`, `description`) VALUES (2,'Basic Monitoring','Only ICMP check');
|
INSERT INTO `tnetwork_profile` (`id_np`, `name`, `description`) VALUES (2,'Basic Monitoring','Only checks for availability and latency of targeted hosts.');
|
||||||
INSERT INTO `tnetwork_profile` (`id_np`, `name`, `description`) VALUES (3,'Basic DMZ Server monitoring','This group of network checks, checks for default services located on DMZ servers...');
|
INSERT INTO `tnetwork_profile` (`id_np`, `name`, `description`) VALUES (3,'Basic DMZ Server monitoring','This group of network checks, checks for default services located on DMZ servers...');
|
||||||
|
INSERT INTO `tnetwork_profile` (`id_np`, `name`, `description`) VALUES (7,'Linux Server with SNMP','Group of "basic" modules for SNMP monitoring of Linux remote devices. This includes basic conectivity checks and a full range of System');
|
||||||
|
|
||||||
INSERT INTO `tnetwork_profile` (`id_np`, `name`, `description`) VALUES
|
-- Network profile components
|
||||||
(7,'Linux Server with SNMP','Group of "basic" modules for SNMP monitoring of Linux remote devices. This includes basic conectivity checks and a full range of System');
|
|
||||||
|
|
||||||
INSERT INTO `tnetwork_profile_component` VALUES (34,2),(34,3),(37,3),(39,3),(38,3),(540,7),(533,7),(534,7),(537,7),(538,7),(536,7),(535,7),(539,7),(1,7),(4,7),(34,7),(30,7),(27,7),(24,7);
|
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `tnetwork_profile_component` (`id_nc`, `id_np`) VALUES (34,2);
|
||||||
|
INSERT INTO `tnetwork_profile_component` (`id_nc`, `id_np`) VALUES (34,3);
|
||||||
|
INSERT INTO `tnetwork_profile_component` (`id_nc`, `id_np`) VALUES (37,3);
|
||||||
|
INSERT INTO `tnetwork_profile_component` (`id_nc`, `id_np`) VALUES (39,3);
|
||||||
|
INSERT INTO `tnetwork_profile_component` (`id_nc`, `id_np`) VALUES (38,3);
|
||||||
|
INSERT INTO `tnetwork_profile_component` (`id_nc`, `id_np`) VALUES (4,7);
|
||||||
|
INSERT INTO `tnetwork_profile_component` (`id_nc`, `id_np`) VALUES (34,7);
|
||||||
|
INSERT INTO `tnetwork_profile_component` (`id_nc`, `id_np`) VALUES (30,7);
|
||||||
|
INSERT INTO `tnetwork_profile_component` (`id_nc`, `id_np`) VALUES (27,7);
|
||||||
|
INSERT INTO `tnetwork_profile_component` (`id_nc`, `id_np`) VALUES (24,7);
|
||||||
|
INSERT INTO `tnetwork_profile_component` (`id_nc`, `id_np`) VALUES (49,7);
|
||||||
|
INSERT INTO `tnetwork_profile_component` (`id_nc`, `id_np`) VALUES (51,7);
|
||||||
|
INSERT INTO `tnetwork_profile_component` (`id_nc`, `id_np`) VALUES (36,2);
|
||||||
|
INSERT INTO `tnetwork_profile_component` (`id_nc`, `id_np`) VALUES (36,3);
|
||||||
|
|
||||||
-- GIS Data
|
-- GIS Data
|
||||||
INSERT INTO `tgis_map` VALUES (1,'Sample',-3.708187,40.42056,0,16,'',-3.708187,40.42056,0,0,1);
|
INSERT INTO `tgis_map` VALUES (1,'Sample',-3.708187,40.42056,0,16,'',-3.708187,40.42056,0,0,1);
|
||||||
|
@ -1016,6 +1021,8 @@ INSERT INTO `tplugin` (`id`, `name`, `description`, `max_timeout`, `execute`, `p
|
||||||
|
|
||||||
INSERT INTO `tplugin` (`id`, `name`, `description`, `max_timeout`, `execute`, `plugin_type`, `macros`, `parameters`) VALUES (8,'SNMP remote','Plugin that gets remotely, using SNMP, values such as the percentage of disk or memory used, the status of a process or the CPU load',0,'perl /usr/share/pandora_server/util/plugin/snmp_remote.pl',0,'{"1":{"macro":"_field1_","desc":"Target IP","help":"","value":"_address_"},"2":{"macro":"_field2_","desc":"Community","help":"","value":"public"},"3":{"macro":"_field3_","desc":"Plug-in Parameters","help":"Memory use (%)
-m memuse

Disk use (%)
-m diskuse -d [disk name]

Status of a process (0/1)
-m process -p [process_name] 

Average of CPUs Load (%)
-m cpuload","value":""}}', '-H _field1_ -c _field2_ _field3_');
|
INSERT INTO `tplugin` (`id`, `name`, `description`, `max_timeout`, `execute`, `plugin_type`, `macros`, `parameters`) VALUES (8,'SNMP remote','Plugin that gets remotely, using SNMP, values such as the percentage of disk or memory used, the status of a process or the CPU load',0,'perl /usr/share/pandora_server/util/plugin/snmp_remote.pl',0,'{"1":{"macro":"_field1_","desc":"Target IP","help":"","value":"_address_"},"2":{"macro":"_field2_","desc":"Community","help":"","value":"public"},"3":{"macro":"_field3_","desc":"Plug-in Parameters","help":"Memory use (%)
-m memuse

Disk use (%)
-m diskuse -d [disk name]

Status of a process (0/1)
-m process -p [process_name] 

Average of CPUs Load (%)
-m cpuload","value":""}}', '-H _field1_ -c _field2_ _field3_');
|
||||||
|
|
||||||
|
INSERT INTO `tplugin` (`id`, `name`, `description`, `max_timeout`, `max_retries`, `execute`, `net_dst_opt`, `net_port_opt`, `user_opt`, `pass_opt`, `plugin_type`, `macros`, `parameters`) VALUES (9,'Packet Loss','Checks for dropped packages after X seconds of testing. It returns % of dropped packets. It uses ping flood mode to launch 50 consecutive pings to a remote destination. On local, stable networks, value should be 0.
',30,0,'/usr/share/pandora_server/util/plugin/packet_loss.sh','','','','',0,'{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Test time\",\"help\":\"\",\"value\":\"8\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Target IP\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"}}','_field1_ _field2_');
|
||||||
|
|
||||||
INSERT INTO `tagent_custom_fields` VALUES (1,'Serial Number',0),(2,'Department',0),(3,'Additional ID',0);
|
INSERT INTO `tagent_custom_fields` VALUES (1,'Serial Number',0),(2,'Department',0),(3,'Additional ID',0);
|
||||||
|
|
||||||
INSERT INTO `ttag` VALUES (1,'network','Network equipment','http://artica.es','',''),(2,'critical','Critical modules','','',''),(3,'dmz','DMZ Network Zone','','',''),(4,'performance','Performance anda capacity modules','','',''),(5,'configuration','','','','');
|
INSERT INTO `ttag` VALUES (1,'network','Network equipment','http://artica.es','',''),(2,'critical','Critical modules','','',''),(3,'dmz','DMZ Network Zone','','',''),(4,'performance','Performance anda capacity modules','','',''),(5,'configuration','','','','');
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package: pandorafms-server
|
package: pandorafms-server
|
||||||
Version: 5.1-140916
|
Version: 5.1-140922
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="5.1-140916"
|
pandora_version="5.1-140922"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
|
|
@ -308,9 +308,7 @@ sub pandora_server_tasks ($) {
|
||||||
|
|
||||||
# Realtime stats (Only master server!) - ( VERY HEAVY !)
|
# Realtime stats (Only master server!) - ( VERY HEAVY !)
|
||||||
# Realtimestats == 1, generated by WEB Console, not by server!
|
# Realtimestats == 1, generated by WEB Console, not by server!
|
||||||
if ($pa_config->{"pandora_master"} == 1
|
if (defined($pa_config->{"realtimestats"}) && $pa_config->{"realtimestats"} == 0){
|
||||||
&& defined($pa_config->{"realtimestats"})
|
|
||||||
&& $pa_config->{"realtimestats"} == 0){
|
|
||||||
|
|
||||||
# Check if I need to refresh stats
|
# Check if I need to refresh stats
|
||||||
my $last_execution_stats = get_db_value ($dbh, "SELECT MAX(utimestamp) FROM tgroup_stat");
|
my $last_execution_stats = get_db_value ($dbh, "SELECT MAX(utimestamp) FROM tgroup_stat");
|
||||||
|
@ -320,12 +318,6 @@ sub pandora_server_tasks ($) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Pandora self monitoring
|
|
||||||
if (defined($pa_config->{"self_monitoring"})
|
|
||||||
&& $pa_config->{"self_monitoring"} == 1){
|
|
||||||
pandora_self_monitoring ($pa_config, $dbh);
|
|
||||||
}
|
|
||||||
|
|
||||||
# Event auto-expiry
|
# Event auto-expiry
|
||||||
my $expiry_time = $pa_config->{"event_expiry_time"};
|
my $expiry_time = $pa_config->{"event_expiry_time"};
|
||||||
my $expiry_window = $pa_config->{"event_expiry_window"};
|
my $expiry_window = $pa_config->{"event_expiry_window"};
|
||||||
|
@ -337,6 +329,15 @@ sub pandora_server_tasks ($) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Pandora self monitoring
|
||||||
|
if (($counter % 180) == 0) {
|
||||||
|
if (defined($pa_config->{"self_monitoring"})
|
||||||
|
&& $pa_config->{"self_monitoring"} == 1){
|
||||||
|
pandora_self_monitoring ($pa_config, $dbh);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Avoid counter overflow
|
# Avoid counter overflow
|
||||||
if ($counter > 10000){
|
if ($counter > 10000){
|
||||||
$counter = 0;
|
$counter = 0;
|
||||||
|
@ -514,8 +515,8 @@ sub main() {
|
||||||
# Start the servers
|
# Start the servers
|
||||||
pandora_startup ();
|
pandora_startup ();
|
||||||
|
|
||||||
# Start thread to execute server tasks
|
# Start thread to execute server tasks on the master server
|
||||||
threads->create('pandora_server_tasks', (\%Config))->detach();
|
threads->create('pandora_server_tasks', (\%Config))->detach() if ($Config{"master"} == 1);
|
||||||
|
|
||||||
# Generate 'going up' events
|
# Generate 'going up' events
|
||||||
foreach my $server (@Servers) {
|
foreach my $server (@Servers) {
|
||||||
|
|
|
@ -274,10 +274,13 @@ braa_retries 3
|
||||||
autocreate 1
|
autocreate 1
|
||||||
|
|
||||||
# max_log_size: Specify max size of Pandora FMS server log file (1MB by default). If
|
# max_log_size: Specify max size of Pandora FMS server log file (1MB by default). If
|
||||||
# log file grows above this limit, is renamed to "pandora_server.log.old".
|
# log file grows above this limit, is renamed to "pandora_server.log.0".
|
||||||
|
|
||||||
max_log_size 1048576
|
max_log_size 1048576
|
||||||
|
|
||||||
|
# max_log_generation: Specify max generation count (between 1 and 9) of Pandora FMS server log files.
|
||||||
|
max_log_generation 1
|
||||||
|
|
||||||
# max_queue_files (500 by default)
|
# max_queue_files (500 by default)
|
||||||
# When server have more than max_queue_files in incoming directory, skips the read
|
# When server have more than max_queue_files in incoming directory, skips the read
|
||||||
# the directory to avoid filesystem overhead.
|
# the directory to avoid filesystem overhead.
|
||||||
|
|
|
@ -43,7 +43,7 @@ our @EXPORT = qw(
|
||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "5.1";
|
my $pandora_version = "5.1";
|
||||||
my $pandora_build = "140916";
|
my $pandora_build = "140922";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
|
@ -286,6 +286,9 @@ sub pandora_load_config {
|
||||||
# max log size (bytes)
|
# max log size (bytes)
|
||||||
$pa_config->{'max_log_size'} = 1048576;
|
$pa_config->{'max_log_size'} = 1048576;
|
||||||
|
|
||||||
|
# max log generation
|
||||||
|
$pa_config->{'max_log_generation'} = 1;
|
||||||
|
|
||||||
# Ignore the timestamp in the XML and use the file timestamp instead
|
# Ignore the timestamp in the XML and use the file timestamp instead
|
||||||
$pa_config->{'use_xml_timestamp'} = 0;
|
$pa_config->{'use_xml_timestamp'} = 0;
|
||||||
|
|
||||||
|
@ -639,6 +642,9 @@ sub pandora_load_config {
|
||||||
elsif ($parametro =~ m/^max_log_size\s([0-9]*)/i) {
|
elsif ($parametro =~ m/^max_log_size\s([0-9]*)/i) {
|
||||||
$pa_config->{'max_log_size'}= clean_blank($1);
|
$pa_config->{'max_log_size'}= clean_blank($1);
|
||||||
}
|
}
|
||||||
|
elsif ($parametro =~ m/^max_log_generation\s([1-9])/i) {
|
||||||
|
$pa_config->{'max_log_generation'}= clean_blank($1);
|
||||||
|
}
|
||||||
elsif ($parametro =~ m/^wmi_threads\s([0-9]*)/i) {
|
elsif ($parametro =~ m/^wmi_threads\s([0-9]*)/i) {
|
||||||
$pa_config->{'wmi_threads'}= clean_blank($1);
|
$pa_config->{'wmi_threads'}= clean_blank($1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -466,7 +466,12 @@ sub logger ($$;$) {
|
||||||
closelog();
|
closelog();
|
||||||
} else {
|
} else {
|
||||||
# Log rotation
|
# Log rotation
|
||||||
rename ($file, $file.'.old') if (-e $file && (stat($file))[7] > $pa_config->{'max_log_size'});
|
if (-e $file && (stat($file))[7] > $pa_config->{'max_log_size'}) {
|
||||||
|
foreach my $i (reverse 1..$pa_config->{'max_log_generation'}) {
|
||||||
|
rename ($file . "." . ($i - 1), $file . "." . $i);
|
||||||
|
}
|
||||||
|
rename ($file, "$file.0");
|
||||||
|
}
|
||||||
|
|
||||||
open (FILE, ">> $file") or die "[FATAL] Could not open logfile '$file'";
|
open (FILE, ">> $file") or die "[FATAL] Could not open logfile '$file'";
|
||||||
print FILE strftime ("%Y-%m-%d %H:%M:%S", localtime()) . " " . $pa_config->{'servername'} . $pa_config->{'servermode'} . " [V". $level ."] " . $message . "\n";
|
print FILE strftime ("%Y-%m-%d %H:%M:%S", localtime()) . " " . $pa_config->{'servername'} . $pa_config->{'servermode'} . " [V". $level ."] " . $message . "\n";
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 5.1
|
%define version 5.1
|
||||||
%define release 140916
|
%define release 140922
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 5.1
|
%define version 5.1
|
||||||
%define release 140916
|
%define release 140922
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
|
|
||||||
|
|
||||||
MODE=$1
|
MODE=$1
|
||||||
|
if [ $# -gt 1 ]; then
|
||||||
shift
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
# Defaults
|
# Defaults
|
||||||
PREFIX=/usr
|
PREFIX=/usr
|
||||||
|
@ -397,7 +399,7 @@ perl-TimeDate perl-XML-Simple perl-XML-Twig perl-libwww-perl mysql-client"
|
||||||
uninstall () {
|
uninstall () {
|
||||||
set_global_vars
|
set_global_vars
|
||||||
|
|
||||||
if [ "$LINUX" != NO ] || [ "$DISTRO" != "FreeBSD" ] || [ "$DISTRO" != "NetBSD" ]
|
if [ "$LINUX" != "YES" ] && [ "$DISTRO" != "FreeBSD" ] && [ "$DISTRO" != "NetBSD" ]
|
||||||
then
|
then
|
||||||
echo "This is not a Linux-based distro. Uninstaller is currently not working for your OS"
|
echo "This is not a Linux-based distro. Uninstaller is currently not working for your OS"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -33,7 +33,7 @@ use PandoraFMS::Tools;
|
||||||
use PandoraFMS::DB;
|
use PandoraFMS::DB;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "5.1 PS140916";
|
my $version = "5.1 PS140922";
|
||||||
|
|
||||||
# Pandora server configuration
|
# Pandora server configuration
|
||||||
my %conf;
|
my %conf;
|
||||||
|
@ -583,6 +583,7 @@ sub pandora_load_config ($) {
|
||||||
$conf->{'_netflow_path'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'netflow_path'");
|
$conf->{'_netflow_path'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'netflow_path'");
|
||||||
$conf->{'_log_dir'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'log_dir'");
|
$conf->{'_log_dir'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'log_dir'");
|
||||||
$conf->{'_log_max_lifetime'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'log_max_lifetime'");
|
$conf->{'_log_max_lifetime'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'log_max_lifetime'");
|
||||||
|
$conf->{'_delete_notinit'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'delete_notinit'");
|
||||||
|
|
||||||
db_disconnect ($dbh);
|
db_disconnect ($dbh);
|
||||||
|
|
||||||
|
@ -632,14 +633,14 @@ sub pandora_checkdb_integrity {
|
||||||
# Check database consistency.
|
# Check database consistency.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
sub pandora_checkdb_consistency {
|
sub pandora_checkdb_consistency {
|
||||||
my $dbh = shift;
|
my ($conf, $dbh) = @_;
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
# 1. Check for modules that do not have tagente_estado but have
|
# 1. Check for modules that do not have tagente_estado but have
|
||||||
# tagente_module
|
# tagente_module
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
if (defined($conf->{'_delete_notinit'}) && $conf->{'_delete_notinit'} == 1) {
|
||||||
log_message ('CHECKDB', "Deleting non-init data.");
|
log_message ('CHECKDB', "Deleting not-init data.");
|
||||||
my @modules = get_db_rows ($dbh,
|
my @modules = get_db_rows ($dbh,
|
||||||
'SELECT id_agente_modulo, id_agente
|
'SELECT id_agente_modulo, id_agente
|
||||||
FROM tagente_estado
|
FROM tagente_estado
|
||||||
|
@ -688,6 +689,9 @@ sub pandora_checkdb_consistency {
|
||||||
'DELETE FROM talert_template_modules
|
'DELETE FROM talert_template_modules
|
||||||
WHERE id_agent_module = ?', $id_agente_modulo);
|
WHERE id_agent_module = ?', $id_agente_modulo);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
log_message ('CHECKDB', "Ignoring not-init data.");
|
||||||
|
}
|
||||||
|
|
||||||
log_message ('CHECKDB',
|
log_message ('CHECKDB',
|
||||||
"Deleting unknown data (More than " . $conf{'_days_delete_unknown'} . " days).");
|
"Deleting unknown data (More than " . $conf{'_days_delete_unknown'} . " days).");
|
||||||
|
@ -730,7 +734,7 @@ sub pandora_checkdb_consistency {
|
||||||
log_message ('CHECKDB',
|
log_message ('CHECKDB',
|
||||||
"Checking database consistency (Missing status).");
|
"Checking database consistency (Missing status).");
|
||||||
|
|
||||||
@modules = get_db_rows ($dbh, 'SELECT * FROM tagente_modulo');
|
my @modules = get_db_rows ($dbh, 'SELECT * FROM tagente_modulo');
|
||||||
foreach my $module (@modules) {
|
foreach my $module (@modules) {
|
||||||
my $id_agente_modulo = $module->{'id_agente_modulo'};
|
my $id_agente_modulo = $module->{'id_agente_modulo'};
|
||||||
my $id_agente = $module->{'id_agente'};
|
my $id_agente = $module->{'id_agente'};
|
||||||
|
@ -852,7 +856,7 @@ sub pandoradb_main ($$$) {
|
||||||
pandora_purgedb ($conf, $dbh);
|
pandora_purgedb ($conf, $dbh);
|
||||||
|
|
||||||
# Consistency check
|
# Consistency check
|
||||||
pandora_checkdb_consistency ($dbh);
|
pandora_checkdb_consistency ($conf, $dbh);
|
||||||
|
|
||||||
# Maintain Referential integrity and other stuff
|
# Maintain Referential integrity and other stuff
|
||||||
pandora_checkdb_integrity ($dbh);
|
pandora_checkdb_integrity ($dbh);
|
||||||
|
|
|
@ -34,7 +34,7 @@ use Encode::Locale;
|
||||||
Encode::Locale::decode_argv;
|
Encode::Locale::decode_argv;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "5.1 PS140916";
|
my $version = "5.1 PS140922";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# (c) 2014 Sancho Lerena
|
||||||
|
# (c) Artica Soluciones Tecnologicas
|
||||||
|
|
||||||
|
# Packet loss ICMP measurement remote plugin
|
||||||
|
|
||||||
|
# Remote plugin to measure remote packet loss using ping
|
||||||
|
# It requires root access, because use flood mode to send many pings.
|
||||||
|
# It's limited to 50 pings and 10 seconds, so it should not be nasty
|
||||||
|
# for your network :-)
|
||||||
|
|
||||||
|
if [ $# -eq 0 ] || [ $# -eq 1 ]
|
||||||
|
then
|
||||||
|
echo "Syntax: <max_timeout_insecs> <target_ip>"
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
TIMEOUT=$1
|
||||||
|
DESTINATION=$2
|
||||||
|
|
||||||
|
echo `ping -W $1 -q -f -c 50 $2 | grep -o "[0-9\.]*. packet loss" | grep -o "[0-9.]*"`
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ if ($OSNAME eq "freebsd") {
|
||||||
'pandora_path' => '/usr/local/etc/pandora/pandora_server.conf',
|
'pandora_path' => '/usr/local/etc/pandora/pandora_server.conf',
|
||||||
'icmp_checks' => 1,
|
'icmp_checks' => 1,
|
||||||
'networktimeout' => 2,
|
'networktimeout' => 2,
|
||||||
'nmap_timing_template' => 2,
|
'recon_timing_template' => 3,
|
||||||
'PID' => '',
|
'PID' => '',
|
||||||
'quiet' => 1,
|
'quiet' => 1,
|
||||||
);
|
);
|
||||||
|
@ -47,7 +47,7 @@ if ($OSNAME eq "freebsd") {
|
||||||
'pandora_path' => '/etc/pandora/pandora_server.conf',
|
'pandora_path' => '/etc/pandora/pandora_server.conf',
|
||||||
'icmp_checks' => 1,
|
'icmp_checks' => 1,
|
||||||
'networktimeout' => 2,
|
'networktimeout' => 2,
|
||||||
'nmap_timing_template' => 2,
|
'recon_timing_template' => 3,
|
||||||
'PID' => '',
|
'PID' => '',
|
||||||
'quiet' => 1,
|
'quiet' => 1,
|
||||||
);
|
);
|
||||||
|
@ -101,7 +101,9 @@ my $DOT1DTPFDBADDRESS = ".1.3.6.1.2.1.17.4.3.1.1";
|
||||||
my $DOT1DTPFDBPORT = ".1.3.6.1.2.1.17.4.3.1.2";
|
my $DOT1DTPFDBPORT = ".1.3.6.1.2.1.17.4.3.1.2";
|
||||||
my $IFDESC = ".1.3.6.1.2.1.2.2.1.2";
|
my $IFDESC = ".1.3.6.1.2.1.2.2.1.2";
|
||||||
my $IFINDEX = ".1.3.6.1.2.1.2.2.1.1";
|
my $IFINDEX = ".1.3.6.1.2.1.2.2.1.1";
|
||||||
|
my $IFINOCTECTS = ".1.3.6.1.2.1.2.2.1.10";
|
||||||
my $IFOPERSTATUS = ".1.3.6.1.2.1.2.2.1.8";
|
my $IFOPERSTATUS = ".1.3.6.1.2.1.2.2.1.8";
|
||||||
|
my $IFOUTOCTECTS = ".1.3.6.1.2.1.2.2.1.16";
|
||||||
my $IPENTADDR = ".1.3.6.1.2.1.4.20.1.1";
|
my $IPENTADDR = ".1.3.6.1.2.1.4.20.1.1";
|
||||||
my $IFNAME = ".1.3.6.1.2.1.31.1.1.1.1";
|
my $IFNAME = ".1.3.6.1.2.1.31.1.1.1.1";
|
||||||
my $IPNETTOMEDIAPHYSADDRESS = ".1.3.6.1.2.1.4.22.1.2";
|
my $IPNETTOMEDIAPHYSADDRESS = ".1.3.6.1.2.1.4.22.1.2";
|
||||||
|
@ -731,10 +733,10 @@ sub create_pandora_agent($) {
|
||||||
$if_name = safe_input($if_name);
|
$if_name = safe_input($if_name);
|
||||||
$if_desc = safe_input($if_desc);
|
$if_desc = safe_input($if_desc);
|
||||||
|
|
||||||
# Create the module.
|
# Interface status module.
|
||||||
my %module = ('id_tipo_modulo' => 18,
|
my %module = ('id_tipo_modulo' => 18,
|
||||||
'id_modulo' => 2,
|
'id_modulo' => 2,
|
||||||
'nombre' => "if_${if_name}",
|
'nombre' => "ifOperStatus_${if_name}",
|
||||||
'descripcion' => $if_desc,
|
'descripcion' => $if_desc,
|
||||||
'id_agente' => $agent_id,
|
'id_agente' => $agent_id,
|
||||||
'ip_target' => $device,
|
'ip_target' => $device,
|
||||||
|
@ -742,6 +744,30 @@ sub create_pandora_agent($) {
|
||||||
'snmp_community' => $COMMUNITIES{$device},
|
'snmp_community' => $COMMUNITIES{$device},
|
||||||
'snmp_oid' => "$IFOPERSTATUS.$if_index");
|
'snmp_oid' => "$IFOPERSTATUS.$if_index");
|
||||||
pandora_create_module_from_hash (\%CONF, \%module, $DBH);
|
pandora_create_module_from_hash (\%CONF, \%module, $DBH);
|
||||||
|
|
||||||
|
# Incoming traffic module.
|
||||||
|
%module = ('id_tipo_modulo' => 16,
|
||||||
|
'id_modulo' => 2,
|
||||||
|
'nombre' => "ifInOctets_${if_name}",
|
||||||
|
'descripcion' => 'The total number of octets received on the interface, including framing characters.',
|
||||||
|
'id_agente' => $agent_id,
|
||||||
|
'ip_target' => $device,
|
||||||
|
'tcp_send' => 1,
|
||||||
|
'snmp_community' => $COMMUNITIES{$device},
|
||||||
|
'snmp_oid' => "$IFINOCTECTS.$if_index");
|
||||||
|
pandora_create_module_from_hash (\%CONF, \%module, $DBH);
|
||||||
|
|
||||||
|
# Outgoing traffic module.
|
||||||
|
%module = ('id_tipo_modulo' => 16,
|
||||||
|
'id_modulo' => 2,
|
||||||
|
'nombre' => "ifOutOctets_${if_name}",
|
||||||
|
'descripcion' => 'The total number of octets received on the interface, including framing characters.',
|
||||||
|
'id_agente' => $agent_id,
|
||||||
|
'ip_target' => $device,
|
||||||
|
'tcp_send' => 1,
|
||||||
|
'snmp_community' => $COMMUNITIES{$device},
|
||||||
|
'snmp_oid' => "$IFOUTOCTECTS.$if_index");
|
||||||
|
pandora_create_module_from_hash (\%CONF, \%module, $DBH);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $agent_id;
|
return $agent_id;
|
||||||
|
@ -864,7 +890,7 @@ sub traceroute_connectivity($) {
|
||||||
|
|
||||||
# Perform a traceroute.
|
# Perform a traceroute.
|
||||||
my $timeout = $CONF{'networktimeout'}*1000;
|
my $timeout = $CONF{'networktimeout'}*1000;
|
||||||
my $nmap_args = '-nsP -PE --traceroute --max-retries '.$CONF{'icmp_checks'}.' --host-timeout '.$timeout.' -T'.$CONF{'nmap_timing_template'};
|
my $nmap_args = '-nsP -PE --traceroute --max-retries '.$CONF{'icmp_checks'}.' --host-timeout '.$timeout.' -T'.$CONF{'recon_timing_template'};
|
||||||
my $np = new PandoraFMS::NmapParser;
|
my $np = new PandoraFMS::NmapParser;
|
||||||
eval {
|
eval {
|
||||||
$np->parsescan($CONF{'nmap'}, $nmap_args, ($host));
|
$np->parsescan($CONF{'nmap'}, $nmap_args, ($host));
|
||||||
|
@ -935,7 +961,7 @@ update_recon_task($DBH, $TASK_ID, 1);
|
||||||
# Populate ARP caches.
|
# Populate ARP caches.
|
||||||
message("Populating ARP caches...");
|
message("Populating ARP caches...");
|
||||||
my $timeout = $CONF{'networktimeout'} * 1000; # Convert the timeout from s to ms.
|
my $timeout = $CONF{'networktimeout'} * 1000; # Convert the timeout from s to ms.
|
||||||
my $nmap_args = '-nsP --send-ip --max-retries '.$CONF{'icmp_checks'}.' --host-timeout '.$timeout.' -T'.$CONF{'nmap_timing_template'};
|
my $nmap_args = '-nsP --send-ip --max-retries '.$CONF{'icmp_checks'}.' --host-timeout '.$timeout.' -T'.$CONF{'recon_timing_template'};
|
||||||
my $np = new PandoraFMS::NmapParser;
|
my $np = new PandoraFMS::NmapParser;
|
||||||
if ($#SUBNETS >= 0) {
|
if ($#SUBNETS >= 0) {
|
||||||
$np->parsescan($CONF{'nmap'}, $nmap_args, @SUBNETS);
|
$np->parsescan($CONF{'nmap'}, $nmap_args, @SUBNETS);
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# (c) Sancho Lerena 2014
|
||||||
|
# This is an script to generate random SNMP traps. Should be used to
|
||||||
|
# test SNMP trap processing performance on Pandora FMS Server.
|
||||||
|
# Licensed under BSD licence, do with it whatever you want :-)
|
||||||
|
|
||||||
|
TRAPS=$1
|
||||||
|
TARGET=$2
|
||||||
|
OIDBASE="1.3.6.1.4.1"
|
||||||
|
SOURCE=$3
|
||||||
|
|
||||||
|
if [ $# -lt 2 ]
|
||||||
|
then
|
||||||
|
echo " "
|
||||||
|
echo "Syntax error: "
|
||||||
|
echo "SNMP Trap generator <# traps> <target ip> [<source_ip>]"
|
||||||
|
echo "If <source_ip> is not provided, it will forge fake IP's"
|
||||||
|
echo " "
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
COUNTER=0
|
||||||
|
|
||||||
|
while [ $COUNTER -lt $TRAPS ]
|
||||||
|
do
|
||||||
|
|
||||||
|
RAND=`date +%N`
|
||||||
|
SMALLRAND=`date +%N|cut -c 2-5`
|
||||||
|
FAKEOID=""
|
||||||
|
if [ "$SOURCE" == "" ]
|
||||||
|
then
|
||||||
|
FAKEIP=`date +%N | cut -c 2-3`.`date +%N | cut -c 2-3`.`date +%N | cut -c 2-3`.`date +%N | cut -c 2-3`
|
||||||
|
else
|
||||||
|
FAKEIP=$SOURCE
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create a fake OID with random data using Enterprise base OID
|
||||||
|
for (( i=0; i<${#RAND}; i++ )); do
|
||||||
|
FAKEOID=${RAND:$i:1}.$FAKEOID
|
||||||
|
done
|
||||||
|
|
||||||
|
FAKEOID=$OIDBASE.$FAKEOID"1"
|
||||||
|
|
||||||
|
# Send the fake TRAP
|
||||||
|
snmptrap -v 1 -c public $TARGET $FAKEOID $FAKEIP 6 $SMALLRAND $RAND $FAKEOID".$COUNTER" i $SMALLRAND
|
||||||
|
echo "snmptrap -v 1 -c public $TARGET $FAKEOID $FAKEIP 6 $SMALLRAND $RAND $FAKEOID.$COUNTER i $SMALLRAND"
|
||||||
|
|
||||||
|
COUNTER=`expr $COUNTER + 1`
|
||||||
|
|
||||||
|
done
|
Loading…
Reference in New Issue