0.4.0 Rc4 - build 148 (The last RC?)
Well, a few bugs got caught and fixed and I managed to add a bunch of test cases for event log checking as well. Nothing major but please please est and let me know. If no new bugs pop up this will become 0.4.0 in a bit...
Full change log
2012-03-20 MickeM * Fixed alias/service name for real-time event log filters * Added smtp/syslog and graphite clients to installer * Fixed so eventlog wont crahs on invalid messages 2012-03-19 MickeM * Fixed issue in installer and "Make file writable" by everyone now uses Users SID. * Fixed issue in installer and "Default plugins" now correctly sets them to 1. 2012-03-18 MickeM * Removed dependency on tcpip from the service and the installer * Added new command to EventLog CheckEventlogCached which checks result caught by the real-time process. CheckEventLogCACHE warn=gt:1 crit=gt:5 Requires a configured real-time checker to work. * Added a series of keywords to EventLog check to facilitate better checking * Added a set of aliases to make EventLog behave more like Wdinwos Eventlog viewer. * Added a lot of unit test cases to the Eventlog checker. * Fixed issue with default schedule beeing added as an item and not a template
0.4.0 Rc3 (The last RC?)
Hello,
Another RC out now. Main focus for this one has been fixing bugs and making sure various things works. The good thing is I have now closed almost half the tickets (many of then was already fixed). And hence forth I plan to work more actively at closing defect which means defects will work better for bugs/feature requests then forum posts.
There are mainly minor tweaks and updates in this version so nothing really to write about. But hopefully most things will now work.
Please try it out and let me know if you have any issues as I hope to release 0.4.0 pretty soon! And if I have forgotten/missed an issue you have reported before please remind me I tend to miss some defects when time drags out and I get sidetracked!
Michael Medin
Full changelog:
2012-03-11 MickeM
* Fixed a lot of issues with the installer
* Added so the installer can generate a config file for you
* Fixed so installer uses the correct path for password and allowed hosts
2012-03-08 MickeM
* Major improvments to the WMI command line syntax.
You can now: list namespaces, list classes, list instances as well as run queries.
Means you can use NSCLient++ as a almost full featured WMI command line client.
For details use: nscp wmi --help
* Added sample python WMI script to list all classes in all namespaces
* Fixed so if python scripts does not expose init and shutdown they will not be called
* Added new option --simple to CheckWMI wmi commands to return a simple list without formatting.
2012-03-06 MickeM
* Added "back" WMI Query command line exec like so:
nscp wmi --exec wmi-query
CheckWMI Command line syntax:
Allowed options:
-h [ --help ] Show help screen
-w [ --wmi-query ] arg Query to execute
-l [ --limit ] arg Limit number of rows
-n [ --namespace ] arg (=root\cimv2) Namespace
nscp wmi --exec wmi-query --query="Select * from Win32_Process" --limit 2
2012-03-05 MickeM
* Fixed so time/date comparissons are actually done in UTC (fixed for real this time!)
* Added a series of testcases for CheckFiles (test_w32_file)
2012-03-04 MickeM
* Added new dot-net API (Which does not require any strange wrappers)
* Added brand new sample C# plugin
* Fixed issue with python unit script loading usig the wrong default options
2012-02-21 MickeM
* Added new module CauseCrash which has a single command CrashClient to allow the service to be crashed remotly
*WARNING* Dont use this command, it is for debugging and testing purpouses only
* Fixed issue with BreakPad which was disabled
* Fixed some unix issues (sorry but hudson's stopped emailing me again:( )
* Fixed service --install (now sets correct options)
* Fixed service --install (now sets description correctly)
* Fixed log level defined in protobuf (now same as rest of the system)
* Fixed some issues with the check_nscp command
2012-02-20 MickeM
* Fixed NRPE buffer issue
* Added test case for 65K NRPE buffer length as well as 1Mb
* Added support for not regexp as operator to filters (Eventlog) (#463)
* Added support for computer as filter keyword and format keyword in EventLog (#442)
"filter=computer = 'foo'" syntax=%computer%
* Improved messages rendering of eventlog messages a bit
2012-02-19 MickeM
* Added new unit context on command line for running simple unit test cases:
nscp unit --language python --script test_nsca
* Added dependency on Tcpip
* Dropped OS bit-match requirement so now you can install any version on x64 plattform.
* Added so you can specify multiple counters for CheckCounter and poll them all in one go (#387)
* Added test cases (a bit flaky) for counters.
* Added ${host} and ${domain} to hostname settings option which might be used to construct your own hostname. (#428)
Not 100% sure about domain as on my box the "hostname" is only a name ie. has no domain...
2012-02-18 MickeM
* Fixed so too long log messages are trunacated instead of discarded
* Added option to truncate logfile if to large (#358)
[/settings/file logger]
max size = 1000
* Added keyword to reload (settings) to reload settings store (ie. flushing the cache) (#249).
* Added ability to load all files in a given directory (#366)
2012-02-17 MickeM
* Tweaked a bit in regards to ExternalScripts so it works better and handles errors better (#367)
* Fixed default report mode in 0.4.0 (#290)
* Made NSCA Client handle timestamps like send_nsca (ie. ignoring local time)
2012-02-16 MickeM
* Replaced command reader with object handler
* Added support for running commands as other users (#131)
* Improved pseed oflarge buffers for external commands (ie. when you return very large outputs) (#481)
* Added limit to test interface message length (when messages are to long only first 4k are displayed)
2012-02-15 MickeM
* Fixed missing icon on nscp.exe
* Fixed missing version info on nscp.exe (#294)
Dotnet/C# goodness
Just a quick heads up to let people know I am actually doing something. I got a bit of inspiration from someone asking about interfacing from dotnet and thought: Well, why the heck not...
? NSClient++ 0,4,0,140 2012-02-22 x64 booting... ... d Loading plugin: DotnetPlugin d Using factory: NSCP.Plugin.PluginFactory for test.dll d About to load dotnet plugin: D:/source/nscp/build/x64//modules/dotnet\test.dll d Plugin loaded: test.dll e Hello World from C# ... ? Enter command to inject or exit to terminate... check_dotnet d Injecting: check_dotnet... e Got command: check_dotnet/check_dotnet d Result check_dotnet: WARNING ? WARNING:Hello from C#
This is the first working version of the new dot.net API and plugin support. This works via a proxy plugin (DotnetPlugins) which loads all configured dotnet plugins. Plugins can be written in pretty much any language and I am implementing mine in C#. It currently requires native protocol buffer support which is avalible for atleast C# and presumably others as well.
The API is a bit sketchy but follows closely how the internal API looks as well as the modern plugins for Lua and
Python.
The idea is that you have a factor class which creates instances of plugins like so:
namespace NSCP.Plugin {
public class PluginFactory : NSCP.IPluginFactory
{
public NSCP.IPlugin create(NSCP.ICore core, String alias)
{
return new test.MyPlugin(core);
}
}
}
Then the plugin itself has access to all internal functions such as settings and query and registry such so registering the commands looks like this:
public bool load(int mode)
{
core.getLogger().error("Hello World from C#");
core.getRegistry().registerCommand("check_dotnet", "This is a sample command written in C#");
return true;
}
Then we can of course act on our command by providing a query handler like so:
public NSCP.IQueryHandler getQueryHandler()
{
return new MyQueryHandler(core);
}
The last and rather messy step (mainly due top the extreme verbosity of the C-Sharp port of protobuffer) is to provide the command handler. I hope at some point someone will be able to provide a plugin layer (written in native dot-net) to make is slightly less verbose much like I have for Python, C++ and Lua.
public NSCP.Result onQuery(string command, byte[] request)
{
NSCP.Result result = new NSCP.Result();
// Process the incoming message
Plugin.QueryRequestMessage request_message = Plugin.QueryRequestMessage.CreateBuilder().MergeFrom(request).Build();
string intcommand = request_message.GetPayload(0).Command;
core.getLogger().error("Got command: " + intcommand + "/" + command);
// Create response message
Plugin.Common.Types.Header.Builder header = Plugin.Common.Types.Header.CreateBuilder();
header.SetVersion(Plugin.Common.Types.Version.VERSION_1);
Plugin.QueryResponseMessage.Builder response_message = Plugin.QueryResponseMessage.CreateBuilder();
Plugin.QueryResponseMessage.Types.Response.Builder response = Plugin.QueryResponseMessage.Types.Response.CreateBuilder();
response.SetCommand(command);
response.SetResult(Plugin.Common.Types.ResultCode.OK);
response.SetMessage("Hello from C#");
response_message.AddPayload(response.Build());
response_message.SetHeader(header.Build());
result.data = response_message.Build().ToByteArray();
result.result = 1;
return result;
}
This will all be checked in (if you prefer to check the entire C# plugin) during the weekend and a new RC next week will feature this. As this has taken some time I will most likely have to skip a few of the bugs I was planing to fix :) So hopefully the next RC will be the last one. Also note that the C# plugin API is sketchy so please use it but beware that things are bound to change as I discover issues and problems...
Michael Medin
Michael Medin








rss
