Guest User

Untitled

a guest
Jun 28th, 2012
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.55 KB | None | 0 0
  1. <?php
  2. /*
  3. *********************************************************************
  4. * LogAnalyzer - http://loganalyzer.adiscon.com
  5. * -----------------------------------------------------------------
  6. * Main Configuration File
  7. *
  8. * -> Configuration need variables for the Database connection
  9. *
  10. * Copyright (C) 2008-2010 Adiscon GmbH.
  11. *
  12. * This file is part of LogAnalyzer.
  13. *
  14. * LogAnalyzer is free software: you can redistribute it and/or modify
  15. * it under the terms of the GNU General Public License as published by
  16. * the Free Software Foundation, either version 3 of the License, or
  17. * (at your option) any later version.
  18. *
  19. * LogAnalyzer is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU General Public License
  25. * along with LogAnalyzer. If not, see <http://www.gnu.org/licenses/>.
  26. *
  27. * A copy of the GPL can be found in the file "COPYING" in this
  28. * distribution.
  29. *
  30. * Adiscon LogAnalyzer is also available under a commercial license.
  31. * For details, contact [email protected] or visit
  32. * http://loganalyzer.adiscon.com/commercial
  33. *********************************************************************
  34. */
  35.  
  36. // --- Avoid directly accessing this file!
  37. if ( !defined('IN_PHPLOGCON') )
  38. {
  39. die('Hacking attempt');
  40. exit;
  41. }
  42. // ---
  43.  
  44. // --- UserDB options
  45. /* If UserDB is enabled, all options will and have to be configured in the database.
  46. * All Options below the UserDB options here will not be used, unless a setting
  47. * is missing in the database.
  48. */
  49. $CFG['UserDBEnabled'] = false;
  50. $CFG['UserDBServer'] = 'localhost';
  51. $CFG['UserDBPort'] = 3306;
  52. $CFG['UserDBName'] = 'loganalyzer';
  53. $CFG['UserDBPref'] = 'logcon_';
  54. $CFG['UserDBUser'] = 'root';
  55. $CFG['UserDBPass'] = '123456';
  56. $CFG['UserDBLoginRequired'] = false;
  57. // ---
  58.  
  59. // --- Misc Options
  60. $CFG['MiscShowDebugMsg'] = 0; // if enabled, you will get additional output on certain places
  61. $CFG['MiscDebugToSyslog'] = 0; // if enabled, debug messages from LogAnalyzer will be send to syslog on linux, and into the EventLog on Windows
  62. $CFG['MiscShowDebugGridCounter'] = 0; // Only for debugging purposes, will add a counter column into the grid!
  63. $CFG["MiscShowPageRenderStats"] = 1; // If enabled, you will see Pagerender Settings
  64. $CFG['MiscEnableGzipCompression'] = 1; // If enabled, LogAnalyzer will use gzip compression for output, we recommend
  65. // to have this option enabled, it will highly reduce bandwith usage.
  66. $CFG['MiscMaxExecutionTime'] = 30; // LogAnalyzer will try to overwrite the default script timeout with this value during runtime!
  67. // This can of course only work if LogAnalyzer is allowed to changed the script timeout.
  68. $CFG['DebugUserLogin'] = 0; // if enabled, you will see additional informations on failed logins
  69. // ---
  70.  
  71. // --- Default Frontend Options
  72. $CFG['PrependTitle'] = ""; // If set, this text will be prepended withint the title tag
  73. $CFG['ViewUseTodayYesterday'] = 1; // If enabled, the date from today and yesterday is displayed as "today" and "yesterday"
  74. $CFG['ViewMessageCharacterLimit'] = 80; // Default character limit for the message gets trunscated! 0 means NO trunscation.
  75. $CFG['ViewStringCharacterLimit'] = 30; // Default character limit for all other string type fields before they get trunscated! 0 means NO trunscation.
  76. $CFG['ViewEntriesPerPage'] = 50; // Default number of syslog entries shown per page
  77. $CFG['ViewEnableDetailPopups'] = 1; // If enabled, you will see additional Details for each syslog message on mouse over.
  78. $CFG['ViewDefaultTheme'] = "default"; // This sets the default theme the user is going to see when he opens LogAnalyzer the first time.
  79. // Currently only "default" and "dark" are available.
  80. $CFG['ViewDefaultLanguage'] = "en"; // Sets the default display language
  81. $CFG['ViewEnableAutoReloadSeconds'] = 0; // If "ViewEnableAutoReloadSeconds" is set to anything higher the 0 (which means disabled), this means auto reload is enabled by default.
  82.  
  83. $CFG['SearchCustomButtonCaption'] = "I'd like to feel sad"; // Default caption for the custom fast search button
  84. $CFG['SearchCustomButtonSearch'] = "error"; // Default search string for the custom search button
  85.  
  86. $CFG['EnableContextLinks'] = 1; // if enabled, context links within the messages will automatically be created and added. Set this to 0 to disable all context links.
  87. $CFG['EnableIPAddressResolve'] = 1; // If enabled, IP Addresses inline messages are automatically resolved and the result is added in brackets {} behind the IP Address
  88. $CFG['SuppressDuplicatedMessages'] = 0; // If enabled, duplicated messages will be suppressed in the main display.
  89. $CFG['TreatNotFoundFiltersAsTrue'] = 0; // If you filter / search for messages, and the fields you are filtering for is not found, the filter result is treaten as TRUE!
  90. $CFG['PopupMenuTimeout'] = 3000; // This variable defines the default timeout value for popup menus in milliseconds. (those menus which popup when you click on the value of a field.
  91. $CFG['PhplogconLogoUrl'] = ""; // Put an Url to a custom toplogo you want to use.
  92. $CFG['InlineOnlineSearchIcons'] = 1; // Show online search icons
  93. $CFG['UseProxyServerForRemoteQueries'] = "";// If empty no proxy server will be used. If set to a proxy server url like 127.0.0.1:8080, LogAnalyzer will use this server for url queries like the updatecheck.
  94. $CFG['HeaderDefaultEncoding'] = ENC_ISO_8859_1; // Set default character encoding
  95. // ---
  96.  
  97. // --- Custom HTML Code
  98. $CFG['InjectHtmlHeader'] = ""; // Use this variable to inject custom html into the html <head> area!
  99. $CFG['InjectBodyHeader'] = ""; // Use this variable to inject custom html into the begin of the <body> area!
  100. $CFG['InjectBodyFooter'] = ""; // Use this variable to inject custom html into the end of the <body> area!
  101. // ---
  102.  
  103. // --- Define which fields you want to see
  104. //$CFG['ShowMessage'] = true; // If enabled, the Message column will be appended to the columns list.
  105. //Eventlog based fields: $CFG['Columns'] = array ( SYSLOG_DATE, SYSLOG_HOST, SYSLOG_EVENT_LOGTYPE, SYSLOG_EVENT_SOURCE, /*SYSLOG_EVENT_CATEGORY, */SYSLOG_EVENT_ID, SYSLOG_MESSAGE );
  106. //$CFG['Columns'] = array ( SYSLOG_DATE, SYSLOG_FACILITY, SYSLOG_SEVERITY, SYSLOG_HOST, SYSLOG_SYSLOGTAG, SYSLOG_MESSAGETYPE, SYSLOG_MESSAGE );
  107. $CFG['DefaultViewsID'] = "";
  108. // ---
  109.  
  110. // --- Predefined Searches!
  111. $CFG['Search'][] = array ( "DisplayName" => "Syslog Warnings and Errors", "SearchQuery" => "filter=severity%3A0%2C1%2C2%2C3%2C4&search=Search" );
  112. $CFG['Search'][] = array ( "DisplayName" => "Syslog Errors", "SearchQuery" => "filter=severity%3A0%2C1%2C2%2C3&search=Search" );
  113. $CFG['Search'][] = array ( "DisplayName" => "All messages from the last hour", "SearchQuery" => "filter=datelastx%3A1&search=Search" );
  114. $CFG['Search'][] = array ( "DisplayName" => "All messages from last 12 hours", "SearchQuery" => "filter=datelastx%3A2&search=Search" );
  115. $CFG['Search'][] = array ( "DisplayName" => "All messages from last 24 hours", "SearchQuery" => "filter=datelastx%3A3&search=Search" );
  116. $CFG['Search'][] = array ( "DisplayName" => "All messages from last 7 days", "SearchQuery" => "filter=datelastx%3A4&search=Search" );
  117. $CFG['Search'][] = array ( "DisplayName" => "All messages from last 31 days", "SearchQuery" => "filter=datelastx%3A5&search=Search" );
  118. // $CFG['Search'][] = array ( "DisplayName" => "", "SearchQuery" => "" );
  119. // ---
  120.  
  121. // --- Predefined Charts!
  122. $CFG['Charts'][] = array ( "DisplayName" => "Top Hosts", "chart_type" => CHART_BARS_HORIZONTAL, "chart_width" => 400, "chart_field" => SYSLOG_HOST, "maxrecords" => 10, "showpercent" => 0, "chart_enabled" => 1 );
  123. $CFG['Charts'][] = array ( "DisplayName" => "SyslogTags", "chart_type" => CHART_CAKE, "chart_width" => 400, "chart_field" => SYSLOG_SYSLOGTAG, "maxrecords" => 10, "showpercent" => 0, "chart_enabled" => 1 );
  124. $CFG['Charts'][] = array ( "DisplayName" => "Severity Occurences", "chart_type" => CHART_BARS_VERTICAL, "chart_width" => 400, "chart_field" => SYSLOG_SEVERITY, "maxrecords" => 10, "showpercent" => 1, "chart_enabled" => 1 );
  125. $CFG['Charts'][] = array ( "DisplayName" => "Usage by Day", "chart_type" => CHART_CAKE, "chart_width" => 400, "chart_field" => SYSLOG_DATE, "maxrecords" => 10, "showpercent" => 1, "chart_enabled" => 1 );
  126. // ---
  127.  
  128. // --- Configure allowed directories for File base logstream sources
  129. $CFG['DiskAllowed'][] = "/var/log/";
  130. // ---
  131.  
  132. // --- Source Options
  133. /* Example for DiskType Source:
  134. $CFG['Sources']['Source1']['ID'] = "Source1";
  135. $CFG['Sources']['Source1']['Name'] = "Syslog Disk File";
  136. $CFG['Sources']['Source1']['Description'] = "More details you want to see about this source";
  137. $CFG['Sources']['Source1']['SourceType'] = SOURCE_DISK;
  138. $CFG['Sources']['Source1']['LogLineType'] = "syslog";
  139. $CFG['Sources']['Source1']['MsgParserList'] = "";
  140. $CFG['Sources']['Source1']['MsgNormalize'] = 0;
  141. $CFG['Sources']['Source1']['DiskFile'] = "/var/log/syslog";
  142. $CFG['Sources']['Source1']['ViewID'] = "SYSLOG";
  143.  
  144. $CFG['Sources']['Source2']['ID'] = "Source5";
  145. $CFG['Sources']['Source2']['Name'] = "WinSyslog DB";
  146. $CFG['Sources']['Source1']['Description'] = "";
  147. $CFG['Sources']['Source2']['SourceType'] = SOURCE_DB;
  148. $CFG['Sources']['Source1']['MsgParserList'] = "";
  149. $CFG['Sources']['Source2']['DBTableType'] = "winsyslog";
  150. $CFG['Sources']['Source2']['DBType'] = DB_MYSQL;
  151. $CFG['Sources']['Source2']['DBServer'] = "localhost";
  152. $CFG['Sources']['Source2']['DBName'] = "loganalyzer";
  153. $CFG['Sources']['Source2']['DBUser'] = "root";
  154. $CFG['Sources']['Source2']['DBPassword'] = "";
  155. $CFG['Sources']['Source2']['DBTableName'] = "systemevents";
  156. $CFG['Sources']['Source2']['ViewID'] = "SYSLOG";
  157. */
  158.  
  159. $CFG['DefaultSourceID'] = 'Source1';
  160.  
  161. $CFG['Sources']['Source1']['ID'] = 'Source1';
  162. $CFG['Sources']['Source1']['Name'] = 'My Syslog Source';
  163. $CFG['Sources']['Source1']['ViewID'] = 'SYSLOG';
  164. $CFG['Sources']['Source1']['SourceType'] = SOURCE_PDO;
  165. $CFG['Sources']['Source1']['DBTableType'] = 'monitorware';
  166. $CFG['Sources']['Source1']['DBType'] = DB_MYSQL;
  167. $CFG['Sources']['Source1']['DBServer'] = 'localhost';
  168. $CFG['Sources']['Source1']['DBName'] = 'Syslog';
  169. $CFG['Sources']['Source1']['DBUser'] = 'root';
  170. $CFG['Sources']['Source1']['DBPassword'] = '123456';
  171. $CFG['Sources']['Source1']['DBTableName'] = 'SystemEvents';
  172. $CFG['Sources']['Source1']['DBEnableRowCounting'] = false;
  173.  
  174. // ---
  175.  
  176. ?>
Advertisement
Add Comment
Please, Sign In to add comment