Hi all,

I'm asking you a little memory work : the installation of your first Nagios box. Can you remember how much time did it take to have a "simple" monitoring (FTP, HTTP, DNS, ping) of yours hosts?

For myself, it just take days (I was young....). I think for new comers it's the same thing. But they would like to have something "real" in front of them in less than few days. Now necesseraly a full monitoring installation because it need a lot of work and experience, but at least something they can say "hey, it really works!".

That why I start a little discovery script. From now please don't look too closely at the code, it's a mere proof of concept.

The idea is to have nmap do nearly all the job for us :
* the user launch a nmap scan with xml output (sudo nmap 192.168.0.-2541 -T4 -O --traceroute -oX out.xml)
* then we just parse it (there are OS, open ports and route in the xml) and create simple configuration for the discovering hosts and classic ports.

From now you can run it with :
shinken/libexec/discovery.py -x out.xml -o /tmp/foo -d /etc/shinken/objects

It will create a file for each hosts in etc/objects/hosts and objects/services and a file for each generated service.

From now only very classic network ports are managed (ftp, ftps, http, https, oracle, etc) and we just apply dummy templates for windows and linux without real checks from now.

I would like this script (that will be renamed shinken-discovery I think) to be more modular, so people can easily extend it, and why not backport us some automatic configuration sample.

Like Gerhard said me, it can be a good thing to use some checks plugins to do the discovery. For example the oracle check can list tablespace and so on. But maybe it for a second version of this script, and with some on configuration hint about discovery like :
define host {
   host_name    server-oracle-1
   discover   oracle(scot,tiger)
}

For example can call the :
define command {
 command_name oracle
 command_line   check_oracle_health -H $HOSTNAME$ --user $ARG1$ --password $ARG2$ -mode list-tablespaces
}

So feel free to test it and tall what you think about such simple script, or the whole discovery feature :D


Jean