Python extension for ntop

We can use Python to extend ntop through the ntop web server. The ntop web server can execute Python scripts. At a high level, the scripts will perform the following:

  • Methods to access the state of ntop
  • The Python CGI module to process forms and URL parameters
  • Making templates that generate dynamic HTML pages
  • Each Python script can read from stdin and print out stdout/stderr
  • The stdout script is the returned HTTP page

There are several resources that come in handy with the Python integration. Under the web interface, you can click on About|Show Configuration to see the Python interpreter version as well as the directory for your Python script:

Python version

You can also check the various directories where the ...

Get Mastering Python Networking - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.