Hi,

I've been thinking about how to do discovery and monitoring on Windows,
and I have a "straw-man" proposal that I'd like feedback on.

Here's what we do when we want to discovery on POSIX machines:
 - call g_spawn_async() to run a discovery script with its output
directed to a temporary file
   ++ the script does its discovery, then produces JSON output to
"stdout" and exits
 - wait for the discovery script to complete
 - if it exited successfully, read the JSON created by the script
 - if the JSON is the same as the last time it ran, the json is thrown away
 - If the JSON is different from the last invocation, it is sent
upstream to the CMA

I propose that we do the same thing on Windows - with one minor exception.
    + On Linux we typically use the Linux shell to run the scripts
    + I propose that on Windows, that we write the scripts in C# instead
of the shell

In case you're wondering, g_spawn_async() is documented as working
correctly on Windows as well as Linux (this is why I used it instead of
fork/exec - which I already knew).

The reason why I would suggest C# instead of C is that it is more
similar to what we're doing on POSIX systems, and that having these
things separate from the nanoprobes makes extending the system more
straightforward.

In an ideal world, we'd like to make it where our customers can easily
add new discovery methods themselves.  In my experience, this is the
kind of place where most of our contributions will come - if we make it
separate and encourage the use of a scripting language that our
customers (mostly system administrators) are likely to know.

Having it be a simple script makes a lot easier to learn how to do it. 
You don't have to know much about the rest of the system to do it.  If
you can write out the right kind of JSON to standard out, you know all
you need to know.

Thoughts?

-- 
    Alan Robertson <[email protected]> - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim 
from you at all times your undisguised opinions." - William Wilberforce
_______________________________________________
Assimilation mailing list - Discovery-Driven Monitoring
[email protected]
http://lists.community.tummy.com/cgi-bin/mailman/listinfo/assimilation
http://assimmon.org/

Reply via email to