Merge branch 'develop' of https://github.com/pandorafms/pandorafms into develop
This commit is contained in:
commit
0e0c8e4480
|
@ -40,15 +40,15 @@ echo $CURRENT > $DIRETMP
|
|||
|
||||
echo "<module>
|
||||
<name><![CDATA[FS_$DIRE]]></name>
|
||||
<description>Number of files in directory</description>
|
||||
<type>generic_proc</type>
|
||||
<data>$DISPARA</data>
|
||||
<description><![CDATA[Number of files in directory]]></description>
|
||||
<type><![CDATA[generic_proc]]></type>
|
||||
<data><![CDATA[$DISPARA]]></data>
|
||||
</module>
|
||||
|
||||
<module>
|
||||
<name><![CDATA[NumFiles_FS_$DIRE]]></name>
|
||||
<description>Number of files</description>
|
||||
<type>generic_data</type>
|
||||
<data>$CURRENT</data>
|
||||
<description><![CDATA[Number of files]]></description>
|
||||
<type><![CDATA[generic_data]]></type>
|
||||
<data><![CDATA[$CURRENT]]></data>
|
||||
</module>"
|
||||
|
||||
|
|
|
@ -61,9 +61,9 @@ if ($command ne ""){
|
|||
}
|
||||
|
||||
print "<module>";
|
||||
print "<name>".$module_name."</name>\n";
|
||||
print "<type>generic_proc</type>\n";
|
||||
print "<data>".$module_data."</data>\n";
|
||||
print "<name><![CDATA[".$module_name."]]></name>\n";
|
||||
print "<type><![CDATA[generic_proc]]></type>\n";
|
||||
print "<data><![CDATA[".$module_data."]]></data>\n";
|
||||
print "<description><![CDATA[" . $module_description . "]]></description>\n";
|
||||
print "</module>\n";
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ while (my ($filesystem, $use) = each (%filesystems)) {
|
|||
print "<name><![CDATA[" . $filesystem . "]]></name>\n";
|
||||
print "<type><![CDATA[generic_data]]></type>\n";
|
||||
print "<data><![CDATA[" . $use . "]]></data>\n";
|
||||
print "<description>% of usage in this volume</description>\n";
|
||||
print "<description><![CDATA[% of usage in this volume]]></description>\n";
|
||||
print "</module>\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 6.0dev-150706
|
||||
Version: 6.0dev-150707
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="6.0dev-150706"
|
||||
pandora_version="6.0dev-150707"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -41,7 +41,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '6.0dev';
|
||||
use constant AGENT_BUILD => '150706';
|
||||
use constant AGENT_BUILD => '150707';
|
||||
|
||||
# Commands to retrieve total memory information in kB
|
||||
use constant TOTALMEMORY_CMDS => {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 6.0dev
|
||||
%define release 150706
|
||||
%define release 150707
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 6.0dev
|
||||
%define release 150706
|
||||
%define release 150707
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -40,15 +40,15 @@ echo $CURRENT > $DIRETMP
|
|||
|
||||
echo "<module>
|
||||
<name><![CDATA[FS_$DIRE]]></name>
|
||||
<description>Number of files in directory</description>
|
||||
<type>generic_proc</type>
|
||||
<data>$DISPARA</data>
|
||||
<description><![CDATA[Number of files in directory]]></description>
|
||||
<type><![CDATA[generic_proc]]></type>
|
||||
<data><![CDATA[$DISPARA]]></data>
|
||||
</module>
|
||||
|
||||
<module>
|
||||
<name><![CDATA[NumFiles_FS_$DIRE]]></name>
|
||||
<description>Number of files</description>
|
||||
<type>generic_data</type>
|
||||
<data>$CURRENT</data>
|
||||
<description><![CDATA[Number of files]]></description>
|
||||
<type><![CDATA[generic_data]]></type>
|
||||
<data><![CDATA[$CURRENT]]></data>
|
||||
</module>"
|
||||
|
||||
|
|
|
@ -61,9 +61,9 @@ if ($command ne ""){
|
|||
}
|
||||
|
||||
print "<module>";
|
||||
print "<name>".$module_name."</name>\n";
|
||||
print "<type>generic_proc</type>\n";
|
||||
print "<data>".$module_data."</data>\n";
|
||||
print "<name><![CDATA[".$module_name."]]></name>\n";
|
||||
print "<type><![CDATA[generic_proc]]></type>\n";
|
||||
print "<data><![CDATA[".$module_data."]]></data>\n";
|
||||
print "<description><![CDATA[" . $module_description . "]]></description>\n";
|
||||
print "</module>\n";
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ while (my ($filesystem, $use) = each (%filesystems)) {
|
|||
print "<name><![CDATA[" . $filesystem . "]]></name>\n";
|
||||
print "<type><![CDATA[generic_data]]></type>\n";
|
||||
print "<data><![CDATA[" . $use . "]]></data>\n";
|
||||
print "<description>% of usage in this volume</description>\n";
|
||||
print "<description><![CDATA[% of usage in this volume]]></description>\n";
|
||||
print "</module>\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -67,12 +67,12 @@ while (my ($filesystem, $use) = each (%filesystems)) {
|
|||
print "<name><![CDATA[Disk_" . $filesystem . "]]></name>\n";
|
||||
print "<type><![CDATA[generic_data]]></type>\n";
|
||||
print "<data><![CDATA[" . $free . "]]></data>\n";
|
||||
print "<min_critical>0</min_critical>\n";
|
||||
print "<unit>%</unit>\n";
|
||||
print "<max_critical>5</max_critical>\n";
|
||||
print "<min_warning>5</min_warning>\n";
|
||||
print "<max_warning>10</max_warning>\n";
|
||||
print "<description>% of free space in this volume</description>\n";
|
||||
print "<min_critical><![CDATA[0]]></min_critical>\n";
|
||||
print "<unit><![CDATA[%]]></unit>\n";
|
||||
print "<max_critical><![CDATA[5]]></max_critical>\n";
|
||||
print "<min_warning><![CDATA[5]]></min_warning>\n";
|
||||
print "<max_warning><![CDATA[10]]></max_warning>\n";
|
||||
print "<description><![CDATA[% of free space in this volume]]></description>\n";
|
||||
print "</module>\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ IN=`netstat -as | grep "InOctets" | awk '{ print $2 }'`
|
|||
|
||||
TOTAL=`expr $OUT + $IN`
|
||||
echo "<module>"
|
||||
echo " <name>Network_Usage_Bytes</name>"
|
||||
echo " <type>generic_data_inc</type>"
|
||||
echo " <data>$TOTAL</data>"
|
||||
echo " <unit>bytes/sec</unit>"
|
||||
echo " <description>Total bytes/sec transfered in this system</description>"
|
||||
echo " <name><![CDATA[Network_Usage_Bytes]]></name>"
|
||||
echo " <type><![CDATA[generic_data_inc]]></type>"
|
||||
echo " <data><![CDATA[$TOTAL]]></data>"
|
||||
echo " <unit><![CDATA[bytes/sec]]></unit>"
|
||||
echo " <description><![CDATA[Total bytes/sec transfered in this system]]></description>"
|
||||
echo "</module>"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
echo "<module>";
|
||||
echo "<name>top</name>";
|
||||
echo "<type>generic_data_string</type>";
|
||||
echo "<name><![CDATA[top]]></name>";
|
||||
echo "<type><![CDATA[generic_data_string]]></type>";
|
||||
echo "<data><![CDATA["
|
||||
top -b -n 1
|
||||
echo "]]></data>"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
echo "<module>";
|
||||
echo "<name>who</name>";
|
||||
echo "<type>async_string</type>";
|
||||
echo "<name><![CDATA[who]]></name>";
|
||||
echo "<type><![CDATA[async_string]]></type>";
|
||||
echo "<data><![CDATA["
|
||||
WHO=`who`
|
||||
if [ "$WHO" = "" ]; then
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{150706}
|
||||
{150707}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("6.0dev(Build 150706)")
|
||||
#define PANDORA_VERSION ("6.0dev(Build 150707)")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(6.0dev(Build 150706))"
|
||||
VALUE "ProductVersion", "(6.0dev(Build 150707))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 6.0dev-150706
|
||||
Version: 6.0dev-150707
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="6.0dev-150706"
|
||||
pandora_version="6.0dev-150707"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -17,8 +17,12 @@
|
|||
global $config;
|
||||
check_login ();
|
||||
ui_require_css_file ('firts_task');
|
||||
|
||||
ui_print_info_message(
|
||||
array(
|
||||
'no_close'=>true,
|
||||
'message'=> __('There are no visual console defined yet.')));
|
||||
?>
|
||||
<?php ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no visual console defined yet.') ) ); ?>
|
||||
|
||||
<div class="new_task">
|
||||
<div class="image_task">
|
||||
|
|
|
@ -344,7 +344,7 @@ $table->head[3] = __('Delete');
|
|||
$table->style = array ();
|
||||
$table->style[0] = 'font-weight: bold';
|
||||
$table->size = array ();
|
||||
$table->size[1] = '30px';
|
||||
$table->size[1] = '200px';
|
||||
$table->size[2] = '40px';
|
||||
$table->size[3] = '40px';
|
||||
$table->align = array ();
|
||||
|
|
|
@ -233,8 +233,6 @@ $table = new stdClass();
|
|||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
if (defined("METACONSOLE")) {
|
||||
$table->width = '96%';
|
||||
$table->class = 'databox_filters';
|
||||
$table->cellspacing = 0;
|
||||
$table->cellpadding = 0;
|
||||
|
||||
|
@ -243,10 +241,9 @@ $table->data = array ();
|
|||
$table->head = array ();
|
||||
$table->style = array ();
|
||||
|
||||
if (!defined("METACONSOLE")) {
|
||||
$table->style[0] = 'font-weight: bold';
|
||||
$table->style[2] = 'font-weight: bold';
|
||||
}
|
||||
$table->style[0] = 'font-weight: bold';
|
||||
$table->style[2] = 'font-weight: bold';
|
||||
|
||||
|
||||
$table->data[0][0] = __('Type');
|
||||
$table->data[0][1] = html_print_select (alerts_get_alert_templates_types (), 'search_type',
|
||||
|
@ -260,7 +257,7 @@ $table->data[0][4] .= html_print_submit_button (__('Search'), 'search', false,
|
|||
$table->data[0][4] .= '</div>';
|
||||
|
||||
if (defined("METACONSOLE")) {
|
||||
$filter = '<form class="filters_form" method="post" action="' . $url . '">';
|
||||
$filter = '<form class="" method="post" action="' . $url . '">';
|
||||
$filter .= html_print_table ($table,true);
|
||||
$filter .= '</form>';
|
||||
ui_toggle($filter, __("Show Options"));
|
||||
|
|
|
@ -94,8 +94,6 @@ $table->width = '100%';
|
|||
$table->class = 'databox filters';
|
||||
|
||||
if (defined('METACONSOLE')) {
|
||||
$table->class = 'databox data';
|
||||
$table->width = '100%';
|
||||
if ($id) {
|
||||
$table->head[0] = __('Update Action');
|
||||
}
|
||||
|
|
|
@ -123,8 +123,6 @@ $table->width = '100%';
|
|||
$table->class = 'databox filters';
|
||||
|
||||
if (defined('METACONSOLE')) {
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
if ($id) {
|
||||
$table->head[0] = __('Update Command');
|
||||
}
|
||||
|
|
|
@ -474,16 +474,14 @@ $table->id = 'template';
|
|||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
if(defined("METACONSOLE")) {
|
||||
$table->class = 'databox data';
|
||||
$table->head[0] = __('Create Template');
|
||||
$table->head_colspan[0] = 4;
|
||||
$table->headstyle[0] = 'text-align: center';
|
||||
}
|
||||
$table->style = array ();
|
||||
if(!defined("METACONSOLE")) {
|
||||
$table->style[0] = 'font-weight: bold;';
|
||||
$table->style[2] = 'font-weight: bold;';
|
||||
}
|
||||
$table->style[0] = 'font-weight: bold;';
|
||||
$table->style[2] = 'font-weight: bold;';
|
||||
|
||||
$table->size = array ();
|
||||
$table->size[0] = '20%';
|
||||
$table->size[2] = '20%';
|
||||
|
|
|
@ -135,32 +135,22 @@ if (!empty($result)) {
|
|||
|
||||
html_print_table ($table);
|
||||
|
||||
if (defined('METACONSOLE')) {
|
||||
echo "<div style='width=100%; float:right;'>";
|
||||
if(defined('METACONSOLE'))
|
||||
echo '<form method="post" action="index.php?sec=advanced&sec2=godmode/category/edit_category&action=new&pure='.(int)$config['pure'].'">';
|
||||
else
|
||||
echo '<form method="post" action="index.php?sec=gmodules&sec2=godmode/category/edit_category&action=new&pure='.(int)$config['pure'].'">';
|
||||
html_print_input_hidden ("create_category", "1", true);
|
||||
html_print_submit_button (__('Create category'), 'create_button', false, 'class="sub next"');
|
||||
echo "</form>";
|
||||
echo "</div>";
|
||||
}
|
||||
}
|
||||
else {
|
||||
// No categories available or selected
|
||||
ui_print_info_message ( array('no_close'=>true, 'message'=> __('No categories found') ) );
|
||||
}
|
||||
// Form to add new categories or search categories
|
||||
if (!defined('METACONSOLE')) {
|
||||
echo "<div style='width=100%; float:right;'>";
|
||||
echo "<div style='width=100%; float:right;'>";
|
||||
if(defined('METACONSOLE'))
|
||||
echo '<form method="post" action="index.php?sec=advanced&sec2=godmode/category/edit_category&action=new&pure='.(int)$config['pure'].'">';
|
||||
else
|
||||
echo '<form method="post" action="index.php?sec=gmodules&sec2=godmode/category/edit_category&action=new&pure='.(int)$config['pure'].'">';
|
||||
html_print_input_hidden ("create_category", "1", true);
|
||||
html_print_submit_button (__('Create category'),
|
||||
'create_button', false, 'class="sub next"');
|
||||
echo "</form>";
|
||||
echo "</div>";
|
||||
}
|
||||
html_print_input_hidden ("create_category", "1", true);
|
||||
html_print_submit_button (__('Create category'), 'create_button', false, 'class="sub next"');
|
||||
echo "</form>";
|
||||
echo "</div>";
|
||||
|
||||
enterprise_hook('close_meta_frame');
|
||||
|
||||
?>
|
||||
|
|
|
@ -127,10 +127,8 @@ if(!defined('METACONSOLE'))
|
|||
else
|
||||
echo '<div align=left style="width: 100%" class="pandora_form">';
|
||||
|
||||
if(!defined('METACONSOLE'))
|
||||
echo "<table border=0 cellpadding=4 cellspacing=4 class='databox filters' width=100%>";
|
||||
else
|
||||
echo "<table border=0 cellpadding=4 cellspacing=4 class='databox data' width=100%>";
|
||||
echo "<table border=0 cellpadding=4 cellspacing=4 class='databox filters' width=100%>";
|
||||
|
||||
if (defined("METACONSOLE")) {
|
||||
if ($action == "update") {
|
||||
echo "<thead>
|
||||
|
|
|
@ -285,67 +285,35 @@ $remove_with_tag_disabled = empty($tag_with_temp);
|
|||
$add_without_tag_disabled = empty($tags_select_without);
|
||||
$remove_without_tag_disabled = empty($tag_without_temp);
|
||||
|
||||
$table->colspan[13][0] = '2';
|
||||
$table->data[13][0] = '<b>' . __('Events with following tags') . '</b>';
|
||||
$table->data[14][0] = html_print_select ($tags_select_with, 'select_with',
|
||||
'', '', '', 0, true, false, true, '', false, 'width: 220px;');
|
||||
$table->data[14][1] = html_print_button(__('Add'), 'add_whith', $add_with_tag_disabled,
|
||||
'', 'class="add sub"', true);
|
||||
|
||||
if (defined("METACONSOLE")) {
|
||||
$table->data[15][0] = html_print_select ($tag_with_temp,
|
||||
'tag_with_temp', array(), '', '', 0, true, true,
|
||||
true, '', false, "width: 220px; height: 50px;");
|
||||
$table->data[15][0] .= html_print_input_hidden('tag_with',
|
||||
$tag_with_base64, true);
|
||||
$table->data[15][1] = html_print_button(__('Remove'),
|
||||
'remove_whith', $remove_with_tag_disabled, '', 'class="delete sub"', true);
|
||||
|
||||
$table->data[13][0] = '<b>' . __('Events with following tags') . '</b>';
|
||||
$table->data[13][0] .= '<br>' . html_print_select ($tags_select_with, 'select_with',
|
||||
'', '', '', 0, true, false, true, '', false, 'width: 120px;');
|
||||
$table->data[13][0] .= ' ' . html_print_button(__('Add'), 'add_whith', $add_with_tag_disabled,
|
||||
'', 'class="add sub"', true);
|
||||
$table->data[13][0] .= '<br>' . html_print_select ($tag_with_temp,
|
||||
'tag_with_temp', array(), '', '', 0, true, true,
|
||||
true, '', false, "width: 120px; height: 50px;");
|
||||
$table->data[13][0] .= ' ' . html_print_button(__('Remove'),
|
||||
'remove_whith', $remove_with_tag_disabled, '', 'class="delete sub"', true);
|
||||
$table->data[13][0] .= html_print_input_hidden('tag_with',
|
||||
$tag_with_base64, true);
|
||||
$table->colspan[16][0] = '2';
|
||||
$table->data[16][0] = '<b>' . __('Events without following tags') . '</b>';
|
||||
$table->data[17][0] = html_print_select ($tags_select_without, 'select_without',
|
||||
'', '', '', 0, true, false, true, '', false, 'width: 220px;');
|
||||
$table->data[17][1] = html_print_button(__('Add'), 'add_whithout', $add_without_tag_disabled,
|
||||
'', 'class="add sub"', true);
|
||||
|
||||
$table->data[13][1] = '<b>' . __('Events without following tags') . '</b>';
|
||||
$table->data[13][1] .= '<br>' . html_print_select ($tags_select_without, 'select_without',
|
||||
'', '', '', 0, true, false, true, '', false, 'width: 120px;');
|
||||
$table->data[13][1] .= ' ' . html_print_button(__('Add'), 'add_whithout', $add_without_tag_disabled,
|
||||
'', 'class="add sub"', true);
|
||||
$table->data[13][1] .= '<br>' . html_print_select ($tag_without_temp,
|
||||
'tag_without_temp', array(), '', '', 0, true, true,
|
||||
true, '', false, "width: 120px; height: 50px;");
|
||||
$table->data[13][1] .= ' ' . html_print_button(__('Remove'), 'remove_whithout', $remove_without_tag_disabled,
|
||||
'', 'class="delete sub"', true);
|
||||
$table->data[13][1] .= html_print_input_hidden('tag_without',
|
||||
$tag_without_base64, true);
|
||||
}
|
||||
else {
|
||||
|
||||
$table->colspan[13][0] = '2';
|
||||
$table->data[13][0] = '<b>' . __('Events with following tags') . '</b>';
|
||||
$table->data[14][0] = html_print_select ($tags_select_with, 'select_with',
|
||||
'', '', '', 0, true, false, true, '', false, 'width: 120px;');
|
||||
$table->data[14][1] = html_print_button(__('Add'), 'add_whith', $add_with_tag_disabled,
|
||||
'', 'class="add sub"', true);
|
||||
|
||||
$table->data[15][0] = html_print_select ($tag_with_temp,
|
||||
'tag_with_temp', array(), '', '', 0, true, true,
|
||||
true, '', false, "width: 120px; height: 50px;");
|
||||
$table->data[15][0] .= html_print_input_hidden('tag_with',
|
||||
$tag_with_base64, true);
|
||||
$table->data[15][1] = html_print_button(__('Remove'),
|
||||
'remove_whith', $remove_with_tag_disabled, '', 'class="delete sub"', true);
|
||||
|
||||
$table->colspan[16][0] = '2';
|
||||
$table->data[16][0] = '<b>' . __('Events without following tags') . '</b>';
|
||||
$table->data[17][0] = html_print_select ($tags_select_without, 'select_without',
|
||||
'', '', '', 0, true, false, true, '', false, 'width: 120px;');
|
||||
$table->data[17][1] = html_print_button(__('Add'), 'add_whithout', $add_without_tag_disabled,
|
||||
'', 'class="add sub"', true);
|
||||
|
||||
$table->data[18][0] = html_print_select ($tag_without_temp,
|
||||
'tag_without_temp', array(), '', '', 0, true, true,
|
||||
true, '', false, "width: 120px; height: 50px;");
|
||||
$table->data[18][0] .= html_print_input_hidden('tag_without',
|
||||
$tag_without_base64, true);
|
||||
$table->data[18][1] = html_print_button(__('Remove'), 'remove_whithout', $remove_without_tag_disabled,
|
||||
'', 'class="delete sub"', true);
|
||||
}
|
||||
$table->data[18][0] = html_print_select ($tag_without_temp,
|
||||
'tag_without_temp', array(), '', '', 0, true, true,
|
||||
true, '', false, "width: 220px; height: 50px;");
|
||||
$table->data[18][0] .= html_print_input_hidden('tag_without',
|
||||
$tag_without_base64, true);
|
||||
$table->data[18][1] = html_print_button(__('Remove'), 'remove_whithout', $remove_without_tag_disabled,
|
||||
'', 'class="delete sub"', true);
|
||||
|
||||
$table->data[19][0] = '<b>' . __('Alert events') . '</b>';
|
||||
$table->data[19][1] = html_print_select(
|
||||
|
|
|
@ -60,8 +60,6 @@ $table->width = '100%';
|
|||
$table->class = 'databox filters';
|
||||
|
||||
if(defined('METACONSOLE')) {
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->head[0] = __('Edit event responses');
|
||||
$table->head_colspan[0] = 5;
|
||||
$table->headstyle[0] = 'text-align: center';
|
||||
|
@ -132,7 +130,7 @@ if ($event_response_id == 0) {
|
|||
if(!defined('METACONSOLE'))
|
||||
echo '<div style="width:100%;text-align:right;">';
|
||||
else
|
||||
echo '<br><br><div style="width:100%;text-align:right;">';
|
||||
echo '<div style="width:100%;text-align:right;">';
|
||||
html_print_submit_button(__('Create'), 'create_response_button', false, array('class' => 'sub next'));
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
|
@ -143,7 +141,7 @@ else {
|
|||
if(!defined('METACONSOLE'))
|
||||
echo '<div style="width:100%;text-align:right;">';
|
||||
else
|
||||
echo '<br><br><div style="width:100%;text-align:right;">';
|
||||
echo '<div style="width:100%;text-align:right;">';
|
||||
html_print_submit_button(__('Update'), 'update_response_button', false, array('class' => 'sub next'));
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
|
|
|
@ -239,7 +239,7 @@ else {
|
|||
|
||||
|
||||
echo '<form method="post">';
|
||||
echo '<div class="" style="float:right">';
|
||||
echo '<div class="" style="float:right;">';
|
||||
html_print_input_hidden ('new', 1);
|
||||
html_print_submit_button (__('Create'), 'crt', false, 'class="sub next"');
|
||||
echo '</div>';
|
||||
|
|
|
@ -441,18 +441,14 @@ $url = ui_get_url_refresh (array ('offset' => false,
|
|||
$search_id_group = (int) get_parameter ('search_id_group');
|
||||
$search_string = (string) get_parameter ('search_string');
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
|
||||
if(defined("METACONSOLE")) {
|
||||
$table->width = '50%';
|
||||
$table->class = 'databox_filters';
|
||||
}
|
||||
$table->style = array ();
|
||||
if (!defined('METACONSOLE')) {
|
||||
$table->style[0] = 'font-weight: bold';
|
||||
$table->style[2] = 'font-weight: bold';
|
||||
}
|
||||
$table->style[0] = 'font-weight: bold';
|
||||
$table->style[2] = 'font-weight: bold';
|
||||
|
||||
$table->data = array ();
|
||||
|
||||
$table->data[0][0] = __('Group');
|
||||
|
|
|
@ -204,6 +204,7 @@ if ($create_network_from_snmp_browser) {
|
|||
* You can see this values in file godmode/modules/manage_network_components.php
|
||||
* in the last lines (in the call function "html_print_select").
|
||||
*/
|
||||
$table = new stdClass();
|
||||
|
||||
if ($id_component_type == 6) {
|
||||
$categories = array (0, 1, 2);
|
||||
|
@ -236,7 +237,6 @@ $table->width = '100%';
|
|||
$table->class = 'databox filters';
|
||||
/* $table came from manage_network_components_form_common.php */
|
||||
if (defined('METACONSOLE')) {
|
||||
$table->class = 'databox data';
|
||||
if ($id) {
|
||||
$table->head[0] = __('Update Network Component');
|
||||
}
|
||||
|
|
|
@ -234,9 +234,15 @@ else
|
|||
$maps = visual_map_get_user_layouts ($config['id_user'], false,
|
||||
false, false);
|
||||
|
||||
if (!$maps) {
|
||||
if (!$maps && !defined("METACONSOLE")) {
|
||||
require_once ($config['homedir'] . "/general/firts_task/map_builder.php");
|
||||
}
|
||||
elseif (!$maps && defined("METACONSOLE")) {
|
||||
ui_print_info_message(
|
||||
array(
|
||||
'no_close'=>true,
|
||||
'message'=> __('There are no visual console defined yet.')));
|
||||
}
|
||||
else {
|
||||
foreach ($maps as $map) {
|
||||
// ACL for the visual console permission
|
||||
|
@ -279,9 +285,9 @@ if ($maps) {
|
|||
if (!defined('METACONSOLE'))
|
||||
echo '<div class="action-buttons" style="width: 0px;">';
|
||||
else
|
||||
echo '<div class="action-buttons" style="width: 500px; text-align: right;">';
|
||||
echo '<div class="" style="width: 100%; text-align: right;">';
|
||||
}
|
||||
if ($maps) {
|
||||
if ($maps || defined("METACONSOLE")) {
|
||||
if ($vconsoles_write || $vconsoles_manage) {
|
||||
if (!defined('METACONSOLE')) {
|
||||
echo '<form action="index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder" method="post">';
|
||||
|
|
|
@ -375,8 +375,8 @@ switch ($action) {
|
|||
$table_aux->cellpadding = 0;
|
||||
$table_aux->cellspacing = 0;
|
||||
if (defined('METACONSOLE')) {
|
||||
$table_aux->class = 'databox_filters';
|
||||
$table_aux->width = '96%';
|
||||
$table_aux->class = 'databox filters';
|
||||
$table_aux->width = '100%';
|
||||
$table_aux->cellpadding = 0;
|
||||
$table_aux->cellspacing = 0;
|
||||
}
|
||||
|
@ -391,7 +391,7 @@ switch ($action) {
|
|||
$table_aux->data[0][6] = html_print_submit_button(__('Search'), 'search_submit', false, 'class="sub upd"', true);
|
||||
|
||||
if (defined('METACONSOLE')) {
|
||||
$filter = "<form class ='filters_form' action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&id_group=$id_group&pure=$pure'
|
||||
$filter = "<form class ='' action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&id_group=$id_group&pure=$pure'
|
||||
method='post'>";
|
||||
$filter .= html_print_table($table_aux,true);
|
||||
$filter .= "</form>";
|
||||
|
|
|
@ -276,7 +276,6 @@ if (($create != "") OR ($view != "")) {
|
|||
$table->head[0] = __('General');
|
||||
$table->head_colspan[0] = 4;
|
||||
$table->headstyle[0] = 'text-align: center';
|
||||
echo '<br>';
|
||||
html_print_table($table);
|
||||
}
|
||||
else {
|
||||
|
@ -339,7 +338,6 @@ if (($create != "") OR ($view != "")) {
|
|||
$table->head[0] = __('Command');
|
||||
$table->head_colspan[0] = 4;
|
||||
$table->headstyle[0] = 'text-align: center';
|
||||
echo '<br>';
|
||||
html_print_table($table);
|
||||
}
|
||||
else {
|
||||
|
@ -473,12 +471,9 @@ if (($create != "") OR ($view != "")) {
|
|||
|
||||
|
||||
if (defined("METACONSOLE")) {
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->head[0] = __('Parameters macros');
|
||||
$table->head_colspan[0] = 4;
|
||||
$table->headstyle[0] = 'text-align: center';
|
||||
echo '<br>';
|
||||
html_print_table($table);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -150,10 +150,7 @@ echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/tag/edit_t
|
|||
|
||||
echo '<div align=left style="width: 100%" class="pandora_form">';
|
||||
|
||||
if (defined('METACONSOLE'))
|
||||
echo "<table border=0 cellpadding=0 cellspacing=0 class='databox data' width=100%>";
|
||||
else
|
||||
echo "<table border=0 cellpadding=4 cellspacing=4 class='databox filters' width=100%>";
|
||||
echo "<table border=0 cellpadding=4 cellspacing=4 class='databox filters' width=100%>";
|
||||
if (defined('METACONSOLE')) {
|
||||
if ($action == "update") {
|
||||
echo "<th colspan=8 style='text-align:center'>" . __("Update Tag") . "</th>";
|
||||
|
|
|
@ -138,8 +138,8 @@ if (!empty($result)) {
|
|||
}
|
||||
else {
|
||||
|
||||
$filters = '<form method=post class="filters_form" action="index.php?sec='.$sec.'&sec2=godmode/tag/tag&delete_tag=0">';
|
||||
$filters .= "<table border=0 cellpadding=0 cellspacing=0 class=databox_filters width=70%>";
|
||||
$filters = '<form method=post class="" action="index.php?sec='.$sec.'&sec2=godmode/tag/tag&delete_tag=0">';
|
||||
$filters .= "<table border=0 cellpadding=0 cellspacing=0 class='databox filters' width=100%>";
|
||||
$filters .= "<tr>";
|
||||
$filters .= "<td>";
|
||||
$filters .= __("Name") . "/" . __("Description");
|
||||
|
@ -247,6 +247,9 @@ else{
|
|||
require_once ($config['homedir'] . "/general/firts_task/tags.php");
|
||||
return;
|
||||
}
|
||||
else{
|
||||
ui_print_info_message(array("no_close"=>true,"message"=>__("No tags defined.")));
|
||||
}
|
||||
}
|
||||
echo "<table border=0 cellpadding=0 cellspacing=0 width=100%>";
|
||||
echo "<tr>";
|
||||
|
|
|
@ -418,8 +418,6 @@ $table->id = 'user_configuration_table';
|
|||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
if (defined('METACONSOLE')) {
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
if ($id) {
|
||||
$table->head[0] = __('Update User');
|
||||
}
|
||||
|
@ -605,7 +603,7 @@ if (!empty ($id) && !$new_user) {
|
|||
$table->head_colspan[0] = 0;
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox_tactical data';
|
||||
$table->title = '<span>' . __('Profiles/Groups assigned to this user') . '</span>';
|
||||
$table->title = __('Profiles/Groups assigned to this user');
|
||||
}
|
||||
$table->data = array ();
|
||||
$table->head = array ();
|
||||
|
|
|
@ -55,6 +55,7 @@ if (is_ajax ()) {
|
|||
}
|
||||
|
||||
$tree->setFilter($filter);
|
||||
ob_clean();
|
||||
echo json_encode(array('success' => 1, 'tree' => $tree->getArray()));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1029,6 +1029,10 @@ class Tree {
|
|||
}
|
||||
|
||||
protected function getProcessedItem ($item, $server = false, &$items = array(), &$items_tmp = array(), $remove_empty = false) {
|
||||
|
||||
if (isset($processed_item['is_processed']) && $processed_item['is_processed'])
|
||||
return $item;
|
||||
|
||||
// For strict items
|
||||
if (isset($item['_id_'])) {
|
||||
$item['id'] = $item['_id_'];
|
||||
|
@ -1171,6 +1175,7 @@ class Tree {
|
|||
// Get the children of the group (special case)
|
||||
if ($processed_item['type'] == 'group') {
|
||||
$children = $this->getGroupsChildren($items, $items_tmp, $item['id'], $server, $remove_empty);
|
||||
|
||||
if (!empty($children)) {
|
||||
$processed_item['children'] = $children;
|
||||
|
||||
|
@ -1194,6 +1199,9 @@ class Tree {
|
|||
$processed_item = array();
|
||||
}
|
||||
|
||||
if (!empty($processed_item))
|
||||
$processed_item['is_processed'] = true;
|
||||
|
||||
return $processed_item;
|
||||
}
|
||||
|
||||
|
@ -1967,20 +1975,16 @@ class Tree {
|
|||
$items = $this->getItems();
|
||||
|
||||
// Build the group hierarchy
|
||||
foreach ($items as $key => $item) {
|
||||
if (empty($item['parent'])) {
|
||||
while (($item = array_shift($items)) !== null) {
|
||||
$processed_item = $this->getProcessedItem($item, false, $items, $processed_items, true);
|
||||
|
||||
unset($items[$key]);
|
||||
$items_tmp = array();
|
||||
$processed_item = $this->getProcessedItem($item, false, $items, $items_tmp, true);
|
||||
|
||||
if (!empty($processed_item)
|
||||
&& isset($processed_item['counters'])
|
||||
&& isset($processed_item['counters']['total'])
|
||||
&& !empty($processed_item['counters']['total']))
|
||||
$processed_items[] = $processed_item;
|
||||
}
|
||||
if (!empty($processed_item)
|
||||
&& isset($processed_item['counters'])
|
||||
&& isset($processed_item['counters']['total'])
|
||||
&& !empty($processed_item['counters']['total']))
|
||||
$processed_items[] = $processed_item;
|
||||
}
|
||||
|
||||
// groupID filter. To access the view from tactical views f.e.
|
||||
if (!empty($processed_items) && !empty($this->filter['groupID'])) {
|
||||
$result = self::extractItemWithID($processed_items, $this->filter['groupID'], "group", $this->strictACL);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC150706';
|
||||
$build_version = 'PC150707';
|
||||
$pandora_version = 'v6.0dev';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -648,6 +648,11 @@ function config_process_config () {
|
|||
exit;
|
||||
}
|
||||
|
||||
$is_windows = false;
|
||||
if (substr(strtolower(PHP_OS), 0, 3) === 'win') {
|
||||
$is_windows = true;
|
||||
}
|
||||
|
||||
/* Compatibility fix */
|
||||
foreach ($configs as $c) {
|
||||
$config[$c['token']] = $c['value'];
|
||||
|
@ -663,6 +668,15 @@ function config_process_config () {
|
|||
}
|
||||
}
|
||||
|
||||
if (!isset ($config['remote_config'])) {
|
||||
if ($is_windows)
|
||||
$default = 'C:\\PandoraFMS\\Pandora_Server\\data_in';
|
||||
else
|
||||
$default = '/var/spool/pandora/data_in';
|
||||
|
||||
config_update_value ('remote_config', $default);
|
||||
}
|
||||
|
||||
if (!isset ($config['date_format'])) {
|
||||
config_update_value ('date_format', 'F j, Y, g:i a');
|
||||
}
|
||||
|
@ -821,7 +835,12 @@ function config_process_config () {
|
|||
}
|
||||
|
||||
if (!isset ($config["log_dir"])) {
|
||||
config_update_value ('log_dir', '/var/spool/pandora/data_in/log');
|
||||
if ($is_windows)
|
||||
$default = 'C:\\PandoraFMS\\Pandora_Server\\data_in\\log';
|
||||
else
|
||||
$default = '/var/spool/pandora/data_in/log';
|
||||
|
||||
config_update_value ('log_dir', $default);
|
||||
}
|
||||
|
||||
if (!isset ($config["log_max_lifetime"])) {
|
||||
|
@ -963,7 +982,12 @@ function config_process_config () {
|
|||
}
|
||||
|
||||
if (!isset ($config['netflow_path'])) {
|
||||
config_update_value ( 'netflow_path', '/var/spool/pandora/data_in/netflow');
|
||||
if ($is_windows)
|
||||
$default = 'C:\\PandoraFMS\\Pandora_Server\\data_in\\netflow';
|
||||
else
|
||||
$default = '/var/spool/pandora/data_in/netflow';
|
||||
|
||||
config_update_value ( 'netflow_path', $default);
|
||||
}
|
||||
|
||||
if (!isset ($config['netflow_interval'])) {
|
||||
|
|
|
@ -2406,8 +2406,7 @@ function group_get_data ($id_user = false, $user_strict = false, $acltags, $retu
|
|||
FROM $cache_table
|
||||
WHERE disabled = 0
|
||||
AND id_grupo IN ($user_groups_ids)
|
||||
AND critical_count = 0
|
||||
AND warning_count > 0
|
||||
AND critical_count > 0
|
||||
GROUP BY id_grupo";
|
||||
$data_stats_critical = db_get_all_rows_sql($sql_stats_critical);
|
||||
}
|
||||
|
|
|
@ -2495,19 +2495,6 @@ function reporting_header_content($mini, $content, $report, &$table,
|
|||
array_push ($table->data, $data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function reporting_get_agents_by_status ($data, $graph_width = 250, $graph_height = 150, $links = false) {
|
||||
global $config;
|
||||
|
||||
|
@ -2519,25 +2506,25 @@ function reporting_get_agents_by_status ($data, $graph_width = 250, $graph_heigh
|
|||
|
||||
$agent_data = array();
|
||||
$agent_data[0] = html_print_image('images/agent_critical.png', true, array('title' => __('Agents critical')));
|
||||
$agent_data[1] = "<a style='color: #FC4444;' href='" . $links['agents_critical'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #FC4444;'>".format_numeric($data['agent_critical'])."</span></b></a>";
|
||||
$agent_data[1] = "<a style='color: ".COL_CRITICAL.";' href='" . $links['agents_critical'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #FC4444;'>".format_numeric($data['agent_critical'])."</span></b></a>";
|
||||
|
||||
$agent_data[2] = html_print_image('images/agent_warning.png', true, array('title' => __('Agents warning')));
|
||||
$agent_data[3] = "<a style='color: #FAD403;' href='" . $links['agents_warning'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #FAD403;'>".format_numeric($data['agent_warning'])."</span></b></a>";
|
||||
$agent_data[3] = "<a style='color: ".COL_WARNING.";' href='" . $links['agents_warning'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #FAD403;'>".format_numeric($data['agent_warning'])."</span></b></a>";
|
||||
|
||||
$table_agent->data[] = $agent_data;
|
||||
|
||||
$agent_data = array();
|
||||
$agent_data[0] = html_print_image('images/agent_ok.png', true, array('title' => __('Agents ok')));
|
||||
$agent_data[1] = "<a style='color: #80BA27;' href='" . $links['agents_ok'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #80BA27;'>".format_numeric($data['agent_ok'])."</span></b></a>";
|
||||
$agent_data[1] = "<a style='color: ".COL_NORMAL.";' href='" . $links['agents_ok'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #80BA27;'>".format_numeric($data['agent_ok'])."</span></b></a>";
|
||||
|
||||
$agent_data[2] = html_print_image('images/agent_unknown.png', true, array('title' => __('Agents unknown')));
|
||||
$agent_data[3] = "<a style='color: #B2B2B2;' href='" . $links['agents_unknown'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #B2B2B2;'>".format_numeric($data['agent_unknown'])."</span></b></a>";
|
||||
$agent_data[3] = "<a style='color: ".COL_UNKNOWN.";' href='" . $links['agents_unknown'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #B2B2B2;'>".format_numeric($data['agent_unknown'])."</span></b></a>";
|
||||
|
||||
$table_agent->data[] = $agent_data;
|
||||
|
||||
$agent_data = array();
|
||||
$agent_data[0] = html_print_image('images/agent_notinit.png', true, array('title' => __('Agents not init')));
|
||||
$agent_data[1] = "<a style='color: #5BB6E5;' href='" . $links['agents_not_init'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #5BB6E5;'>".format_numeric($data['agent_not_init'])."</span></b></a>";
|
||||
$agent_data[1] = "<a style='color: ".COL_NOTINIT.";' href='" . $links['agents_not_init'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #5BB6E5;'>".format_numeric($data['agent_not_init'])."</span></b></a>";
|
||||
|
||||
$agent_data[2] = "";
|
||||
$agent_data[3] = "";
|
||||
|
|
|
@ -1175,11 +1175,11 @@ function tags_check_acl_event($id_user, $id_group, $access, $tags = array(),$p =
|
|||
if (is_array($id_group)) {
|
||||
|
||||
foreach ($id_group as $group) {
|
||||
if($group > 0) {
|
||||
if(isset($acls[$group])) {
|
||||
foreach($tags as $tag) {
|
||||
if ($group > 0) {
|
||||
if (isset($acls[$group])) {
|
||||
foreach ($tags as $tag) {
|
||||
$tag = tags_get_id($tag);
|
||||
if(in_array($tag, $acls[$group])) {
|
||||
if (in_array($tag, $acls[$group])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1190,13 +1190,13 @@ function tags_check_acl_event($id_user, $id_group, $access, $tags = array(),$p =
|
|||
}
|
||||
}
|
||||
else {
|
||||
foreach($acls as $acl_tags) {
|
||||
foreach($tags as $tag) {
|
||||
$tag = tags_get_id($tag);
|
||||
if(in_array($tag, $acl_tags)) {
|
||||
return true;
|
||||
}
|
||||
foreach ($acls as $acl_tags) {
|
||||
foreach ($tags as $tag) {
|
||||
$tag = tags_get_id($tag);
|
||||
if (in_array($tag, $acl_tags)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1204,12 +1204,12 @@ function tags_check_acl_event($id_user, $id_group, $access, $tags = array(),$p =
|
|||
|
||||
}
|
||||
else {
|
||||
if($id_group > 0) {
|
||||
if(isset($acls[$id_group])) {
|
||||
foreach($tags as $tag) {
|
||||
if ($id_group > 0) {
|
||||
if (isset($acls[$id_group])) {
|
||||
foreach ($tags as $tag) {
|
||||
$tag = tags_get_id($tag);
|
||||
|
||||
if(in_array($tag, $acls[$id_group])) {
|
||||
if (in_array($tag, $acls[$id_group])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1220,10 +1220,10 @@ function tags_check_acl_event($id_user, $id_group, $access, $tags = array(),$p =
|
|||
}
|
||||
}
|
||||
else {
|
||||
foreach($acls as $acl_tags) {
|
||||
foreach($tags as $tag) {
|
||||
foreach ($acls as $acl_tags) {
|
||||
foreach ($tags as $tag) {
|
||||
$tag = tags_get_id($tag);
|
||||
if(in_array($tag, $acl_tags)) {
|
||||
if (in_array($tag, $acl_tags)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ function show_save_filter_dialog() {
|
|||
opacity: 0.5,
|
||||
background: "black"
|
||||
},
|
||||
width: 420,
|
||||
width: 688,
|
||||
height: 200
|
||||
})
|
||||
.show ();
|
||||
|
@ -109,8 +109,8 @@ function show_load_filter_dialog() {
|
|||
opacity: 0.5,
|
||||
background: "black"
|
||||
},
|
||||
width: 420,
|
||||
height: 200
|
||||
width: 520,
|
||||
height: 300
|
||||
})
|
||||
.show ();
|
||||
return false;
|
||||
|
|
|
@ -57,9 +57,9 @@ TreeController = {
|
|||
|
||||
container.append($group);
|
||||
|
||||
elements.forEach(function(element, index) {
|
||||
_.each(elements, function(element) {
|
||||
element.jqObject = _processNode($group, element);
|
||||
}, $group);
|
||||
});
|
||||
|
||||
return $group;
|
||||
}
|
||||
|
@ -560,9 +560,9 @@ TreeController = {
|
|||
$node.append($group);
|
||||
}
|
||||
|
||||
data.tree.forEach(function(element, index) {
|
||||
_.each(data.tree, function(element) {
|
||||
element.jqObject = _processNode($group, element);
|
||||
}, $group);
|
||||
});
|
||||
|
||||
$group.slideDown();
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '6.0dev';
|
||||
$build = '150706';
|
||||
$build = '150707';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
|
|
@ -45,8 +45,8 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st
|
|||
$table->cellpadding = '0';
|
||||
$table->cellspacing = '0';
|
||||
if (defined('METACONSOLE')) {
|
||||
$table->class = 'databox_filters';
|
||||
$table->width = '96%';
|
||||
$table->class = 'databox filters';
|
||||
$table->width = '100%';
|
||||
$table->cellpadding = '0';
|
||||
$table->cellspacing = '0';
|
||||
}
|
||||
|
@ -58,11 +58,11 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st
|
|||
$table->style[3] = 'font-weight: bold;';
|
||||
$table->style[4] = 'font-weight: bold;';
|
||||
if (defined('METACONSOLE')) {
|
||||
$table->style[0] = 'vertical-align:middle; font-weight: bold;';
|
||||
$table->style[1] = 'vertical-align:middle; font-weight: bold;';
|
||||
$table->style[2] = 'vertical-align:middle; font-weight: bold;';
|
||||
$table->style[3] = 'vertical-align:middle; font-weight: bold;';
|
||||
$table->style[4] = 'vertical-align:middle; font-weight: bold;';
|
||||
$table->style[0] = 'font-weight: bold;';
|
||||
$table->style[1] = 'font-weight: bold;';
|
||||
$table->style[2] = 'font-weight: bold;';
|
||||
$table->style[3] = 'font-weight: bold;';
|
||||
$table->style[4] = 'font-weight: bold;';
|
||||
}
|
||||
|
||||
$table->data[0][0] = __('Group');
|
||||
|
|
|
@ -91,26 +91,15 @@ if ($id_module) {
|
|||
|
||||
enterprise_hook('open_meta_frame');
|
||||
|
||||
if (!defined('METACONSOLE')) {
|
||||
$filters = '<form method="post" action="index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=' . $refr . '&ag_group=' .
|
||||
$ag_group . '&ag_freestring=' . $ag_freestring . '&ag_modulename=' . $ag_modulename . '&status=' . $status . '&sort_field=' .
|
||||
$sortField . '&sort=' . $sort .'&pure=' . $config['pure'] . $ag_custom_fields_params . '">';
|
||||
//echo '<table cellspacing="4" cellpadding="4" width="100%" class="databox"><tr>';
|
||||
$table->width = "100%";
|
||||
$table->cellspacing = 0;
|
||||
$table->cellpadding = 0;
|
||||
$table->class = "databox filters";
|
||||
}
|
||||
else {
|
||||
$filters = '<form class="filters_form" method="post" action="index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=' . $refr . '&ag_group=' .
|
||||
$ag_group . '&ag_freestring=' . $ag_freestring . '&ag_modulename=' . $ag_modulename . '&status=' . $status . '&sort_field=' .
|
||||
$sortField . '&sort=' . $sort .'&pure=' . $config['pure'] . $ag_custom_fields_params . '">';
|
||||
//echo '<table cellspacing="0" cellpadding="0" width="96%" class="databox_filters"><tr>';
|
||||
$table->width = "96%";
|
||||
$table->cellspacing = 0;
|
||||
$table->cellpadding = 0;
|
||||
$table->class = "databox_filters";
|
||||
}
|
||||
$filters = '<form method="post" action="index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=' . $refr . '&ag_group=' .
|
||||
$ag_group . '&ag_freestring=' . $ag_freestring . '&ag_modulename=' . $ag_modulename . '&status=' . $status . '&sort_field=' .
|
||||
$sortField . '&sort=' . $sort .'&pure=' . $config['pure'] . $ag_custom_fields_params . '">';
|
||||
//echo '<table cellspacing="4" cellpadding="4" width="100%" class="databox"><tr>';
|
||||
$table->width = "100%";
|
||||
$table->cellspacing = 0;
|
||||
$table->cellpadding = 0;
|
||||
$table->class = "databox filters";
|
||||
|
||||
|
||||
// Get Groups and profiles from user
|
||||
$user_groups = implode (",", array_keys (users_get_groups ()));
|
||||
|
@ -527,6 +516,7 @@ foreach ($custom_fields as $custom_field) {
|
|||
|
||||
if (defined('METACONSOLE')) {
|
||||
$table->colspan[2][0] = 7;
|
||||
$table->cellstyle[2][0] = 'padding: 10px;';
|
||||
$table->data[2][0] = ui_toggle(
|
||||
html_print_table($table_custom_fields, true),
|
||||
__('Advanced Options'), '', true, true);
|
||||
|
|
|
@ -48,7 +48,7 @@ if (in_array('server_name', $show_fields)) {
|
|||
}
|
||||
if (in_array('estado', $show_fields)) {
|
||||
$table->head[$i] = __('Status');
|
||||
$table->align[$i] = 'center';
|
||||
$table->align[$i] = 'left';
|
||||
$i++;
|
||||
}
|
||||
if (in_array('id_evento', $show_fields)) {
|
||||
|
|
|
@ -189,18 +189,18 @@ if (check_acl ($config["id_user"], 0, "EW") || check_acl ($config["id_user"], 0,
|
|||
$table->class = 'databox';
|
||||
if (defined('METACONSOLE')) {
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'databox filters';
|
||||
$table->cellspacing = 0;
|
||||
$table->cellpadding = 0;
|
||||
}
|
||||
$table->styleTable = 'font-weight: bold; color: #555; text-align:left;';
|
||||
$table->styleTable = 'font-weight: bold; text-align:left;';
|
||||
if (!defined("METACONSOLE"))
|
||||
$table->style[0] = 'width: 50%; width:50%;';
|
||||
|
||||
$data = array();
|
||||
$table->rowid[0] = 'update_save_selector';
|
||||
$data[0] = html_print_radio_button('filter_mode', 'new', '', true, true) . __('New filter') . '<br><br>';
|
||||
$data[1] = html_print_radio_button('filter_mode', 'update', '', false, true) . __('Update filter') . '<br><br>';
|
||||
$data[0] = html_print_radio_button('filter_mode', 'new', '', true, true) . __('New filter') . '';
|
||||
$data[1] = html_print_radio_button('filter_mode', 'update', '', false, true) . __('Update filter') . '';
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
|
@ -213,16 +213,14 @@ if (check_acl ($config["id_user"], 0, "EW") || check_acl ($config["id_user"], 0,
|
|||
else
|
||||
$data[1] = __('Filter group') . $jump;
|
||||
# Fix : Only admin users can see group ALL
|
||||
$data[1] .= html_print_select_groups($config['id_user'], "ER", users_can_manage_group_all(), "id_group_filter", $id_group_filter, '', '', 0, true, false, false, 'w130', false, '', false, false, 'id_grupo', $strict_user);
|
||||
$data[1] .= html_print_select_groups($config['id_user'], "ER", users_can_manage_group_all(), "id_group_filter",
|
||||
$id_group_filter, '', '', 0, true, false, false, 'w130', false, '', false, false, 'id_grupo', $strict_user);
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
$data = array();
|
||||
$table->rowid[2] = 'save_filter_row2';
|
||||
$data[0] = html_print_submit_button (__('Save filter'), 'save_filter', false, 'class="sub upd"', true);
|
||||
$table->colspan[2][0] = 2;
|
||||
if(!defined("METACONSOLE"))
|
||||
$table->cellstyle[2][0] = 'text-align:right;';
|
||||
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
|
@ -240,6 +238,9 @@ if (check_acl ($config["id_user"], 0, "EW") || check_acl ($config["id_user"], 0,
|
|||
|
||||
html_print_table($table);
|
||||
unset($table);
|
||||
echo '<div>';
|
||||
echo html_print_submit_button (__('Save filter'), 'save_filter', false, 'class="sub upd" style="float:right;"', true);
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
|
@ -317,14 +318,14 @@ if (defined('METACONSOLE')) {
|
|||
$data = array();
|
||||
|
||||
$data[0] = html_print_select ($tags_select_with, 'select_with', '', '', '', 0,
|
||||
true, true, true, '', false, 'width: 400px;');
|
||||
true, true, true, '', false, 'width: 335px;');
|
||||
|
||||
$data[1] = html_print_image('images/darrowright.png', true, array('id' => 'button-add_with', 'style' => 'cursor: pointer;', 'title' => __('Add')));
|
||||
$data[1] .= html_print_input_hidden('tag_with', $tag_with_base64, true);
|
||||
$data[1] .= '<br><br>' . html_print_image('images/darrowleft.png', true, array('id' => 'button-remove_with', 'style' => 'cursor: pointer;', 'title' => __('Remove')));
|
||||
|
||||
$data[2] = html_print_select ($tag_with_temp, 'tag_with_temp', array(), '', '',
|
||||
0, true, true, true, '', false, "width: 400px;");
|
||||
0, true, true, true, '', false, "width: 335px;");
|
||||
|
||||
$tabletags_with->data[] = $data;
|
||||
$tabletags_with->rowclass[] = '';
|
||||
|
@ -346,12 +347,12 @@ $tabletags_without->styleTable = 'border: 0px;';
|
|||
|
||||
$data = array();
|
||||
$data[0] = html_print_select ($tags_select_without, 'select_without', '', '', '', 0,
|
||||
true, true, true, '', false, 'width: 400px;');
|
||||
true, true, true, '', false, 'width: 335px;');
|
||||
$data[1] = html_print_image('images/darrowright.png', true, array('id' => 'button-add_without', 'style' => 'cursor: pointer;', 'title' => __('Add')));
|
||||
$data[1] .= html_print_input_hidden('tag_without', $tag_without_base64, true);
|
||||
$data[1] .= '<br><br>' . html_print_image('images/darrowleft.png', true, array('id' => 'button-remove_without', 'style' => 'cursor: pointer;', 'title' => __('Remove')));
|
||||
$data[2] = html_print_select ($tag_without_temp, 'tag_without_temp', array(), '', '',
|
||||
0, true, true, true, '', false, "width: 400px;");
|
||||
0, true, true, true, '', false, "width: 335px;");
|
||||
$tabletags_without->data[] = $data;
|
||||
$tabletags_without->rowclass[] = '';
|
||||
|
||||
|
@ -476,13 +477,13 @@ $data = array();
|
|||
if (defined('METACONSOLE'))
|
||||
{
|
||||
$data[0] = '<fieldset class="" style="padding:0px; width: 510px;">' .
|
||||
'<legend>' .
|
||||
'<legend style="padding:0px;">' .
|
||||
__('Events with following tags') .
|
||||
'</legend>' .
|
||||
html_print_table($tabletags_with, true) .
|
||||
'</fieldset>';
|
||||
$data2[1] = '<fieldset class="" style="padding:0px; width: 310px;">' .
|
||||
'<legend>' .
|
||||
'<legend style="padding:0px;">' .
|
||||
__('Events without following tags') .
|
||||
'</legend>' .
|
||||
html_print_table($tabletags_without, true) .
|
||||
|
@ -503,7 +504,9 @@ else {
|
|||
'</fieldset>';
|
||||
}
|
||||
$table_advanced->data[] = $data;
|
||||
$table_advanced->data[] = $data2;
|
||||
if (defined('METACONSOLE'))
|
||||
$table_advanced->data[] = $data2;
|
||||
|
||||
$table_advanced->rowclass[] = '';
|
||||
//- END ADVANCE FILTER -------------------------------------------------
|
||||
|
||||
|
@ -514,10 +517,7 @@ $table->width = '100%';
|
|||
$table->cellspacing = 4;
|
||||
$table->cellpadding = 4;
|
||||
$table->class = 'databox filters';
|
||||
if (defined('METACONSOLE')) {
|
||||
$table->width = '96%';
|
||||
$table->class = 'databox_filters';
|
||||
}
|
||||
|
||||
$table->styleTable = 'font-weight: bold; color: #555;';
|
||||
$table->data = array();
|
||||
|
||||
|
@ -564,7 +564,7 @@ $data = array();
|
|||
$data[0] = ui_toggle(html_print_table($table_advanced, true),
|
||||
__('Advanced options'), '', true, true);
|
||||
$table->colspan[count($table->data)][0] = 3;
|
||||
$table->cellstyle[count($table->data)][0] = 'padding-top: 15px;';
|
||||
$table->cellstyle[count($table->data)][0] = 'padding: 10px;';
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 6.0dev
|
||||
%define release 150706
|
||||
%define release 150707
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 6.0dev
|
||||
%define release 150706
|
||||
%define release 150707
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -68,7 +68,6 @@ INSERT INTO tconfig (token, value) VALUES ('db_scheme_build','PD110122');
|
|||
INSERT INTO tconfig (token, value) VALUES ('show_unknown','0');
|
||||
INSERT INTO tconfig (token, value) VALUES ('show_lastalerts','1');
|
||||
INSERT INTO tconfig (token, value) VALUES ('style','pandora');
|
||||
INSERT INTO tconfig (token, value) VALUES ('remote_config', '/var/spool/pandora/data_in');
|
||||
INSERT INTO tconfig (token, value) VALUES ('graph_color1', '#38B800');
|
||||
INSERT INTO tconfig (token, value) VALUES ('graph_color2', '#FFFF00');
|
||||
INSERT INTO tconfig (token, value) VALUES ('graph_color3', '#FF6600');
|
||||
|
@ -82,7 +81,7 @@ INSERT INTO tconfig (token, value) VALUES ('graph_color10', '#6666FF');
|
|||
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 ('event_view_hr', 8);
|
||||
INSERT INTO tconfig (token, value) VALUES ('loginhash_pwd', ' ');
|
||||
INSERT INTO tconfig (token, value) VALUES ('loginhash_pwd', '');
|
||||
INSERT INTO tconfig (token, value) VALUES ('trap2agent', 0);
|
||||
INSERT INTO tconfig (token, value) VALUES ('prominent_time', 'comparation');
|
||||
INSERT INTO tconfig (token, value) VALUES ('timesource', 'system');
|
||||
|
@ -100,10 +99,9 @@ INSERT INTO tconfig (token, value) VALUES ('sound_alert', 'include/sounds/air_sh
|
|||
INSERT INTO tconfig (token, value) VALUES ('sound_critical', 'include/sounds/Star_Trek_emergency_simulation.wav');
|
||||
INSERT INTO tconfig (token, value) VALUES ('sound_warning', 'include/sounds/negativebeep.wav');
|
||||
INSERT INTO tconfig (token, value) VALUES ('integria_enabled', '0');
|
||||
INSERT INTO tconfig (token, value) VALUES ('integria_api_password', ' ');
|
||||
INSERT INTO tconfig (token, value) VALUES ('integria_api_password', '');
|
||||
INSERT INTO tconfig (token, value) VALUES ('integria_inventory', '0');
|
||||
INSERT INTO tconfig (token, value) VALUES ('integria_url', ' ');
|
||||
INSERT INTO tconfig (token, value) VALUES ('netflow_path', '/var/spool/pandora/data_in/netflow');
|
||||
INSERT INTO tconfig (token, value) VALUES ('integria_url', '');
|
||||
INSERT INTO tconfig (token, value) VALUES ('netflow_interval', '3600');
|
||||
INSERT INTO tconfig (token, value) VALUES ('netflow_daemon', '/usr/bin/nfcapd');
|
||||
INSERT INTO tconfig (token, value) VALUES ('netflow_nfdump', '/usr/bin/nfdump');
|
||||
|
|
|
@ -55,7 +55,6 @@ INSERT INTO "tconfig" ("token", "value") VALUES
|
|||
('show_unknown','0'),
|
||||
('show_lastalerts','1'),
|
||||
('style','pandora'),
|
||||
('remote_config', '/var/spool/pandora/data_in'),
|
||||
('graph_color1', '#38B800'),
|
||||
('graph_color2', '#FFFF00'),
|
||||
('graph_color3', '#FF6600'),
|
||||
|
@ -91,7 +90,6 @@ INSERT INTO "tconfig" ("token", "value") VALUES
|
|||
('integria_api_password', ''),
|
||||
('integria_inventory', '0'),
|
||||
('integria_url', ''),
|
||||
('netflow_path', '/var/spool/pandora/data_in/netflow'),
|
||||
('netflow_interval', '3600'),
|
||||
('netflow_daemon', '/usr/bin/nfcapd'),
|
||||
('netflow_nfdump', '/usr/bin/nfdump'),
|
||||
|
|
|
@ -38,11 +38,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||
('graph_res','5'),
|
||||
('step_compact','1'),
|
||||
('db_scheme_version','6.0dev'),
|
||||
('db_scheme_build','PD150706'),
|
||||
('db_scheme_build','PD150707'),
|
||||
('show_unknown','0'),
|
||||
('show_lastalerts','1'),
|
||||
('style','pandora'),
|
||||
('remote_config', '/var/spool/pandora/data_in'),
|
||||
('graph_color1', '#99dd00'),
|
||||
('graph_color2', '#336600'),
|
||||
('graph_color3', '#3399cc'),
|
||||
|
@ -77,7 +76,6 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||
('integria_api_password', ''),
|
||||
('integria_inventory', '0'),
|
||||
('integria_url', ''),
|
||||
('netflow_path', '/var/spool/pandora/data_in/netflow'),
|
||||
('netflow_interval', '3600'),
|
||||
('netflow_daemon', '/usr/bin/nfcapd'),
|
||||
('netflow_nfdump', '/usr/bin/nfdump'),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 6.0dev-150706
|
||||
Version: 6.0dev-150707
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="6.0dev-150706"
|
||||
pandora_version="6.0dev-150707"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -43,7 +43,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "6.0dev";
|
||||
my $pandora_build = "150706";
|
||||
my $pandora_build = "150707";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -569,7 +569,7 @@ sub pandora_process_alert ($$$$$$$$;$) {
|
|||
db_do($dbh, 'UPDATE talert_template_module_actions SET last_execution = 0 WHERE id_alert_template_module = ?', $id);
|
||||
}
|
||||
|
||||
pandora_execute_alert ($pa_config, $data, $agent, $module, $alert, 0, $dbh, $timestamp, $extra_macros);
|
||||
pandora_execute_alert ($pa_config, $data, $agent, $module, $alert, 0, $dbh, $timestamp, 0, $extra_macros);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -609,21 +609,21 @@ sub pandora_process_alert ($$$$$$$$;$) {
|
|||
last_fired = ?, internal_counter = ? ' . $new_interval . ' WHERE id = ?',
|
||||
$alert->{'times_fired'}, $utimestamp, $alert->{'internal_counter'}, $id);
|
||||
|
||||
pandora_execute_alert ($pa_config, $data, $agent, $module, $alert, 1, $dbh, $timestamp, $extra_macros);
|
||||
pandora_execute_alert ($pa_config, $data, $agent, $module, $alert, 1, $dbh, $timestamp, 0, $extra_macros);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
##########################################################################
|
||||
=head2 C<< pandora_execute_alert (I<$pa_config>, I<$data>, I<$agent>, I<$module>, I<$alert>, I<$alert_mode>, I<$dbh>, I<$timestamp>) >>
|
||||
=head2 C<< pandora_execute_alert (I<$pa_config>, I<$data>, I<$agent>, I<$module>, I<$alert>, I<$alert_mode>, I<$dbh>, I<$timestamp>, I<$forced_alert>) >>
|
||||
|
||||
Execute the given alert.
|
||||
|
||||
=cut
|
||||
##########################################################################
|
||||
sub pandora_execute_alert ($$$$$$$$;$) {
|
||||
sub pandora_execute_alert ($$$$$$$$$;$) {
|
||||
my ($pa_config, $data, $agent, $module,
|
||||
$alert, $alert_mode, $dbh, $timestamp, $extra_macros) = @_;
|
||||
$alert, $alert_mode, $dbh, $timestamp, $forced_alert, $extra_macros) = @_;
|
||||
|
||||
# Alerts in stand-by are not executed
|
||||
if ($alert->{'standby'} == 1) {
|
||||
|
@ -667,18 +667,31 @@ sub pandora_execute_alert ($$$$$$$$;$) {
|
|||
$alert->{'id_template_module'}, $alert->{'times_fired'});
|
||||
} else {
|
||||
# Avoid the use of alias bigger than 30 characters.
|
||||
@actions = get_db_rows ($dbh,
|
||||
'SELECT taa.*, tac.*, tatma.id AS id_alert_templ_module_actions,
|
||||
tatma.id_alert_template_module, tatma.id_alert_action, tatma.fires_min,
|
||||
tatma.fires_max, tatma.module_action_threshold, tatma.last_execution
|
||||
FROM talert_template_module_actions tatma, talert_actions taa, talert_commands tac
|
||||
WHERE tatma.id_alert_action = taa.id
|
||||
AND taa.id_alert_command = tac.id
|
||||
AND tatma.id_alert_template_module = ?
|
||||
AND ((fires_min = 0 AND fires_max = 0)
|
||||
OR (fires_min <= fires_max AND ? >= fires_min AND ? <= fires_max)
|
||||
OR (fires_min > fires_max AND ? >= fires_min))',
|
||||
$alert->{'id_template_module'}, $alert->{'times_fired'}, $alert->{'times_fired'}, $alert->{'times_fired'});
|
||||
if ($forced_alert){
|
||||
@actions = get_db_rows ($dbh,
|
||||
'SELECT taa.*, tac.*, tatma.id AS id_alert_templ_module_actions,
|
||||
tatma.id_alert_template_module, tatma.id_alert_action, tatma.fires_min,
|
||||
tatma.fires_max, tatma.module_action_threshold, tatma.last_execution
|
||||
FROM talert_template_module_actions tatma, talert_actions taa, talert_commands tac
|
||||
WHERE tatma.id_alert_action = taa.id
|
||||
AND taa.id_alert_command = tac.id
|
||||
AND tatma.id_alert_template_module = ?',
|
||||
$alert->{'id_template_module'});
|
||||
|
||||
} else {
|
||||
@actions = get_db_rows ($dbh,
|
||||
'SELECT taa.*, tac.*, tatma.id AS id_alert_templ_module_actions,
|
||||
tatma.id_alert_template_module, tatma.id_alert_action, tatma.fires_min,
|
||||
tatma.fires_max, tatma.module_action_threshold, tatma.last_execution
|
||||
FROM talert_template_module_actions tatma, talert_actions taa, talert_commands tac
|
||||
WHERE tatma.id_alert_action = taa.id
|
||||
AND taa.id_alert_command = tac.id
|
||||
AND tatma.id_alert_template_module = ?
|
||||
AND ((fires_min = 0 AND fires_max = 0)
|
||||
OR (fires_min <= fires_max AND ? >= fires_min AND ? <= fires_max)
|
||||
OR (fires_min > fires_max AND ? >= fires_min))',
|
||||
$alert->{'id_template_module'}, $alert->{'times_fired'}, $alert->{'times_fired'}, $alert->{'times_fired'});
|
||||
}
|
||||
}
|
||||
|
||||
# Get default action
|
||||
|
@ -3018,7 +3031,7 @@ sub pandora_exec_forced_alerts {
|
|||
next;
|
||||
}
|
||||
|
||||
pandora_execute_alert ($pa_config, 'N/A', $agent, $module, $alert, 1, $dbh, undef);
|
||||
pandora_execute_alert ($pa_config, 'N/A', $agent, $module, $alert, 1, $dbh, undef, 1, undef);
|
||||
|
||||
# Reset the force_execution flag, even if the alert could not be executed
|
||||
db_do ($dbh, "UPDATE talert_template_modules SET force_execution = 0 WHERE id = " . $alert->{'id_template_module'});
|
||||
|
|
|
@ -581,12 +581,20 @@ sub enterprise_load ($) {
|
|||
if ($^O eq 'MSWin32') {
|
||||
# If the Windows service dies the service is stopped, even inside an eval ($RUN is set to 0)!
|
||||
eval 'local $SIG{__DIE__}; require PandoraFMS::Enterprise;';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
eval 'require PandoraFMS::Enterprise;';
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Ops
|
||||
return 0 if ($@);
|
||||
if ($@) {
|
||||
open (STDERR, ">> " . $pa_config->{'errorlogfile'});
|
||||
print STDERR $@;
|
||||
close (STDERR);
|
||||
return 0;
|
||||
}
|
||||
|
||||
# Initialize the enterprise module.
|
||||
PandoraFMS::Enterprise::init($pa_config);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 6.0dev
|
||||
%define release 150706
|
||||
%define release 150707
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 6.0dev
|
||||
%define release 150706
|
||||
%define release 150707
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -33,7 +33,7 @@ use PandoraFMS::Tools;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "6.0dev PS150706";
|
||||
my $version = "6.0dev PS150707";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
|
|
@ -35,7 +35,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "6.0dev PS150706";
|
||||
my $version = "6.0dev PS150707";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|
Loading…
Reference in New Issue