Couchbase lends itself well to real-time monitoring and logging applications. With its simple setting and retrieval mechanisms, putting data in and getting data out are extremely simplified. In this example application, as you will see, there is more code to run the monitoring side of things than there is for the database interaction.
A simplified approach to network monitoring can be taken by simply scanning whether a host is responsive and by checking the availability of open network ports on the system. In this example application we use a Python library that gives simplified access to the nmap port scanning toolset. Data retrieve from the nmap module is that stored in the database for later use.