Changeset ba63b95 in nscp
- Timestamp:
- 01/13/12 06:52:23 (16 months ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2
- Children:
- 35254d1
- Parents:
- 7354aa1
- Files:
-
- 18 edited
-
changelog (modified) (1 diff)
-
helpers/settings_manager/CMakeLists.txt (modified) (1 diff)
-
helpers/settings_manager/settings_manager_impl.cpp (modified) (3 diffs)
-
include/nsca/nsca_enrypt.hpp (modified) (2 diffs)
-
include/nsca/nsca_packet.hpp (modified) (1 diff)
-
include/nscapi/functions.hpp (modified) (1 diff)
-
include/nscapi/nscapi_plugin_wrapper.cpp (modified) (2 diffs)
-
modules/DistributedClient/DistributedClient.cpp (modified) (1 diff)
-
modules/NSCAClient/NSCAClient.cpp (modified) (1 diff)
-
modules/PythonScript/PythonScript.cpp (modified) (1 diff)
-
scripts/python/lib/test_helper.py (modified) (2 diffs)
-
scripts/python/test_nrpe.py (modified) (1 diff)
-
scripts/python/test_nsca.py (modified) (1 diff)
-
scripts/python/test_python.py (modified) (1 diff)
-
service/NSClient++.cpp (modified) (1 diff)
-
service/cli_parser.hpp (modified) (3 diffs)
-
version.hpp (modified) (1 diff)
-
version.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
changelog
r7354aa1 rba63b95 5 5 * Fixa dependonservice LanManWorkStation (old win) 6 6 * Fix RtlStringFromGUID problem on NT4 7 8 2012-01-12 MickeM 9 * Fixed issue with --submit command line option erroneusly reported missing optien (when it is not supported) 10 * Added settings store "dummy" for people who dont want to store settings (long term use is for unit tests) 11 * Added new option to NSCClient --source-host for settings the host name of the caller (your machine). 12 * Change so enryption algorithms are case insensitevie (ie. 3DES and 3des both work) 7 13 8 14 2012-01-09 MickeM -
helpers/settings_manager/CMakeLists.txt
r04ef932 rba63b95 25 25 ${NSCP_INCLUDEDIR}/settings/macros.h 26 26 ${NSCP_INCLUDEDIR}/settings/settings_ini.hpp 27 ${NSCP_INCLUDEDIR}/settings/settings_dummy.hpp 27 28 ${NSCP_INCLUDEDIR}/settings/settings_old.hpp 28 29 ${NSCP_INCLUDEDIR}/settings/settings_registry.hpp -
helpers/settings_manager/settings_manager_impl.cpp
rf085f9b rba63b95 4 4 5 5 #include <settings/settings_ini.hpp> 6 #include <settings/settings_dummy.hpp> 6 7 #include <settings/settings_http.hpp> 7 8 #ifdef WIN32 … … 91 92 return settings::instance_raw_ptr(new settings::INISettings(this, key)); 92 93 } 94 if (url.protocol == _T("dummy")) { 95 return settings::instance_raw_ptr(new settings::settings_dummy(this, key)); 96 } 93 97 if (url.protocol == _T("http")) { 94 98 return settings::instance_raw_ptr(new settings::settings_http(this, key)); … … 128 132 if (url.protocol == _T("ini")) 129 133 return settings::INISettings::context_exists(this, key); 134 if (url.protocol == _T("dummy")) 135 return true; 130 136 if (url.protocol == _T("http")) 131 137 return true; -
include/nsca/nsca_enrypt.hpp
r96c1461 rba63b95 2 2 3 3 #include <algorithm> 4 #include <boost/algorithm/string.hpp> 4 5 5 6 #ifdef HAVE_LIBCRYPTOPP … … 71 72 }; 72 73 struct helpers { 73 static int encryption_to_int(std::string encryption) { 74 static int encryption_to_int(std::string encryption_raw) { 75 std::string encryption = boost::algorithm::to_lower_copy(encryption_raw); 74 76 if ( 75 77 (encryption.size() == 1 && std::isdigit(encryption[0])) -
include/nsca/nsca_packet.hpp
ra87ce04 rba63b95 135 135 136 136 std::string to_string() const { 137 return "service: " + service + ", " + 137 return "host: " + host + ", " + 138 "service: " + service + ", " + 138 139 "code: " + nstr::to_string(code) + ", " + 139 140 "time: " + nstr::to_string(time) + ", " + -
include/nscapi/functions.hpp
r7354aa1 rba63b95 229 229 } 230 230 void set_string_data(std::string key, std::string value) { 231 data[key] = value; 231 if (key == "host") 232 host = value; 233 else 234 data[key] = value; 232 235 } 233 236 void set_int_data(std::string key, int value) { -
include/nscapi/nscapi_plugin_wrapper.cpp
r40fca56 rba63b95 31 31 #include <strEx.h> 32 32 33 #include <boost/algorithm/string.hpp> 33 34 #include <boost/foreach.hpp> 34 35 #include <boost/tokenizer.hpp> … … 93 94 nscapi::functions::decoded_simple_command_data data = nscapi::functions::parse_simple_query_request(char_command, request); 94 95 std::wstring msg, perf; 95 NSCAPI::nagiosReturn ret = handleCommand(data.target, data.command, data.args, msg, perf); 96 97 NSCAPI::nagiosReturn ret = handleCommand(data.target, boost::algorithm::to_lower_copy(data.command), data.args, msg, perf); 96 98 nscapi::functions::create_simple_query_response(data.command, ret, msg, perf, response); 97 99 return ret; -
modules/DistributedClient/DistributedClient.cpp
rf33c12f rba63b95 200 200 setup(config); 201 201 if (!client::command_line_parser::is_command(cmd)) 202 return client::command_line_parser::do_execute_command_as_query(config, cmd, data.args, re sult);202 return client::command_line_parser::do_execute_command_as_query(config, cmd, data.args, request, result); 203 203 return commands.exec_simple(config, data.target, char_command, data.args, result); 204 204 } -
modules/NSCAClient/NSCAClient.cpp
r7354aa1 rba63b95 271 271 "Password") 272 272 273 ("source-host", po::value<std::string>()->notifier(boost::bind(&nscapi::functions::destination_container::set_string_data, &data->host_self, "host", _1)), 274 "Source/sender host name (default is auto which means use the name of the actual host)") 275 276 ("sender-host", po::value<std::string>()->notifier(boost::bind(&nscapi::functions::destination_container::set_string_data, &data->host_self, "host", _1)), 277 "Source/sender host name (default is auto which means use the name of the actual host)") 278 273 279 ("time-offset", po::value<std::string>()->notifier(boost::bind(&nscapi::functions::destination_container::set_string_data, &data->recipient, "time offset", _1)), 274 280 "") -
modules/PythonScript/PythonScript.cpp
r9c06054 rba63b95 375 375 nscapi::functions::create_simple_exec_response<std::wstring>(_T("help"), ret, result, response); 376 376 return ret; 377 } else if (command == _T("execute-and-load-python") || command == _T("execute-python") || command == _T("run") || command == _T("execute") || command == _T("exec")|| command == _T("")) { 377 } else if (command == _T("execute-and-load-python") || command == _T("execute-python") || command == _T("python-script") 378 || command == _T("run") || command == _T("execute") || command == _T("exec") || command == _T("")) { 378 379 nscapi::functions::decoded_simple_command_data data = nscapi::functions::parse_simple_exec_request(char_command, request); 379 380 if (data.command == _T("") && data.args.size() == 0) -
scripts/python/lib/test_helper.py
rf7a074d rba63b95 126 126 def shutdown(self): 127 127 None 128 129 def require_boot(self): 130 return False 128 131 129 132 … … 273 276 274 277 def install(self, arguments = []): 278 boot = False 275 279 for suite in self.suites: 276 280 instance = suite.getInstance() 277 281 instance.install(arguments) 278 282 if instance.require_boot(): 283 boot = True 284 285 #core = Core.get() 286 #(code, msg, perf) = core.simple_query('py_unittest', []) 287 279 288 log('-+---==(TEST INSTALLER)==---------------------------------------------------+-') 280 289 log(' | Setup nessecary configuration for running test |') 281 290 log(' | This includes: Loading the PythonScript module at startup |') 282 291 log(' | To use this please run nsclient++ in "test mode" like so: |') 283 log(' | nscp --test |') 284 log(' | Then start the py_unittest command by typing it and press enter like so: |') 285 log(' | test_eventlog |') 286 log(' | Lastly exit by typing exit like so: |') 287 log(' | exit |') 292 if boot: 293 log(' | nscp client --boot --query py_unittest |') 294 else: 295 log(' | nscp client --query py_unittest |') 288 296 log('-+--------------------------------------------------------==(DAS ENDE!)==---+-') 289 297 -
scripts/python/test_nrpe.py
ra87ce04 rba63b95 247 247 None 248 248 249 def require_boot(self): 250 return True 251 249 252 setup_singleton(NRPEServerTest) 250 253 -
scripts/python/test_nsca.py
r7354aa1 rba63b95 252 252 def shutdown(self): 253 253 None 254 255 def require_boot(self): 256 return True 257 254 258 255 259 setup_singleton(NSCAServerTest) -
scripts/python/test_python.py
r9c06054 rba63b95 4 4 from time import time 5 5 6 install_checks = 10 6 install_checks = 1000 7 7 8 8 class PythonTest(BasicTest): -
service/NSClient++.cpp
ra87ce04 rba63b95 1178 1178 int exec_helper(NSClientT::plugin_type plugin, std::wstring command, std::vector<std::wstring> arguments, std::string request, std::list<std::string> *responses) { 1179 1179 std::string response; 1180 if (!plugin || !plugin->has_command_line_exec()) 1181 return -1; 1180 1182 int ret = plugin->commandLineExec(command.c_str(), request, response); 1181 1183 if (ret != NSCAPI::returnIgnored && !response.empty()) -
service/cli_parser.hpp
ra87ce04 rba63b95 79 79 ("query,q", po::value<std::wstring>(), "Run a query with a given name") 80 80 ("submit,s", po::value<std::wstring>(), "Name of query to ask") 81 ("settings", po::value<std::wstring>(), "Override (temporarily) settings subsystem to use") 81 82 ("module,M", po::value<std::wstring>(), "Name of module to load (if not specified all modules in ini file will be loaded)") 82 83 ("argument,a", po::wvalue<std::vector<std::wstring> >(), "List of arguments (gets -- prefixed automatically)") … … 399 400 mainClient.log_info(__FILE__, __LINE__, _T("Arguments: ") + args); 400 401 } 402 if (vm.count("settings")) 403 core_->set_settings_context(vm["settings"].as<std::wstring>()); 404 401 405 core_->boot_init(); 402 406 if (module.empty()) … … 420 424 mainClient.simple_exec(module, _T("help"), arguments, resp); 421 425 } 426 } else if (mode == submit) { 427 std::wcerr << _T("--submit is currently not supported (but you can use --exec submit which is technically the same)") << std::endl; 422 428 } else { 423 429 std::wcerr << _T("Need to specify one of --exec, --query or --submit") << std::endl; -
version.hpp
ra87ce04 rba63b95 1 1 #ifndef VERSION_HPP 2 2 #define VERSION_HPP 3 #define PRODUCTVER 0,4,0,1 184 #define STRPRODUCTVER "0,4,0,1 18"5 #define STRPRODUCTDATE "201 1-12-16"3 #define PRODUCTVER 0,4,0,121 4 #define STRPRODUCTVER "0,4,0,121" 5 #define STRPRODUCTDATE "2012-01-12" 6 6 #endif // VERSION_HPP -
version.txt
ra87ce04 rba63b95 1 1 version=0.4.0 2 build=1 183 date=201 1-12-162 build=121 3 date=2012-01-12
Note: See TracChangeset
for help on using the changeset viewer.








