Discovery with Shinken

Simple use of the discovery tool

When Shinken is installed, the discovery script shinken-discovery can help you start your new monitoring tool and integrate a large number of hosts. This does not replace extracting data from an authoritative CMDB/IT reference for provisioning known hosts. It can be used to supplement the data from the authoritative references.

At this time, two “discovery” modules are available:
  • Network based discovery using nmap
  • VMware based discovery, using the script communicating with a vCenter installation.

It is suggested to execute both discovery modules in one pass, because one module can use data from the other.

Setup nmap discovery

The network discovery scans your network and sets up a basic monitoring configuration for all your hosts and network services. It uses the nmap tool.


sudo apt-get install nmap


yum install nmap

Windows: Not available at this time.

You need to setup the nmap targets in the file /etc/shinken/resource.d/nmap.cfg: For nmap:


This will scan the localhost, one of the numerous Google server and your LAN. Change it to your own LAN values of course!


This value can be changed without modifying this file with the -m discovery script argument

Setup the VMware part


Of course, if you do not have a vCenter installation, skip this part ...

You will need the script. You can get it at and install it in your standard plugin directory (should be /var/lib/plugins/nagios by default).

You need to setup vcenter acces in the file /etc/shinken/resource.d/vmware.cfg: Enter your server and credential (can be an account domain)


Launch it!

Now, you are ready to run the discovery tool:

This call will create hosts and services for nmap and vmware (vsphere) scripts in the /etc/shinken/discovery/discovery directory.

sudo shinken-discovery -o /etc/shinken/objects/discovery -r nmap,vsphere

If you are lazy and do not want to edit the resource file, you can set macros with the -m arguments:

sudo shinken-discovery -o /etc/shinken/objects/discovery -r nmap -m "NMAPTARGETS= localhost"

You can set several macros, just put them on the same -m argument, separated by a comma (,).


The scan can take quite a few minutes if you are scanning a large network, you can go have a coffee. The scan timeout is set to 60 minutes.

Restart Shinken

Once the scan is completed, you can restart Shinken and enjoy your new hosts and services:

sudo /etc/init.d/shinken restart

More about discovery

If you want to know more about the discovery process, like how to create a discovery script or define creation rules, consult the advanced discovery documentation.

Read the Docs v: latest
On Read the Docs
Project Home

Free document hosting provided by Read the Docs.