defines.php

Go to the documentation of this file.
00001 <?php
00002 
00003 /** \file
00004  * Settings and constants for TinyMON
00005  */
00006 
00007 /* Debug settings */
00008 
00009 /** Debug mode : 1 will activate miscellaneous debugging features. */
00010 define ('DEBUG', 0) ;
00011 /** Auto-freeze mode : 1 will freeze display if an unknown event could not be handled. */
00012 define ('FREEZE_IF_NOT_HANDLED', 0) ;
00013 /** Demo mode : 1 will run TinyMON with a demo database. */
00014 define ('DEMO', 0) ;
00015 
00016 /* Asterisk settings */
00017 
00018 /** Asterisk host. */
00019 define ('AST_HOST', 'localhost') ;
00020 /** Asterisk Manager Interface TCP port (5038 usually). */
00021 define ('AST_PORT', 5038) ;
00022 /** Username for Asterisk Manager Interface.
00023  * This user must be defined in Asterisk manager.conf file. */
00024 define ('AST_USERNAME', '<your AMI username>') ;
00025 /** Password for Asterisk Manager Interface user. */
00026 define ('AST_PASSWORD', '<your AMI password>') ;
00027 
00028 /* Database settings */
00029 
00030 /** MySQL server host. */
00031 define ('DB_HOST', 'localhost') ;
00032 /** MySQL server port (3306 usually). */
00033 define ('DB_PORT', 3306) ;
00034 /** MySQL user for tinyman.pl and TinyMON.php.
00035  * This user must have read/write permissions on the tickets table. */
00036 define ('DB_USERNAME', '<your MySQL username>') ;
00037 /** Password for MySQL user. */
00038 define ('DB_PASSWORD', '<your MySQL password>') ;
00039 /** Database that hosts the tickets table ('test' database for instance). */
00040 define ('DB_DATABASE', 'test') ;
00041 /** Table that will contain the tickets.
00042  * Suggestion to create tickets table (you may choose different ENGINE and DEFAULT CHARSET) :
00043  *  CREATE TABLE `tickets` (
00044  *    `id` int(11) NOT NULL auto_increment,
00045  *    `datetime` datetime NOT NULL default '0000-00-00 00:00:00',
00046  *    `ticket` text NOT NULL,
00047  *    PRIMARY KEY (`id`)
00048  *  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
00049  * tinyman.pl may create it automatically if it has sufficient permissions.
00050  */
00051 define ('DB_TABLE', 'tickets') ;
00052 
00053 /* Monitoring utility settings */
00054 
00055 /** Location of tinyman.pl */
00056 define ('MON_APP', '/var/www/html/tinymon/tinyman.pl') ;
00057 /** Polling period for scheduled polling requests */
00058 define ('POLLING_PERIOD', 300) ;
00059 /** How long to keep tickets.
00060  * Don't set this value too short, because TinyMON needs a bit of historical
00061  * data to self-train about Asterisk devices. Example : 900 = 15 minutes. */
00062 define ('TICKETS_PURGE', 900) ;
00063 
00064 /* Misc settings : HTML page refresh, ... */
00065 
00066 /** Delay before the web browser will request a page refresh. */
00067 define ('REFRESH_MIN', 2) ;
00068 /** Maximum delay between 2 pages. */
00069 define ('REFRESH_MAX', 10) ;
00070 /** How many tickets maximum should be handled for one page refresh. */
00071 define ('TICKETS_PER_REFRESH_MAX', 1000) ;
00072 /** How long should we wait before we "forget" a call when we have no news. */
00073 define ('CALL_TIMEOUT', 3600) ;
00074 /** Display by default all new channels types (SIP, IAX2, MGCP and others). */
00075 define ('VIEW_BY_DEFAULT', 1) ;
00076 
00077 /* Internal data : images, icons and tooltips */
00078 
00079 define ('PATH_IMG', 'images/') ;
00080 define ('IMG_BLANK', PATH_IMG . 'blank_16_16.png') ;
00081 define ('IMG_SELECTED', PATH_IMG . 'ok_16.png') ;
00082 define ('IMG_NOT_SELECTED', PATH_IMG . 'stop_16.png') ;
00083 $ui['frozen'] = array (PATH_IMG . 'ktimer.png', 'Frozen') ;
00084 $ui['running'] = array (PATH_IMG . 'misc.png', 'Running') ;
00085 $ui['refresh'] = array (PATH_IMG . 'tool_resume.png', 'Refresh') ;
00086 $ui['freeze'] =  array (PATH_IMG . 'tool_pause.png',  'Freeze') ;
00087 $status['unknown'] = array(PATH_IMG . 'ledpurple.png', 'Unknown') ;
00088 $status['alarm'] = array(PATH_IMG . 'ledred.png', 'Offline') ;
00089 $status['offline'] = array(PATH_IMG . 'ledgrey.png', 'Offline') ;
00090 $status['online'] = array(PATH_IMG . 'ledblue.png', 'Online') ;
00091 $status['ringing'] = array(PATH_IMG . 'ledorange.png', 'Active') ;
00092 $status['active'] = array(PATH_IMG . 'ledgreen.png', 'Active') ;
00093 
00094 /* Internal data : constants */
00095 define ('UPDATE', 1) ;
00096 define ('DELETE', 0) ;
00097 
00098 ?>

Generated on Sat Apr 1 18:43:45 2006 for TinyMON by  doxygen 1.4.6