ntopng/doc/src
2022-05-16 19:22:14 +02:00
..
_static/css Docs improvements 2020-04-06 16:34:58 +02:00
active_monitoring Doc update active monitoring 2021-07-30 11:56:22 +02:00
adding_a_license Minor documentation changes 2021-08-20 10:55:00 +02:00
advanced_features Add token instructions 2022-05-13 15:22:19 +02:00
alerts Minor changes 2022-04-26 21:36:38 +02:00
api Updated documentation (#6494) 2022-04-06 10:46:20 +02:00
basic_concepts Minor cleanup 2022-05-09 09:10:26 +02:00
cli_options Improved -m description 2022-02-16 10:34:33 +01:00
clickhouse Updated historical flows explorer menu location 2022-05-16 19:22:14 +02:00
developing_alerts Removed plugin word and updated docs 2022-02-11 12:07:23 +01:00
doxygen Fix documentation errors in .lua.cpp files 2019-07-01 18:40:14 +02:00
how_to_start Documents configuration script ntopng-config 2021-08-17 15:56:52 +02:00
img add token screenshot 2022-05-13 15:02:19 +02:00
interfaces Improved description (#6152) 2022-01-08 18:41:18 +01:00
performances Documents ClickHouse support 2021-11-18 11:01:18 +01:00
scripts Removed plugin word and updated docs 2022-02-11 12:07:23 +01:00
self_monitoring Removed plugin word and updated docs 2022-02-11 12:07:23 +01:00
third_party_integrations Move suricata guide 2022-02-08 10:34:45 +01:00
use_cases License refresh 2021-10-21 12:06:00 +02:00
using_with_other_tools Dox fix 2022-01-28 11:06:55 +01:00
web_gui Updated documentation (#6207) 2022-04-21 12:27:52 +02:00
conf.py Updated flow dump documentation 2022-03-20 08:26:16 +01:00
example.rst Remove --online-license-check from the help and doc 2021-10-15 09:17:32 +02:00
example_api.lua Document the host and network user scripts C API 2020-04-02 18:03:45 +02:00
faq.rst Minor cleanup 2022-05-09 09:10:26 +02:00
historical_flows.rst Updated flow dump documentation 2022-03-20 08:26:16 +01:00
index.rst Removed plugin word and updated docs 2022-02-11 12:07:23 +01:00
Makefile lua doxygen documentation skeleton and integration with read the docs 2018-05-31 01:46:42 +02:00
operating_ntopng_on_large_networks.rst Explain performance impact of local hosts cache 2020-03-10 17:05:30 +01:00
README.md Standardize spelling CSS in docs 2020-08-17 16:45:40 +09:00
using_with_nprobe.rst Documentation update 2021-06-17 18:57:00 +02:00
using_with_nprobe_agent.rst Documentation update 2021-06-17 18:57:00 +02:00
what_is_ntopng.rst Doc update 2022-01-21 10:03:53 +01:00

Documentation

Ntopng documentation uses read the docs and .rst file format.

Requirements

On ubuntu:

apt-get install doxygen
pip install breathe sphinx==1.7.9

Note: newer sphinx versions (e.g. 1.8.0) have a bug with search: https://github.com/sphinx-doc/sphinx/issues/5460

Generate

The ntopng documentation can be generated by executing make release.

It can be easily tested locally by running a python webserver:

  pushd _build/html; python -m SimpleHTTPServer 8080; popd

Lua C API

The Lua C API documentation can be found inside the api/lua_c directory.

The functions documentation is written in .lua file (e.g. api/lua_c/ntop/ntop_users.lua). These are the files to modify to update the API documentation.

Functions are organized in a directory structure in the form api/lua_c/{object}/{api_group}.lua, where {object} is a C API reg (eg. interface) and {api_group} is a group of API functions relevant to the same topic (e.g. interface_hosts is for API functions that work with hosts).

Only a subset of the functions defined in src/LuaEngine.cpp are documented as API. They are marked with the // ***API*** comment. Whenever an API function is modified, the corresponding documentation file should be updated.

Here is how to perform some recurrent operations on the documentation:

  • Add/modify a function documentation: e.g. to update the ntop.setCache documentation, the file api/lua_c/ntop/ntop_cache.lua should be modified.

  • Add a new group of API functions for an existing C API reg: e.g. to group together all the host pools functions, the following modifications should be performed:

    • create api/lua_c/interface/interface_host_pools.lua.
    • create api/lua_c/interface/interface_host_pools.rst. Adapt this from an existing .rst.
    • edit api/lua_c/interface/index.rst and add interface_host_pools to the toctree section.
  • Add a new C API reg: e.g. to add a new db reg so that we can call db.some_function functions, it's necessary to:

    • create api/lua_c/db/index.rst. Adapt this from an existing .rst.
    • edit api/lua_c/index.rst and add db/index to the toctree section.

Fixing API prefixes

Lua C API usually have a prefix which indicates the Lua table under which the API is present, e.g. ntop.isAdministrator has the ntop prefix, whereas interface.getid() has the interface interface prefix. In order to correctly show such prefix in the documentation its necessary to edit the _static/css/ntop.css file and add a CSS content definition.