Integrating External Tools¶
Some user might want to use netlab with external management tools (example: Graphite, SuzieQ, Prometheus…). netlab can automatically generate the configuration files for these tools and start them as the last step in the netlab up process (after the lab has been configured).
The external tools started with netlab can access the management network and the management interfaces of lab devices. If you need access to lab links start your tool as a Linux container with a custom image.
Tools are started as Docker containers. You have to run your labs on a Linux server with Docker to use external tools with netlab.
When using containers as lab devices netlab connects tool containers to the lab management network and they get IPv4 addresses from the beginning of the management IPv4 prefix. Do not change addressing.mgmt.start parameter to a very low value when using external tools.
Using the External Tools¶
Adding a tool to the lab is as easy as adding an entry to the tools dictionary. For example, to start SuzieQ together with the lab, simple add the following two lines to the lab topology file:
You can configure individual tools using parameters in the tool-specific dictionary. Some of these parameters are system-defined, others are defined by the tool creator. System-defined parameters include:
runtime – execution environment. The only supported value is docker (Docker container dynamically pulled from a container repository). If you want to start the tools on the Linux host, define local execution environment (details).
For the list of tool-specific parameters see the individual tool description.
Enabling Tools in User Defaults¶
You can change user defaults to start an external tool with every lab topology – all you have to do is to set the defaults.tools.toolname.enabled attribute to
For example, to use Graphite GUI with every lab you start, add the following line to
netlab includes definitions for the following tools:
It’s relatively easy to add your own tools to the defaults.tools dictionary. Read Adding Custom External Tools to netlab for more details.