| [dc65e35] | 1 | /************************************************************************** |
|---|
| 2 | * Copyright (C) 2004-2007 by Michael Medin <michael@medin.name> * |
|---|
| 3 | * * |
|---|
| 4 | * This code is part of NSClient++ - http://trac.nakednuns.org/nscp * |
|---|
| 5 | * * |
|---|
| 6 | * This program is free software; you can redistribute it and/or modify * |
|---|
| 7 | * it under the terms of the GNU General Public License as published by * |
|---|
| 8 | * the Free Software Foundation; either version 2 of the License, or * |
|---|
| 9 | * (at your option) any later version. * |
|---|
| 10 | * * |
|---|
| 11 | * This program is distributed in the hope that it will be useful, * |
|---|
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
|---|
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
|---|
| 14 | * GNU General Public License for more details. * |
|---|
| 15 | * * |
|---|
| 16 | * You should have received a copy of the GNU General Public License * |
|---|
| 17 | * along with this program; if not, write to the * |
|---|
| 18 | * Free Software Foundation, Inc., * |
|---|
| 19 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
|---|
| 20 | ***************************************************************************/ |
|---|
| [aaa9a22] | 21 | #pragma once |
|---|
| 22 | |
|---|
| [4548d83] | 23 | #include "../AutoBuild.h" |
|---|
| [aaa9a22] | 24 | // Application Name |
|---|
| [99e4d8f] | 25 | #define SZAPPNAME _T("NSClient++") |
|---|
| [aaa9a22] | 26 | |
|---|
| 27 | // Version |
|---|
| [da1c7e1] | 28 | #define SZBETATAG _T(" ") // _T(" RC ") _T(" BETA ") |
|---|
| [45241f5] | 29 | #define SZVERSION STRPRODUCTVER SZBETATAG STRPRODUCTDATE |
|---|
| [4548d83] | 30 | //FILEVER[0] |
|---|
| [45241f5] | 31 | |
|---|
| 32 | #if defined(_M_IX86) |
|---|
| 33 | #define SZARCH _T("w32") |
|---|
| 34 | #elif defined(_M_X64) |
|---|
| [99e4d8f] | 35 | #define SZARCH _T("x64") |
|---|
| [45241f5] | 36 | #elif defined(_M_IA64) |
|---|
| 37 | #define SZARCH _T("ia64") |
|---|
| [4001502] | 38 | #else |
|---|
| [45241f5] | 39 | #define SZARCH _T("unknown") |
|---|
| [4001502] | 40 | #endif |
|---|
| [aaa9a22] | 41 | |
|---|
| 42 | // internal name of the service |
|---|
| [99e4d8f] | 43 | #define SZSERVICENAME _T("NSClientpp") |
|---|
| [aaa9a22] | 44 | |
|---|
| [75d5e70] | 45 | // Description of service |
|---|
| [99e4d8f] | 46 | #define SZSERVICEDESCRIPTION _T("Nagios Windows Agent (Provides performance data for Nagios server)") |
|---|
| [75d5e70] | 47 | |
|---|
| [aaa9a22] | 48 | // displayed name of the service |
|---|
| [99e4d8f] | 49 | #define SZSERVICEDISPLAYNAME SZSERVICENAME _T(" (Nagios) ") SZVERSION _T(" ") SZARCH |
|---|
| [aaa9a22] | 50 | |
|---|
| 51 | // list of service dependencies - "dep1\0dep2\0\0" |
|---|
| [99e4d8f] | 52 | #define SZDEPENDENCIES _T("") |
|---|
| [aaa9a22] | 53 | |
|---|
| [945c381] | 54 | // Buffer size of incoming data (notice this is the maximum request length!) |
|---|
| [aaa9a22] | 55 | #define RECV_BUFFER_LEN 1024 |
|---|
| 56 | |
|---|
| [99e4d8f] | 57 | #define NASTY_METACHARS _T("|`&><'\"\\[]{}") /* This may need to be modified for windows directory seperator */ |
|---|
| 58 | |
|---|
| 59 | #define DATE_FORMAT _T("%#c") |
|---|
| [cea178b] | 60 | |
|---|
| [aaa9a22] | 61 | |
|---|
| [945c381] | 62 | // Default Argument string (for consistency) |
|---|
| [99e4d8f] | 63 | #define SHOW_ALL _T("ShowAll") |
|---|
| 64 | #define SHOW_FAIL _T("ShowFail") |
|---|
| 65 | #define NSCLIENT _T("nsclient") |
|---|
| 66 | #define IGNORE_PERFDATA _T("ignore-perf-data") |
|---|
| 67 | #define CHECK_ALL _T("CheckAll") |
|---|
| 68 | #define CHECK_ALL_OTHERS _T("CheckAllOthers") |
|---|
| [cea178b] | 69 | |
|---|
| 70 | // NSClient Setting headlines |
|---|
| [99e4d8f] | 71 | #define NSCLIENT_SECTION_TITLE _T("NSClient") |
|---|
| 72 | #define NSCLIENT_SETTINGS_PORT _T("port") |
|---|
| [cea178b] | 73 | #define NSCLIENT_SETTINGS_PORT_DEFAULT 12489 |
|---|
| [99e4d8f] | 74 | #define NSCLIENT_SETTINGS_VERSION _T("version") |
|---|
| 75 | #define NSCLIENT_SETTINGS_VERSION_DEFAULT _T("auto") |
|---|
| 76 | #define NSCLIENT_SETTINGS_BINDADDR _T("bind_to_address") |
|---|
| 77 | #define NSCLIENT_SETTINGS_BINDADDR_DEFAULT _T("") |
|---|
| 78 | #define NSCLIENT_SETTINGS_LISTENQUE _T("socket_back_log") |
|---|
| [f42280d] | 79 | #define NSCLIENT_SETTINGS_LISTENQUE_DEFAULT 0 |
|---|
| [99e4d8f] | 80 | #define NSCLIENT_SETTINGS_READ_TIMEOUT _T("socket_timeout") |
|---|
| [30bfe74] | 81 | #define NSCLIENT_SETTINGS_READ_TIMEOUT_DEFAULT 30 |
|---|
| [aaa9a22] | 82 | |
|---|
| 83 | // NRPE Settings headlines |
|---|
| [99e4d8f] | 84 | #define NRPE_SECTION_TITLE _T("NRPE") |
|---|
| [4c8d44d] | 85 | #define NRPE_CLIENT_HANDLER_SECTION_TITLE _T("NRPE Client Handlers") |
|---|
| [99e4d8f] | 86 | #define NRPE_HANDLER_SECTION_TITLE _T("NRPE Handlers") |
|---|
| 87 | #define NRPE_SETTINGS_TIMEOUT _T("command_timeout") |
|---|
| [cea178b] | 88 | #define NRPE_SETTINGS_TIMEOUT_DEFAULT 60 |
|---|
| [99e4d8f] | 89 | #define NRPE_SETTINGS_READ_TIMEOUT _T("socket_timeout") |
|---|
| [30bfe74] | 90 | #define NRPE_SETTINGS_READ_TIMEOUT_DEFAULT 30 |
|---|
| [99e4d8f] | 91 | #define NRPE_SETTINGS_PORT _T("port") |
|---|
| [cea178b] | 92 | #define NRPE_SETTINGS_PORT_DEFAULT 5666 |
|---|
| [99e4d8f] | 93 | #define NRPE_SETTINGS_BINDADDR _T("bind_to_address") |
|---|
| 94 | #define NRPE_SETTINGS_BINDADDR_DEFAULT _T("") |
|---|
| 95 | #define NRPE_SETTINGS_ALLOW_ARGUMENTS _T("allow_arguments") |
|---|
| [cea178b] | 96 | #define NRPE_SETTINGS_ALLOW_ARGUMENTS_DEFAULT 0 |
|---|
| [99e4d8f] | 97 | #define NRPE_SETTINGS_ALLOW_NASTY_META _T("allow_nasty_meta_chars") |
|---|
| [cea178b] | 98 | #define NRPE_SETTINGS_ALLOW_NASTY_META_DEFAULT 0 |
|---|
| [99e4d8f] | 99 | #define NRPE_SETTINGS_USE_SSL _T("use_ssl") |
|---|
| [cea178b] | 100 | #define NRPE_SETTINGS_USE_SSL_DEFAULT 1 |
|---|
| [99e4d8f] | 101 | #define NRPE_SETTINGS_LISTENQUE _T("socket_back_log") |
|---|
| [f42280d] | 102 | #define NRPE_SETTINGS_LISTENQUE_DEFAULT 0 |
|---|
| [99e4d8f] | 103 | #define NRPE_SETTINGS_PERFDATA _T("performance_data") |
|---|
| [2603350] | 104 | #define NRPE_SETTINGS_PERFDATA_DEFAULT 1 |
|---|
| [99e4d8f] | 105 | #define NRPE_SETTINGS_SCRIPTDIR _T("script_dir") |
|---|
| 106 | #define NRPE_SETTINGS_SCRIPTDIR_DEFAULT _T("") |
|---|
| [7a156f4] | 107 | #define NRPE_SETTINGS_STRLEN _T("string_length") |
|---|
| 108 | #define NRPE_SETTINGS_STRLEN_DEFAULT 1024 |
|---|
| [cea178b] | 109 | |
|---|
| [c1d545e] | 110 | // External Script Settings headlines |
|---|
| 111 | #define EXTSCRIPT_SECTION_TITLE _T("External Script") |
|---|
| 112 | #define EXTSCRIPT_SCRIPT_SECTION_TITLE _T("External Scripts") |
|---|
| 113 | #define EXTSCRIPT_ALIAS_SECTION_TITLE _T("External Alias") |
|---|
| 114 | #define EXTSCRIPT_SETTINGS_TIMEOUT _T("command_timeout") |
|---|
| 115 | #define EXTSCRIPT_SETTINGS_TIMEOUT_DEFAULT 60 |
|---|
| 116 | #define EXTSCRIPT_SETTINGS_ALLOW_ARGUMENTS _T("allow_arguments") |
|---|
| 117 | #define EXTSCRIPT_SETTINGS_ALLOW_ARGUMENTS_DEFAULT 0 |
|---|
| 118 | #define EXTSCRIPT_SETTINGS_ALLOW_NASTY_META _T("allow_nasty_meta_chars") |
|---|
| 119 | #define EXTSCRIPT_SETTINGS_ALLOW_NASTY_META_DEFAULT 0 |
|---|
| 120 | #define EXTSCRIPT_SETTINGS_SCRIPTDIR _T("script_dir") |
|---|
| 121 | #define EXTSCRIPT_SETTINGS_SCRIPTDIR_DEFAULT _T("") |
|---|
| 122 | |
|---|
| [cea178b] | 123 | // Check System Settings |
|---|
| [99e4d8f] | 124 | #define C_SYSTEM_SECTION_TITLE _T("Check System") |
|---|
| 125 | #define C_SYSTEM_CPU_BUFFER_TIME _T("CPUBufferSize") |
|---|
| 126 | #define C_SYSTEM_CPU_BUFFER_TIME_DEFAULT _T("1h") |
|---|
| 127 | #define C_SYSTEM_CHECK_RESOLUTION _T("CheckResolution") |
|---|
| [cea178b] | 128 | #define C_SYSTEM_CHECK_RESOLUTION_DEFAULT 10 /* unit: second/10 */ |
|---|
| [e26cfe0] | 129 | |
|---|
| [99e4d8f] | 130 | #define C_SYSTEM_AUTODETECT_PDH _T("auto_detect_pdh") |
|---|
| [e26cfe0] | 131 | #define C_SYSTEM_AUTODETECT_PDH_DEFAULT 1 |
|---|
| [99e4d8f] | 132 | #define C_SYSTEM_FORCE_LANGUAGE _T("force_language") |
|---|
| 133 | #define C_SYSTEM_FORCE_LANGUAGE_DEFAULT _T("") |
|---|
| [47b843a] | 134 | #define C_SYSTEM_NO_INDEX _T("dont_use_pdh_index") |
|---|
| 135 | #define C_SYSTEM_NO_INDEX_DEFAULT 0 |
|---|
| [dd02c15] | 136 | #define C_SYSTEM_IGNORE_COLLECTION _T("debug_skip_data_collection") |
|---|
| 137 | #define C_SYSTEM_IGNORE_COLLECTION_DEFAULT 0 |
|---|
| [99e4d8f] | 138 | |
|---|
| 139 | #define C_SYSTEM_MEM_PAGE_LIMIT _T("MemoryCommitLimit") |
|---|
| 140 | #define C_SYSTEM_MEM_PAGE_LIMIT_DEFAULT _T("\\Memory\\Commit Limit") |
|---|
| 141 | #define C_SYSTEM_MEM_PAGE _T("MemoryCommitByte") |
|---|
| 142 | #define C_SYSTEM_MEM_PAGE_DEFAULT _T("\\Memory\\Committed Bytes") |
|---|
| 143 | #define C_SYSTEM_UPTIME _T("SystemSystemUpTime") |
|---|
| 144 | #define C_SYSTEM_UPTIME_DEFAULT _T("\\System\\System Up Time") |
|---|
| 145 | #define C_SYSTEM_CPU _T("SystemTotalProcessorTime") |
|---|
| 146 | #define C_SYSTEM_MEM_CPU_DEFAULT _T("\\Processor(_total)\\% Processor Time") |
|---|
| 147 | #define C_SYSTEM_ENUMPROC_METHOD_PSAPI _T("PSAPI") |
|---|
| 148 | #define C_SYSTEM_ENUMPROC_METHOD_THELP _T("TOOLHELP") |
|---|
| 149 | #define C_SYSTEM_ENUMPROC_METHOD_AUTO _T("auto") |
|---|
| 150 | #define C_SYSTEM_ENUMPROC_METHOD _T("ProcessEnumerationMethod") |
|---|
| [e26cfe0] | 151 | #define C_SYSTEM_ENUMPROC_METHOD_DEFAULT C_SYSTEM_ENUMPROC_METHOD_AUTO |
|---|
| [99e4d8f] | 152 | |
|---|
| 153 | |
|---|
| [8c7d67f] | 154 | #define EVENTLOG_SECTION_TITLE _T("Eventlog") |
|---|
| 155 | #define EVENTLOG_DEBUG _T("debug") |
|---|
| 156 | #define EVENTLOG_DEBUG_DEFAULT 0 |
|---|
| 157 | #define EVENTLOG_SYNTAX _T("syntax") |
|---|
| 158 | #define EVENTLOG_SYNTAX_DEFAULT _T("") |
|---|
| 159 | |
|---|
| [5ca3931] | 160 | #define NSCA_AGENT_SECTION_TITLE _T("NSCA Agent") |
|---|
| 161 | #define NSCA_CMD_SECTION_TITLE _T("NSCA Commands") |
|---|
| 162 | #define NSCA_INTERVAL _T("interval") |
|---|
| 163 | #define NSCA_INTERVAL_DEFAULT 60 |
|---|
| [65ec1fa] | 164 | #define NSCA_HOSTNAME _T("hostname") |
|---|
| 165 | #define NSCA_HOSTNAME_DEFAULT _T("") |
|---|
| 166 | #define NSCA_SERVER _T("nsca_host") |
|---|
| 167 | #define NSCA_SERVER_DEFAULT _T("unknown-host") |
|---|
| [5ca3931] | 168 | #define NSCA_PORT _T("nsca_port") |
|---|
| 169 | #define NSCA_PORT_DEFAULT 5667 |
|---|
| [035c51f] | 170 | #define NSCA_ENCRYPTION _T("encryption_method") |
|---|
| 171 | #define NSCA_ENCRYPTION_DEFAULT 1 |
|---|
| 172 | #define NSCA_PASSWORD _T("password") |
|---|
| 173 | #define NSCA_PASSWORD_DEFAULT _T("") |
|---|
| [394f7a1] | 174 | #define NSCA_DEBUG_THREADS _T("debug_threads") |
|---|
| 175 | #define NSCA_DEBUG_THREADS_DEFAULT 1 |
|---|
| [5aebda1] | 176 | #define NSCA_CACHE_HOST _T("cache_hostname") |
|---|
| 177 | #define NSCA_CACHE_HOST_DEFAULT 0 |
|---|
| [aaa9a22] | 178 | |
|---|
| [99e4d8f] | 179 | #define C_SYSTEM_SVC_ALL_0 _T("check_all_services[SERVICE_BOOT_START]") |
|---|
| 180 | #define C_SYSTEM_SVC_ALL_0_DEFAULT _T("ignored") |
|---|
| 181 | #define C_SYSTEM_SVC_ALL_1 _T("check_all_services[SERVICE_SYSTEM_START]") |
|---|
| 182 | #define C_SYSTEM_SVC_ALL_1_DEFAULT _T("ignored") |
|---|
| 183 | #define C_SYSTEM_SVC_ALL_2 _T("check_all_services[SERVICE_AUTO_START]") |
|---|
| 184 | #define C_SYSTEM_SVC_ALL_2_DEFAULT _T("started") |
|---|
| 185 | #define C_SYSTEM_SVC_ALL_3 _T("check_all_services[SERVICE_DEMAND_START]") |
|---|
| 186 | #define C_SYSTEM_SVC_ALL_3_DEFAULT _T("ignored") |
|---|
| 187 | #define C_SYSTEM_SVC_ALL_4 _T("check_all_services[SERVICE_DISABLED]") |
|---|
| 188 | #define C_SYSTEM_SVC_ALL_4_DEFAULT _T("stopped") |
|---|
| [30bfe74] | 189 | |
|---|
| [367bf20] | 190 | #define C_TASKSCHED_SECTION _T("Task Scheduler") |
|---|
| 191 | #define C_TASKSCHED_SYNTAX _T("syntax") |
|---|
| 192 | #define C_TASKSCHED_SYNTAX_DEFAULT _T("%title% last run: %most-recent-run-time% (%exit-code%)") |
|---|
| 193 | |
|---|
| [cea178b] | 194 | // Log to File Settings |
|---|
| [99e4d8f] | 195 | #define LOG_SECTION_TITLE _T("log") |
|---|
| 196 | #define LOG_FILENAME _T("file") |
|---|
| 197 | #define LOG_FILENAME_DEFAULT _T("nsclient.log") |
|---|
| 198 | #define LOG_DATEMASK _T("date_mask") |
|---|
| 199 | #define LOG_DATEMASK_DEFAULT _T("%Y-%m-%d %H:%M:%S") |
|---|
| [aaa9a22] | 200 | |
|---|
| [1d9338a] | 201 | // Main Settings |
|---|
| [99e4d8f] | 202 | #define MAIN_SECTION_TITLE _T("Settings") |
|---|
| 203 | #define MAIN_USEFILE _T("use_file") |
|---|
| 204 | #define MAIN_USEREG _T("use_reg") |
|---|
| [aabbd97] | 205 | #define MAIN_USEFILE_DEFAULT 0 |
|---|
| [99e4d8f] | 206 | #define MAIN_MASTERKEY _T("master_key") |
|---|
| 207 | #define MAIN_MASTERKEY_DEFAULT _T("This is a secret key that you should change") |
|---|
| 208 | #define MAIN_OBFUSCATED_PASWD _T("obfuscated_password") |
|---|
| 209 | #define MAIN_OBFUSCATED_PASWD_DEFAULT _T("") |
|---|
| 210 | #define MAIN_SETTINGS_PWD _T("password") |
|---|
| 211 | #define MAIN_SETTINGS_PWD_DEFAULT _T("") |
|---|
| 212 | #define MAIN_ALLOWED_HOSTS _T("allowed_hosts") |
|---|
| 213 | #define MAIN_ALLOWED_HOSTS_DEFAULT _T("127.0.0.1") |
|---|
| 214 | #define MAIN_ALLOWED_HOSTS_CACHE _T("cache_allowed_hosts") |
|---|
| [76aafc4] | 215 | #define MAIN_ALLOWED_HOSTS_CACHE_DEFAULT 1 |
|---|
| [7a156f4] | 216 | #define MAIN_STRING_LENGTH _T("string_length") |
|---|
| 217 | #define MAIN_STRING_LENGTH_DEFAULT 4096 |
|---|
| [70f2d7b] | 218 | |
|---|
| 219 | |
|---|
| [47b843a] | 220 | // LOA Config itemns |
|---|
| 221 | #define LUA_SCRIPT_SECTION_TITLE _T("LUA Scripts") |
|---|
| 222 | |
|---|
| 223 | |
|---|
| [70f2d7b] | 224 | // Main Registry ROOT |
|---|
| 225 | #define NS_HKEY_ROOT HKEY_LOCAL_MACHINE |
|---|
| [99e4d8f] | 226 | #define NS_REG_ROOT _T("SOFTWARE\\NSClient++") |
|---|