Added condition type not normal in alert templates
Former-commit-id: c2028e4c64e4126768f33f73edb93b39fdf6a79d
This commit is contained in:
parent
273a475238
commit
c075d5caad
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
START TRANSACTION;
|
||||||
|
|
||||||
|
ALTER TABLE `talert_templates` MODIFY COLUMN `type` ENUM('regex','max_min','max','min','equal','not_equal','warning','critical','onchange','unknown','always','not_normal');
|
||||||
|
|
||||||
|
COMMIT;
|
|
@ -1216,13 +1216,13 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned;
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 27);
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 28);
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
|
||||||
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
|
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
|
||||||
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
|
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '734');
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '735');
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp');
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp');
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
|
@ -2103,3 +2103,9 @@ ALTER TABLE `tnetflow_filter` DROP COLUMN `output`;
|
||||||
-- Update table `tuser_task`
|
-- Update table `tuser_task`
|
||||||
-- ----------------------------------------------------------------------
|
-- ----------------------------------------------------------------------
|
||||||
UPDATE tuser_task set parameters = 'a:5:{i:0;a:6:{s:11:\"description\";s:28:\"Report pending to be created\";s:5:\"table\";s:7:\"treport\";s:8:\"field_id\";s:9:\"id_report\";s:10:\"field_name\";s:4:\"name\";s:4:\"type\";s:3:\"int\";s:9:\"acl_group\";s:8:\"id_group\";}i:1;a:2:{s:11:\"description\";s:46:\"Send to email addresses (separated by a comma)\";s:4:\"type\";s:4:\"text\";}i:2;a:2:{s:11:\"description\";s:7:\"Subject\";s:8:\"optional\";i:1;}i:3;a:3:{s:11:\"description\";s:7:\"Message\";s:4:\"type\";s:4:\"text\";s:8:\"optional\";i:1;}i:4;a:2:{s:11:\"description\";s:11:\"Report Type\";s:4:\"type\";s:11:\"report_type\";}}' where function_name = "cron_task_generate_report";
|
UPDATE tuser_task set parameters = 'a:5:{i:0;a:6:{s:11:\"description\";s:28:\"Report pending to be created\";s:5:\"table\";s:7:\"treport\";s:8:\"field_id\";s:9:\"id_report\";s:10:\"field_name\";s:4:\"name\";s:4:\"type\";s:3:\"int\";s:9:\"acl_group\";s:8:\"id_group\";}i:1;a:2:{s:11:\"description\";s:46:\"Send to email addresses (separated by a comma)\";s:4:\"type\";s:4:\"text\";}i:2;a:2:{s:11:\"description\";s:7:\"Subject\";s:8:\"optional\";i:1;}i:3;a:3:{s:11:\"description\";s:7:\"Message\";s:4:\"type\";s:4:\"text\";s:8:\"optional\";i:1;}i:4;a:2:{s:11:\"description\";s:11:\"Report Type\";s:4:\"type\";s:11:\"report_type\";}}' where function_name = "cron_task_generate_report";
|
||||||
|
|
||||||
|
-- ----------------------------------------------------------------------
|
||||||
|
-- Alter table `talert_templates`
|
||||||
|
-- ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
ALTER TABLE `talert_templates` MODIFY COLUMN `type` ENUM('regex','max_min','max','min','equal','not_equal','warning','critical','onchange','unknown','always','not_normal');
|
||||||
|
|
|
@ -186,6 +186,10 @@ switch ($template['type']) {
|
||||||
$condition = __('The alert would fire when the module is in critical status');
|
$condition = __('The alert would fire when the module is in critical status');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'not_normal':
|
||||||
|
$condition = __('The alert would fire when the module is in not normal status');
|
||||||
|
break;
|
||||||
|
|
||||||
case 'unknown':
|
case 'unknown':
|
||||||
$condition = __('The alert would fire when the module is in unknown status');
|
$condition = __('The alert would fire when the module is in unknown status');
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -679,7 +679,7 @@ if ($step == 2) {
|
||||||
'type',
|
'type',
|
||||||
$type,
|
$type,
|
||||||
'',
|
'',
|
||||||
__('Select'),
|
__('None'),
|
||||||
0,
|
0,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
|
@ -1018,6 +1018,7 @@ var onchange_msg = <?php echo '"'.__('The alert would fire when the module value
|
||||||
var onchange_not = <?php echo '"'.__('The alert would fire when the module value does not change').'"'; ?>;
|
var onchange_not = <?php echo '"'.__('The alert would fire when the module value does not change').'"'; ?>;
|
||||||
var unknown = <?php echo "'".__('The alert would fire when the module is in unknown status')."'"; ?>;
|
var unknown = <?php echo "'".__('The alert would fire when the module is in unknown status')."'"; ?>;
|
||||||
var error_message_min_max_zero = <?php echo "'".__('The alert template cannot have the same value for min and max thresholds.')."'"; ?>;
|
var error_message_min_max_zero = <?php echo "'".__('The alert template cannot have the same value for min and max thresholds.')."'"; ?>;
|
||||||
|
var not_normal = <?php echo "'".__('The alert would fire when the module is in not normal status')."'"; ?>;
|
||||||
|
|
||||||
function check_fields_step2() {
|
function check_fields_step2() {
|
||||||
var correct = true;
|
var correct = true;
|
||||||
|
@ -1174,6 +1175,13 @@ if ($step == 2) {
|
||||||
/* Show example */
|
/* Show example */
|
||||||
$("span#example").empty ().append (critical);
|
$("span#example").empty ().append (critical);
|
||||||
break;
|
break;
|
||||||
|
case "not_normal":
|
||||||
|
$("#template-value, #template-max, span#matches_value, #template-min").hide ();
|
||||||
|
$("#template-example").show ();
|
||||||
|
|
||||||
|
/* Show example */
|
||||||
|
$("span#example").empty ().append (not_normal);
|
||||||
|
break;
|
||||||
case "onchange":
|
case "onchange":
|
||||||
$("#template-value, #template-max, #template-min").hide ();
|
$("#template-value, #template-max, #template-min").hide ();
|
||||||
$("#template-example, span#matches_value").show ();
|
$("#template-example, span#matches_value").show ();
|
||||||
|
|
|
@ -664,6 +664,7 @@ function alerts_get_alert_templates_types()
|
||||||
$types['unknown'] = __('Unknown status');
|
$types['unknown'] = __('Unknown status');
|
||||||
$types['onchange'] = __('On Change');
|
$types['onchange'] = __('On Change');
|
||||||
$types['always'] = __('Always');
|
$types['always'] = __('Always');
|
||||||
|
$types['not_normal'] = __('Not normal status');
|
||||||
|
|
||||||
return $types;
|
return $types;
|
||||||
}
|
}
|
||||||
|
@ -680,7 +681,7 @@ function alerts_get_alert_templates_type_name($type)
|
||||||
{
|
{
|
||||||
$types = alerts_get_alert_templates_types();
|
$types = alerts_get_alert_templates_types();
|
||||||
|
|
||||||
if (! isset($type[$type])) {
|
if (!isset($types[$type])) {
|
||||||
return __('Unknown');
|
return __('Unknown');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -114,10 +114,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
||||||
('custom_report_front_logo', 'images/pandora_logo_white.jpg'),
|
('custom_report_front_logo', 'images/pandora_logo_white.jpg'),
|
||||||
('custom_report_front_header', ''),
|
('custom_report_front_header', ''),
|
||||||
('custom_report_front_footer', ''),
|
('custom_report_front_footer', ''),
|
||||||
('MR', 27),
|
('MR', 28),
|
||||||
('identification_reminder', 1),
|
('identification_reminder', 1),
|
||||||
('identification_reminder_timestamp', 0),
|
('identification_reminder_timestamp', 0),
|
||||||
('current_package_enterprise', '734'),
|
('current_package_enterprise', '735'),
|
||||||
('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'),
|
('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'),
|
||||||
('custom_docs_logo', 'default_docs.png'),
|
('custom_docs_logo', 'default_docs.png'),
|
||||||
('custom_support_logo', 'default_support.png'),
|
('custom_support_logo', 'default_support.png'),
|
||||||
|
|
Loading…
Reference in New Issue