Fichier de configuration de PHP-Syslog-NG
De PedroWiki
define('PAGETITLE', 'Php-Syslog-NG' ); define('VERSION', '2.9.8'); define('COUNT_ROWS', TRUE); define('DEFAULTLOGTABLE', 'logs'); define('MERGELOGTABLE', 'all_logs'); define('USETABLE', DEFAULTLOGTABLE); // This tells the main page to calculate hostcount based on "all_logs" or "logs" define('LOGROTATERETENTION', 30); define('DBUSER', 'sysloguser'); define('DBUSERPW', '*********'); define('DBADMIN', 'syslogadmin'); define('DBADMINPW', '*********'); define('DBNAME', 'syslog'); define('DBHOST', 'localhost'); define('DBPORT', '3306'); define('REQUIRE_AUTH', TRUE); define('AUTHTABLENAME', 'users'); define('RENEW_SESSION_ON_EACH_PAGE', TRUE); define('SESSION_EXP_TIME', '3600'); define('TAIL_REFRESH_SECONDS', '25'); define('USE_ACL', TRUE); define('USER_ACCESS_TABLE', 'user_access'); define('ACTION_TABLE', 'actions'); define('USE_CACHE', TRUE); define('CACHETABLENAME', 'search_cache'); define('SITEADMIN', 'admin'); define('SITENAME', 'INSA - Logs Centralisés'); define('ADMINEMAIL', 'cri-systeme@insa-rennes.fr'); define('CEMDB', 'OFF'); define('CISCO_ERROR_TABLE', 'cemdb'); define('DEBUG', '0'); define('SITEURL', '/'); $regExpArray = array( // "username"=>"(^\w{4,}\$)", // Cdukes - 05/10/08: Modified username to allow email address as username // This is an enhancement change for // http://code.google.com/p/php-syslog-ng/issues/detail?id=62 "username" => "(^[A-Za-z_.@]{4,}\$)", "password"=>"(^.{4,}\$)", "pageId"=>"(^\w+$)", "sessionId"=>"(^\w{32}\$)", "date"=>"/^yesterday$|^today$|^now$|^(\d){4}-([01]*\d)-([0123]*\d)$/i", "time"=>"/^now$|^([012]*\d):([012345]*\d):([012345]*\d)$/i", "limit"=>"(^\d+$)", "topx"=>"(^\d+$)", // BPK added program to orderby filter "orderby"=>"/^seq$|^host$|^program$|^facility$|^priority$|^datetime$|^msg$|^fo$|^lo$|^counter$/i", "order"=>"/^asc$|^desc$/i", "offset"=>"(^\d+$)", "collapse"=>"/^1$/", "table"=>"(^\w+$)", "excludeX"=>"(^[01]$)", /* BEGIN: changes by BPK to allow for regexp matching, lists of hosts, and programs "host"=>"(^[\w-.]+$)", */ "regexpX"=>"(^[01]$)", "host"=>"(^([\w_.%-]+[,;]\s*)*[\w_.%-]+$)", "program"=>"(^([\w/_.%-]+[,;]\s*)*[\w/_.%-]+$)", "hostRegExp"=>"(^\S+$)", "programRegExp"=>"(^\S+$)", /* END: changes by BPK to allow for regexp matching, lists of hosts, and programs */ "facility"=>"(^\w+$)", "priority"=>"/^debug$|^info$|^notice$|^warning$|^err$|^crit$|^alert$|^emerg$/i", // Cdukes - 05/10/08: Below is an enhancement addition for SqueezeDB duplicate searching "dupop"=>"(^lt|gt|eq$)", "dupcount"=>"(^\d+$)", ); //------------------------------------------------------------------------ // CDUKES - BEGIN jpgraph Addon //------------------------------------------------------------------------ // Enable Graphing define('JPG_GRAPHS', 'ON'); // Make sure this directory exists and has write permission define('IMG_CACHE_DIR', 'jpcache/'); // Enable Daily Graph in dropdown on main page define('JPG_DAILY', 'ON'); // Enable Weekly Graph in dropdown on main page define('JPG_WEEKLY', 'ON'); // Enable Monthly Graph in dropdown on main page define('JPG_MONTHLY', 'ON'); // Enable Overall Statistics Graph on main page (This will slow down main page rendering) define('JPG_MAIN', 'OFF'); // Not implemented yet //------------------------------------------------------------------------ // CDUKES - END jpgraph Addon //------------------------------------------------------------------------ //------------------------------------------------------------------------ // CDUKES - Begin LDAP Addon //------------------------------------------------------------------------ define('LOGIN_URL', SITEURL . "login.php"); define('LOGOUT_URL', SITEURL . "logout.php"); define('INDEX_URL', SITEURL . "index.php"); define('LDAP_ENABLE', "NO"); define('LDAP_SRV', "ldap.company.com"); define('LDAP_BASE_DN', "ou=active, ou=employees, ou=people, o=company.com"); // variable to search for user (container name) - in my case, this is "uid", but normally it is "cn" define('LDAP_CN', "uid"); // if using MS Active Directory, put it to "sAMAccountName" // define('LDAP_CN', "sAMAccountName"); // Set to Yes if using MS Active Directory for Authentication define('LDAP_MSAD', "NO"); // Required when if LDAP_MSAD set to YES and using MS Active Directory, ex. mydomain.com define('LDAP_DOMAIN', "mydomain.com"); // privilege levels for editing records // (not implemented yet - this will be used to define RW and RO groups from LDAP) // use privilege level authentication for record editing? define ('LDAP_USEPRIV', 'OFF'); // if USEPRIV is enabled, what LDAP group name is the "privileged" group? define ('LDAP_RW_GROUP', 'admin'); define ('LDAP_RO_GROUP', 'users'); //------------------------------------------------------------------------ // CDUKES - END LDAP Addon //------------------------------------------------------------------------ //------------------------------------------------------------------------ // cdukes - I added this just in case someone felt generous // If you don't want it on the menu bar, just disable it here :-) //------------------------------------------------------------------------ define ('PAYPAL_ENABLE', 'YES'); //------------------------------------------------------------------------ // CDUKES - Just a simple addition for my demo site at http://php-syslog-ng.gdd.net //------------------------------------------------------------------------ define ('DEMO', FALSE); // Cdukes - 05/10/08: WEBBASIC_ENABLE // This is an enhancement change for // http://code.google.com/p/php-syslog-ng/issues/detail?id=62 define('WEBBASIC_ENABLE', FALSE); // Cdukes - 05/10/08: SQZ_ENABLED // This is an enhancement change for SqueezeDB functionality // http://code.google.com/p/php-syslog-ng/issues/detail?id=47 define('SQZ_ENABLED', FALSE);