defines.php

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

Generated on Sat Jul 8 09:39:14 2006 for TinyMON by  doxygen 1.4.6