0.4.00.4.10.4.2
|
Last change
on this file since 98113da was
98113da,
checked in by Michael Medin <michael@…>, 20 months ago
|
- Real-time CheckEventLog working (still only for one, and I think application log)
- Added python tests to validfate that Real-time eventlog is working.
- Fixed som defects here and there (now builds on Linux again)
- Fixed so it builds in "debug mode"
- Fixed issue in grammar which caused infiniate loop in som cases
- Fixed so error rendering in eventlog works with "infininate number of argumnets"
- Added support for targeting execs (in API)
- Fixed some invalid return messages
- Streamlined submissions wrappers to be more inline with "other wrappers"
- Fixed a myrriad of minor python script bugs
- Added sleep command (which sometimes causes issues so use with care)
|
-
Property mode set to
100644
|
|
File size:
891 bytes
|
| Line | |
|---|
| 1 | #include "stdafx.h"
|
|---|
| 2 |
|
|---|
| 3 | #include <boost/asio.hpp>
|
|---|
| 4 | #include "handler_impl.hpp"
|
|---|
| 5 | #include <config.h>
|
|---|
| 6 |
|
|---|
| 7 | void handler_impl::handle(nsca::packet p) {
|
|---|
| 8 | std::wstring response;
|
|---|
| 9 | std::string::size_type pos = p.result.find('|');
|
|---|
| 10 | if (pos != std::string::npos) {
|
|---|
| 11 | std::wstring msg = utf8::cvt<std::wstring>(p.result.substr(0, pos));
|
|---|
| 12 | std::wstring perf = utf8::cvt<std::wstring>(p.result.substr(++pos));
|
|---|
| 13 | GET_CORE()->submit_simple_message(channel_, utf8::cvt<std::wstring>(p.service), nscapi::plugin_helper::int2nagios(p.code), msg, perf, response);
|
|---|
| 14 | } else {
|
|---|
| 15 | std::wstring empty, msg = utf8::cvt<std::wstring>(p.result);
|
|---|
| 16 | GET_CORE()->submit_simple_message(channel_, utf8::cvt<std::wstring>(p.service), nscapi::plugin_helper::int2nagios(p.code), msg, empty, response);
|
|---|
| 17 |
|
|---|
| 18 | }
|
|---|
| 19 | std::wstring perf = _T(""); // @todo fix this!
|
|---|
| 20 |
|
|---|
| 21 | NSC_DEBUG_MSG(_T("Got response: ") + response);
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
Note: See
TracBrowser
for help on using the repository browser.