Using nmap to generate Nagios config.

I need to add hosts quickly to Nagios, I do this by scanning the hosts using nmap and generating a config with the output. ThenĀ IĀ setup a Nagios client on the host and monitor the vitals.

This process takes time, so i wrote a script which will generate the configuration for me using the nmap results. see below.