2012-03-21 09:50:14 +01:00
|
|
|
<?php
|
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
|
|
|
// Copyright (c) 2005-2012 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 Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation; 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.
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @package Include
|
|
|
|
* @subpackage Constants
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Enterprise hook constant */
|
|
|
|
define ('ENTERPRISE_NOT_HOOK', -1);
|
|
|
|
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
|
2013-06-11 Miguel de Dios <miguel.dedios@artica.es>
* extensions/insert_data.php,
godmode/alerts/configure_alert_template.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/agentes/planned_downtime.editor.php,
include/ajax/module.php, include/constants.php, operation/tree.php,
operation/netflow/nf_live_view.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/agentes/datos_agente.php: fixed the date and time format
and set a help tip to say the Pandora's format.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8287 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-06-11 15:14:48 +02:00
|
|
|
/**/
|
|
|
|
define('DATE_FORMAT', 'Y/m/d');
|
|
|
|
define('DATE_FORMAT_JS', 'yy/mm/d');
|
|
|
|
define('TIME_FORMAT', 'H:i:s');
|
|
|
|
define('TIME_FORMAT_JS', 'HH:mm:ss');
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
|
2012-03-21 09:50:14 +01:00
|
|
|
/* Events state constants */
|
|
|
|
define ('EVENT_NEW', 0);
|
|
|
|
define ('EVENT_VALIDATE', 1);
|
|
|
|
define ('EVENT_PROCESS', 2);
|
|
|
|
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
|
|
|
|
|
2012-03-21 09:50:14 +01:00
|
|
|
/* Agents disabled status */
|
|
|
|
define ('AGENT_ENABLED',0);
|
|
|
|
define ('AGENT_DISABLED',1);
|
|
|
|
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
|
|
|
|
|
2012-03-21 09:50:14 +01:00
|
|
|
/* Error report codes */
|
2012-05-22 14:23:49 +02:00
|
|
|
define ('NOERR',11111);
|
2012-03-21 09:50:14 +01:00
|
|
|
define ('ERR_GENERIC',-10000);
|
|
|
|
define ('ERR_EXIST',-20000);
|
|
|
|
define ('ERR_INCOMPLETE', -30000);
|
|
|
|
define ('ERR_DB', -40000);
|
2012-05-22 14:23:49 +02:00
|
|
|
define ('ERR_DB_HOST', -40001);
|
|
|
|
define ('ERR_DB_DB', -40002);
|
2012-03-21 09:50:14 +01:00
|
|
|
define ('ERR_FILE', -50000);
|
|
|
|
define ('ERR_NOCHANGES', -60000);
|
2012-03-27 09:44:54 +02:00
|
|
|
define ('ERR_NODATA', -70000);
|
2012-05-30 17:20:50 +02:00
|
|
|
define ('ERR_CONNECTION', -80000);
|
2012-08-06 10:40:31 +02:00
|
|
|
define ('ERR_DISABLED', -90000);
|
2012-12-20 11:09:52 +01:00
|
|
|
define ('ERR_WRONG', -100000);
|
|
|
|
define ('ERR_WRONG_NAME', -100001);
|
2013-01-09 10:25:07 +01:00
|
|
|
define ('ERR_WRONG_PARAMETERS', -100002);
|
|
|
|
define ('ERR_ACL', -110000);
|
2012-03-21 09:50:14 +01:00
|
|
|
|
2012-10-11 19:49:17 +02:00
|
|
|
/* Event status code */
|
|
|
|
define ('EVENT_STATUS_NEW',0);
|
|
|
|
define ('EVENT_STATUS_INPROCESS',2);
|
|
|
|
define ('EVENT_STATUS_VALIDATED',1);
|
2012-03-21 09:50:14 +01:00
|
|
|
|
|
|
|
/* Seconds in a time unit constants */
|
2012-07-10 Miguel de Dios <miguel.dedios@artica.es>
* include/constants.php: added more constants into the constants
block of time conversion to seconds.
* godmode/alerts/alert_commands.php, godmode/setup/performance.php,
include/help/en/help_date_format.php, include/functions_netflow.php,
include/functions_tags.php, include/graphs/functions_pchart.php,
include/functions_modules.php, extensions/agents_modules.php,
extensions/update_manager.php, extensions/resource_exportation.php,
extensions/module_groups.php,
extensions/update_manager/lib/libupdate_manager_client.php,
extensions/system_info.php, operation/events/events_rss.php,
operation/events/export_csv.php, mobile/operation/events/events.php,
mobile/include/system.class.php: used the new constants time instead
the magic numbers, and cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6762 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-10 15:31:34 +02:00
|
|
|
define('SECONDS_1MINUTE', 60);
|
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php,
godmode/servers/manage_recontask_form.php,
include/functions_filemanager.php, include/functions_networkmap.php,
include/constants.php, include/graphs/functions_gd.php,
include/graphs/functions_pchart.php,
operation/events/events_list.php, operation/agentes/graphs.php,
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php,
operation/gis_maps/render_view.php: cleaned source code style and
change magic numbers for time constants.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-13 12:59:40 +02:00
|
|
|
define('SECONDS_2MINUTES', 120);
|
2012-07-10 Miguel de Dios <miguel.dedios@artica.es>
* include/constants.php: added more constants into the constants
block of time conversion to seconds.
* godmode/alerts/alert_commands.php, godmode/setup/performance.php,
include/help/en/help_date_format.php, include/functions_netflow.php,
include/functions_tags.php, include/graphs/functions_pchart.php,
include/functions_modules.php, extensions/agents_modules.php,
extensions/update_manager.php, extensions/resource_exportation.php,
extensions/module_groups.php,
extensions/update_manager/lib/libupdate_manager_client.php,
extensions/system_info.php, operation/events/events_rss.php,
operation/events/export_csv.php, mobile/operation/events/events.php,
mobile/include/system.class.php: used the new constants time instead
the magic numbers, and cleaned source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6762 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-10 15:31:34 +02:00
|
|
|
define('SECONDS_5MINUTES', 300);
|
|
|
|
define('SECONDS_10MINUTES', 600);
|
|
|
|
define('SECONDS_15MINUTES', 900);
|
|
|
|
define('SECONDS_30MINUTES', 1800);
|
|
|
|
define('SECONDS_1HOUR', 3600);
|
|
|
|
define('SECONDS_2HOUR', 7200);
|
|
|
|
define('SECONDS_3HOUR', 10800);
|
|
|
|
define('SECONDS_5HOUR', 18000);
|
|
|
|
define('SECONDS_6HOURS', 21600);
|
|
|
|
define('SECONDS_12HOURS', 43200);
|
|
|
|
define('SECONDS_1DAY', 86400);
|
|
|
|
define('SECONDS_2DAY', 172800);
|
|
|
|
define('SECONDS_4DAY', 345600);
|
|
|
|
define('SECONDS_5DAY', 432000);
|
|
|
|
define('SECONDS_1WEEK', 604800);
|
|
|
|
define('SECONDS_10DAY', 864000);
|
|
|
|
define('SECONDS_2WEEK', 1209600);
|
|
|
|
define('SECONDS_15DAYS', 1296000);
|
|
|
|
define('SECONDS_1MONTH', 2592000);
|
|
|
|
define('SECONDS_2MONTHS', 5184000);
|
|
|
|
define('SECONDS_3MONTHS', 7776000);
|
|
|
|
define('SECONDS_6MONTHS', 15552000);
|
|
|
|
define('SECONDS_1YEAR', 31104000);
|
|
|
|
define('SECONDS_2YEARS', 62208000);
|
|
|
|
define('SECONDS_3YEARS', 93312000);
|
2012-03-21 09:50:14 +01:00
|
|
|
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
|
|
|
|
|
2012-03-27 09:44:54 +02:00
|
|
|
/* Separator constats */
|
|
|
|
define('SEPARATOR_COLUMN', ';');
|
|
|
|
define('SEPARATOR_ROW', chr(10)); //chr(10) = '\n'
|
|
|
|
define('SEPARATOR_COLUMN_CSV', "#");
|
|
|
|
define('SEPARATOR_ROW_CSV', "@\n");
|
|
|
|
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
|
|
|
|
|
2012-05-03 13:29:04 +02:00
|
|
|
/* Backup paths */
|
|
|
|
switch ($config["dbtype"]) {
|
|
|
|
case "mysql":
|
|
|
|
case "postgresql":
|
|
|
|
define ('BACKUP_DIR', 'attachment/backups');
|
|
|
|
define ('BACKUP_FULLPATH', $config['homedir'] . '/' . BACKUP_DIR);
|
|
|
|
break;
|
|
|
|
case "oracle":
|
2012-09-13 19:47:21 +02:00
|
|
|
define ('BACKUP_DIR', 'DATA_PUMP_DIR');
|
2012-05-03 13:29:04 +02:00
|
|
|
define ('BACKUP_FULLPATH', 'DATA_PUMP_DIR');
|
|
|
|
break;
|
|
|
|
}
|
2012-05-16 16:52:49 +02:00
|
|
|
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
|
|
|
|
|
2012-05-16 16:52:49 +02:00
|
|
|
/* Color constants */
|
Changes some bad colors and others aesthetic changes. Thanks Carla.
2014-09-04 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/extensions/module_groups.php,
pandora_console/general/login_help_dialog.php,
pandora_console/images/close_button_dialog.png,
pandora_console/images/documentation.png,
pandora_console/images/enterprise_version.png,
pandora_console/images/error_login.png,
pandora_console/images/online_help.png,
pandora_console/images/support.png,
pandora_console/include/ajax/events.php,
pandora_console/include/constants.php,
pandora_console/include/functions_events.php,
pandora_console/include/javascript/pandora_events.js,
pandora_console/include/styles/jquery-ui-1.10.0.custom.css,
pandora_console/include/styles/pandora.css,
pandora_console/mobile/include/style/main.css,
pandora_console/operation/events/events_list.php: changes some
bad colors and others aesthetic changes. Thanks Carla.
2014-09-04 12:19:55 +02:00
|
|
|
define('COL_CRITICAL','#f85858');
|
|
|
|
define('COL_WARNING','#ffea59');
|
2013-02-25 17:44:26 +01:00
|
|
|
define('COL_WARNING_DARK','#FFB900');
|
2013-05-20 10:42:02 +02:00
|
|
|
define('COL_NORMAL','#6EB432');
|
2012-11-08 08:42:11 +01:00
|
|
|
define('COL_NOTINIT','#3BA0FF');
|
|
|
|
define('COL_UNKNOWN','#AAAAAA');
|
|
|
|
define('COL_ALERTFIRED','#FF8800');
|
2014-06-04 16:05:20 +02:00
|
|
|
define('COL_MINOR','#F099A2');
|
2013-03-01 14:22:29 +01:00
|
|
|
define('COL_MAJOR','#C97A4A');
|
|
|
|
define('COL_INFORMATIONAL','#E4E4E4');
|
|
|
|
define('COL_MAINTENANCE','#3BA0FF');
|
2012-06-13 20:01:43 +02:00
|
|
|
|
2013-11-06 11:32:41 +01:00
|
|
|
define('COL_GRAPH1', '#C397F2');
|
|
|
|
define('COL_GRAPH2', '#FFE66C');
|
|
|
|
define('COL_GRAPH3', '#92CCA3');
|
|
|
|
define('COL_GRAPH4', '#EA6D5B');
|
|
|
|
define('COL_GRAPH5', '#6BD8DD');
|
|
|
|
define('COL_GRAPH6', '#F49B31');
|
|
|
|
define('COL_GRAPH7', '#999999');
|
|
|
|
define('COL_GRAPH8', '#F2B8C1');
|
2014-01-30 11:44:54 +01:00
|
|
|
define('COL_GRAPH9', '#C4E8C1');
|
|
|
|
define('COL_GRAPH10', '#C1DBE5');
|
|
|
|
define('COL_GRAPH11', '#C9C1e0');
|
|
|
|
define('COL_GRAPH12', '#F45B95');
|
|
|
|
define('COL_GRAPH13', '#E83128');
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
|
|
|
|
|
2012-06-13 20:01:43 +02:00
|
|
|
/* The styles */
|
|
|
|
/* Size of text in characters for truncate */
|
|
|
|
define('GENERIC_SIZE_TEXT', 25);
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-10 13:37:14 +02:00
|
|
|
/* Agent module status */
|
|
|
|
define('AGENT_MODULE_STATUS_CRITICAL_BAD', 1);
|
2013-02-14 13:55:53 +01:00
|
|
|
define('AGENT_MODULE_STATUS_CRITICAL_ALERT', 100);
|
|
|
|
define('AGENT_MODULE_STATUS_NO_DATA', 4);
|
2012-07-10 13:37:14 +02:00
|
|
|
define('AGENT_MODULE_STATUS_NORMAL', 0);
|
2014-03-20 Miguel de Dios <miguel.dedios@artica.es>
* images/group_green.disabled.png, images/group_green.png,
extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
godmode/agentes/configurar_agente.php, include/styles/pandora.css,
include/functions_networkmap.php, include/functions_agents.php,
include/functions_visual_map_editor.php,
include/functions_modules.php, include/functions_groups.php,
include/constants.php, include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: added the feature to
show the item for groups in visualmap.
Incident: #671
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9621 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-03-20 17:43:42 +01:00
|
|
|
define('AGENT_MODULE_STATUS_NORMAL_ALERT', 300);
|
2013-03-26 18:15:49 +01:00
|
|
|
define('AGENT_MODULE_STATUS_NOT_NORMAL', 6);
|
2012-07-10 13:37:14 +02:00
|
|
|
define('AGENT_MODULE_STATUS_WARNING', 2);
|
2014-02-07 12:29:20 +01:00
|
|
|
define('AGENT_MODULE_STATUS_WARNING_ALERT', 200);
|
2013-07-24 13:06:24 +02:00
|
|
|
define('AGENT_MODULE_STATUS_UNKNOWN', 3);
|
2013-03-04 16:32:43 +01:00
|
|
|
define('AGENT_MODULE_STATUS_NOT_INIT', 5);
|
2012-07-10 13:37:14 +02:00
|
|
|
|
2014-03-20 Miguel de Dios <miguel.dedios@artica.es>
* images/group_green.disabled.png, images/group_green.png,
extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
godmode/agentes/configurar_agente.php, include/styles/pandora.css,
include/functions_networkmap.php, include/functions_agents.php,
include/functions_visual_map_editor.php,
include/functions_modules.php, include/functions_groups.php,
include/constants.php, include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: added the feature to
show the item for groups in visualmap.
Incident: #671
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9621 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-03-20 17:43:42 +01:00
|
|
|
/* Agent status */
|
2013-06-05 16:36:13 +02:00
|
|
|
define('AGENT_STATUS_ALL', -1);
|
|
|
|
define('AGENT_STATUS_CRITICAL', 1);
|
|
|
|
define('AGENT_STATUS_NORMAL', 0);
|
|
|
|
define('AGENT_STATUS_NOT_INIT', 5);
|
|
|
|
define('AGENT_STATUS_NOT_NORMAL', 6);
|
2013-07-24 13:06:24 +02:00
|
|
|
define('AGENT_STATUS_UNKNOWN', 3);
|
2013-07-16 11:09:50 +02:00
|
|
|
define('AGENT_STATUS_ALERT_FIRED', 4);
|
2013-06-05 16:36:13 +02:00
|
|
|
define('AGENT_STATUS_WARNING', 2);
|
2012-07-10 13:37:14 +02:00
|
|
|
|
2013-07-30 17:02:07 +02:00
|
|
|
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
/* Visual maps contants */
|
|
|
|
//The items kind
|
|
|
|
define('STATIC_GRAPH', 0);
|
|
|
|
define('PERCENTILE_BAR', 3);
|
|
|
|
define('MODULE_GRAPH', 1);
|
|
|
|
define('SIMPLE_VALUE', 2);
|
|
|
|
define('LABEL', 4);
|
|
|
|
define('ICON', 5);
|
|
|
|
define('SIMPLE_VALUE_MAX', 6);
|
|
|
|
define('SIMPLE_VALUE_MIN', 7);
|
|
|
|
define('SIMPLE_VALUE_AVG', 8);
|
|
|
|
define('PERCENTILE_BUBBLE', 9);
|
|
|
|
define('SERVICE', 10); //Enterprise Item.
|
2014-03-20 Miguel de Dios <miguel.dedios@artica.es>
* images/group_green.disabled.png, images/group_green.png,
extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
godmode/reporting/visual_console_builder.editor.js,
godmode/agentes/configurar_agente.php, include/styles/pandora.css,
include/functions_networkmap.php, include/functions_agents.php,
include/functions_visual_map_editor.php,
include/functions_modules.php, include/functions_groups.php,
include/constants.php, include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: added the feature to
show the item for groups in visualmap.
Incident: #671
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9621 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-03-20 17:43:42 +01:00
|
|
|
define('GROUP_ITEM', 11);
|
2012-07-03 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: added support for the enterprise, because some case
this file can't call enterprise functions.
* godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php (delete),
include/functions_visual_map_editor.php,
include/ajax/visual_console_builder.ajax.php,
include/functions_visual_map.php: some parts of code had been
refactored because it is necesary for to add enterprise feature to
Visual map.
* include/constants.php: cleaned source code style and added and
reordened the constants for visual maps.
* include/functions_html.php, include/styles/pandora.css,
include/functions_ui.php, include/functions.php, index.php: cleaned
source code style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-03 17:39:37 +02:00
|
|
|
//Some styles
|
|
|
|
define('MIN_WIDTH',300);
|
|
|
|
define('MIN_HEIGHT',120);
|
|
|
|
define('MIN_WIDTH_CAPTION',420);
|
|
|
|
//The process for simple value
|
|
|
|
define('PROCESS_VALUE_NONE', 0);
|
|
|
|
define('PROCESS_VALUE_MIN', 1);
|
|
|
|
define('PROCESS_VALUE_MAX', 2);
|
|
|
|
define('PROCESS_VALUE_AVG', 3);
|
2012-07-06 13:45:02 +02:00
|
|
|
//Status
|
|
|
|
define('VISUAL_MAP_STATUS_CRITICAL_BAD', 1);
|
|
|
|
define('VISUAL_MAP_STATUS_CRITICAL_ALERT', 4);
|
|
|
|
define('VISUAL_MAP_STATUS_NORMAL', 0);
|
|
|
|
define('VISUAL_MAP_STATUS_WARNING', 2);
|
2013-07-24 13:06:24 +02:00
|
|
|
define('VISUAL_MAP_STATUS_UNKNOWN', 3);
|
2013-01-15 11:09:37 +01:00
|
|
|
define('VISUAL_MAP_STATUS_WARNING_ALERT', 10);
|
2014-03-21 15:12:47 +01:00
|
|
|
//Wizard
|
|
|
|
define('VISUAL_MAP_WIZARD_PARENTS_NONE', 0);
|
|
|
|
define('VISUAL_MAP_WIZARD_PARENTS_ITEM_MAP', 1);
|
|
|
|
define('VISUAL_MAP_WIZARD_PARENTS_AGENT_RELANTIONSHIP', 2);
|
2012-07-06 13:45:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Service constants */
|
|
|
|
//Status
|
2013-07-24 13:06:24 +02:00
|
|
|
define('SERVICE_STATUS_UNKNOWN', -1);
|
2012-07-06 13:45:02 +02:00
|
|
|
define('SERVICE_STATUS_NORMAL', 0);
|
|
|
|
define('SERVICE_STATUS_CRITICAL', 1);
|
|
|
|
define('SERVICE_STATUS_WARNING', 2);
|
2014-03-21 15:53:43 +01:00
|
|
|
define('SERVICE_STATUS_ALERT', 4);
|
2012-07-18 15:25:51 +02:00
|
|
|
//Default weights
|
|
|
|
define('SERVICE_WEIGHT_CRITICAL', 1);
|
|
|
|
define('SERVICE_WEIGHT_WARNING', 0.5);
|
|
|
|
define('SERVICE_ELEMENT_WEIGHT_CRITICAL', 1);
|
|
|
|
define('SERVICE_ELEMENT_WEIGHT_WARNING', 0.5);
|
|
|
|
define('SERVICE_ELEMENT_WEIGHT_OK', 0);
|
2013-01-09 14:23:51 +01:00
|
|
|
define('SERVICE_ELEMENT_WEIGHT_UNKNOWN', 0);
|
2014-08-27 19:09:07 +02:00
|
|
|
//Modes
|
|
|
|
define('SERVICE_MODE_MANUAL', 0);
|
|
|
|
define('SERVICE_MODE_AUTO', 1);
|
|
|
|
define('SERVICE_MODE_SIMPLE', 2);
|
2012-07-10 13:37:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* Status images */
|
|
|
|
//For modules
|
|
|
|
define ('STATUS_MODULE_OK', 'module_ok.png');
|
|
|
|
define ('STATUS_MODULE_CRITICAL', 'module_critical.png');
|
|
|
|
define ('STATUS_MODULE_WARNING', 'module_warning.png');
|
|
|
|
define ('STATUS_MODULE_NO_DATA', 'module_no_data.png');
|
|
|
|
define ('STATUS_MODULE_UNKNOWN', 'module_unknown.png');
|
|
|
|
//For agents
|
|
|
|
define ('STATUS_AGENT_CRITICAL', 'agent_critical.png');
|
|
|
|
define ('STATUS_AGENT_WARNING', 'agent_warning.png');
|
|
|
|
define ('STATUS_AGENT_DOWN', 'agent_down.png');
|
2013-04-10 09:57:54 +02:00
|
|
|
define ('STATUS_AGENT_UNKNOWN', 'agent_unknown.png');
|
2012-07-10 13:37:14 +02:00
|
|
|
define ('STATUS_AGENT_OK', 'agent_ok.png');
|
|
|
|
define ('STATUS_AGENT_NO_DATA', 'agent_no_data.png');
|
2012-07-16 15:48:59 +02:00
|
|
|
define ('STATUS_AGENT_NO_MONITORS', 'agent_no_monitors.png');
|
2013-05-23 17:42:32 +02:00
|
|
|
define ('STATUS_AGENT_NOT_INIT', 'agent_notinit.png');
|
2012-07-10 13:37:14 +02:00
|
|
|
//For alerts
|
|
|
|
define ('STATUS_ALERT_FIRED', 'alert_fired.png');
|
|
|
|
define ('STATUS_ALERT_NOT_FIRED', 'alert_not_fired.png');
|
|
|
|
define ('STATUS_ALERT_DISABLED', 'alert_disabled.png');
|
|
|
|
//For servers
|
|
|
|
define ('STATUS_SERVER_OK', 'server_ok.png');
|
|
|
|
define ('STATUS_SERVER_DOWN', 'server_down.png');
|
2013-01-15 12:12:35 +01:00
|
|
|
|
2013-01-30 14:53:02 +01:00
|
|
|
|
|
|
|
|
2013-01-15 12:12:35 +01:00
|
|
|
/* Events criticity */
|
|
|
|
define ('EVENT_CRIT_MAINTENANCE', 0);
|
|
|
|
define ('EVENT_CRIT_INFORMATIONAL', 1);
|
|
|
|
define ('EVENT_CRIT_NORMAL', 2);
|
|
|
|
define ('EVENT_CRIT_MINOR', 5);
|
|
|
|
define ('EVENT_CRIT_WARNING', 3);
|
|
|
|
define ('EVENT_CRIT_MAJOR', 6);
|
|
|
|
define ('EVENT_CRIT_CRITICAL', 4);
|
|
|
|
define ('EVENT_CRIT_WARNING_OR_CRITICAL', 34);
|
|
|
|
define ('EVENT_CRIT_NOT_NORMAL', 20);
|
|
|
|
|
2013-01-30 14:53:02 +01:00
|
|
|
/* Id Module (more use in component)*/
|
2013-02-14 12:27:57 +01:00
|
|
|
define ('MODULE_DATA', 1);
|
2013-01-30 14:53:02 +01:00
|
|
|
define ('MODULE_NETWORK', 2);
|
2013-02-14 12:27:57 +01:00
|
|
|
define ('MODULE_SNMP', 2);
|
2013-01-30 14:53:02 +01:00
|
|
|
define ('MODULE_PLUGIN', 4);
|
2013-02-27 10:51:48 +01:00
|
|
|
define ('MODULE_PREDICTION', 5);
|
2013-02-14 12:27:57 +01:00
|
|
|
define ('MODULE_WMI', 6);
|
2013-01-30 14:53:02 +01:00
|
|
|
define ('MODULE_WEB', 7);
|
2013-02-14 16:03:07 +01:00
|
|
|
|
2013-07-30 16:10:05 +02:00
|
|
|
/* Type of Modules of Prediction */
|
|
|
|
define ('MODULE_PREDICTION_SERVICE', 2);
|
|
|
|
define ('MODULE_PREDICTION_SYNTHETIC', 3);
|
|
|
|
define ('MODULE_PREDICTION_NETFLOW', 4);
|
|
|
|
|
2013-02-14 16:03:07 +01:00
|
|
|
/* SNMP CONSTANTS */
|
2014-04-16 16:42:28 +02:00
|
|
|
define('SNMP_DIR_MIBS', "attachment/mibs");
|
2013-08-05 16:23:27 +02:00
|
|
|
define('SNMP_TRAP_TYPE_NONE', -1);
|
|
|
|
define('SNMP_TRAP_TYPE_COLD_START', 0);
|
|
|
|
define('SNMP_TRAP_TYPE_WARM_START', 1);
|
|
|
|
define('SNMP_TRAP_TYPE_LINK_DOWN', 2);
|
|
|
|
define('SNMP_TRAP_TYPE_LINK_UP', 3);
|
|
|
|
define('SNMP_TRAP_TYPE_AUTHENTICATION_FAILURE', 4);
|
|
|
|
define('SNMP_TRAP_TYPE_OTHER', 5);
|
2013-02-26 17:31:40 +01:00
|
|
|
|
|
|
|
/* PASSWORD POLICIES */
|
|
|
|
define('PASSSWORD_POLICIES_OK', 0);
|
|
|
|
define('PASSSWORD_POLICIES_FIRST_CHANGE', 1);
|
|
|
|
define('PASSSWORD_POLICIES_EXPIRED', 2);
|
2013-02-27 18:11:42 +01:00
|
|
|
|
|
|
|
/* SERVER TYPES */
|
2014-09-25 13:51:23 +02:00
|
|
|
define('SERVER_TYPE_DATA', 0);
|
|
|
|
define('SERVER_TYPE_NETWORK', 1);
|
|
|
|
define('SERVER_TYPE_SNMP', 2);
|
|
|
|
define('SERVER_TYPE_RECON', 3);
|
|
|
|
define('SERVER_TYPE_PLUGIN', 4);
|
|
|
|
define('SERVER_TYPE_PREDICTION', 5);
|
|
|
|
define('SERVER_TYPE_WMI', 6);
|
|
|
|
define('SERVER_TYPE_EXPORT', 7);
|
|
|
|
define('SERVER_TYPE_INVENTORY', 8);
|
|
|
|
define('SERVER_TYPE_WEB', 9);
|
|
|
|
define('SERVER_TYPE_EVENT', 10);
|
|
|
|
define('SERVER_TYPE_ENTERPRISE_ICMP', 11);
|
|
|
|
define('SERVER_TYPE_ENTERPRISE_SNMP', 12);
|
2013-03-04 15:31:30 +01:00
|
|
|
|
|
|
|
/* REPORTS */
|
|
|
|
define ('REPORT_TOP_N_MAX', 1);
|
|
|
|
define ('REPORT_TOP_N_MIN', 2);
|
|
|
|
define ('REPORT_TOP_N_AVG', 0);
|
|
|
|
|
|
|
|
define ('REPORT_TOP_N_ONLY_GRAPHS', 2);
|
|
|
|
define ('REPORT_TOP_N_SHOW_TABLE_GRAPS', 1);
|
|
|
|
define ('REPORT_TOP_N_ONLY_TABLE', 0);
|
2013-03-08 14:19:27 +01:00
|
|
|
|
|
|
|
define ('REPORT_EXCEPTION_CONDITION_EVERYTHING', 0);
|
|
|
|
define ('REPORT_EXCEPTION_CONDITION_GE', 1);
|
|
|
|
define ('REPORT_EXCEPTION_CONDITION_LE', 5);
|
|
|
|
define ('REPORT_EXCEPTION_CONDITION_L', 2);
|
|
|
|
define ('REPORT_EXCEPTION_CONDITION_G', 6);
|
|
|
|
define ('REPORT_EXCEPTION_CONDITION_E', 7);
|
|
|
|
define ('REPORT_EXCEPTION_CONDITION_NE', 8);
|
|
|
|
define ('REPORT_EXCEPTION_CONDITION_OK', 3);
|
|
|
|
define ('REPORT_EXCEPTION_CONDITION_NOT_OK', 4);
|
2013-07-25 13:50:55 +02:00
|
|
|
|
2014-01-22 13:52:43 +01:00
|
|
|
define ('REPORT_ITEM_ORDER_BY_AGENT_NAME', 3);
|
|
|
|
define ('REPORT_ITEM_ORDER_BY_ASCENDING', 2);
|
|
|
|
define ('REPORT_ITEM_ORDER_BY_DESCENDING', 1);
|
|
|
|
|
2013-07-25 13:50:55 +02:00
|
|
|
/* POLICIES */
|
|
|
|
|
|
|
|
define("POLICY_UPDATED", 0);
|
|
|
|
define("POLICY_PENDING_DATABASE", 1);
|
|
|
|
define("POLICY_PENDING_ALL", 2);
|
|
|
|
|
|
|
|
define("STATUS_IN_QUEUE_OUT", 0);
|
|
|
|
define("STATUS_IN_QUEUE_IN", 1);
|
|
|
|
define("STATUS_IN_QUEUE_APPLYING", 2);
|
|
|
|
|
|
|
|
define("MODULE_UNLINKED", 0);
|
|
|
|
define("MODULE_LINKED", 1);
|
|
|
|
define("MODULE_PENDING_UNLINK", 10);
|
|
|
|
define("MODULE_PENDING_LINK", 11);
|
|
|
|
|
2013-08-27 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
godmode/agentes/module_manager_editor.php,
godmode/agentes/module_manager_editor_common.php,
godmode/agentes/configurar_agente.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components.php,
include/functions_events.php, include/functions.php,
include/javascript/pandora_modules.js,
include/functions_network_components.php,
include/functions_modules.php, include/constants.php, pandoradb.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: first version of
disabled unknown events for modules, now it is implemented in
modules, massive operations and components, but it is necesary in
local component, policy, api, cli, pandora server and recond task.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8701 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-08-27 15:05:30 +02:00
|
|
|
/* EVENTS */
|
|
|
|
define("EVENTS_GOING_UNKNOWN" , 'going_unknown');
|
|
|
|
define("EVENTS_UNKNOWN", 'unknown');
|
|
|
|
define("EVENTS_ALERT_FIRED", 'alert_fired');
|
|
|
|
define("EVENTS_ALERT_RECOVERED", 'alert_recovered');
|
|
|
|
define("EVENTS_ALERT_CEASED", 'alert_ceased');
|
|
|
|
define("EVENTS_ALERT_MANUAL_VALIDATION", 'alert_manual_validation');
|
|
|
|
define("EVENTS_RECON_HOST_DETECTED", 'recon_host_detected');
|
|
|
|
define("EVENTS_SYSTEM", 'system');
|
|
|
|
define("EVENTS_ERROR", 'error');
|
|
|
|
define("EVENTS_NEW_AGENT", 'new_agent');
|
|
|
|
define("EVENTS_GOING_UP_WARNING", 'going_up_warning');
|
|
|
|
define("EVENTS_GOING_UP_CRITICAL", 'going_up_critical');
|
|
|
|
define("EVENTS_GOING_DOWN_WARNING", 'going_down_warning');
|
|
|
|
define("EVENTS_GOING_DOWN_NORMAL", 'going_down_normal');
|
|
|
|
define("EVENTS_GOING_DOWN_CRITICAL", 'going_down_critical');
|
|
|
|
define("EVENTS_GOING_UP_NORMAL", 'going_up_normal');
|
|
|
|
define("EVENTS_CONFIGURATION_CHANGE", 'configuration_change');
|
2014-05-27 16:31:53 +02:00
|
|
|
|
|
|
|
/* CUSTOM GRAPHS */
|
|
|
|
define("CUSTOM_GRAPH_AREA", 0);
|
|
|
|
define("CUSTOM_GRAPH_STACKED_AREA", 1);
|
|
|
|
define("CUSTOM_GRAPH_LINE", 2);
|
|
|
|
define("CUSTOM_GRAPH_STACKED_LINE", 3);
|
2014-09-10 16:11:36 +02:00
|
|
|
|
|
|
|
/* COLLECTIONS */
|
2014-10-08 12:59:45 +02:00
|
|
|
define("COLLECTION_PENDING_APPLY", 0);
|
|
|
|
define("COLLECTION_CORRECT", 1);
|
2014-09-10 16:11:36 +02:00
|
|
|
define("COLLECTION_ERROR_LOST_DIRECTORY", 2);
|
2013-11-06 11:32:41 +01:00
|
|
|
?>
|