ntopng/doc/src
Luca Deri 1d1ffa5637 Improved IEC documentation
Drafted Modbus
2023-06-04 11:03:00 +02:00
..
_static/css Docs improvements 2020-04-06 16:34:58 +02:00
adding_a_license Updated license key installation 2023-02-01 23:26:59 +01:00
advanced_features Reworked IEC 60870-5-104 documentation 2023-06-04 10:43:52 +02:00
alerts add note 2023-03-29 14:23:23 +00:00
api Reworked packaging 2023-05-24 23:19:01 +02:00
basic_concepts Updated documentation 2023-01-09 16:38:17 +01:00
cli_options Updated elasticsearch configuration 2023-02-01 12:06:43 +01:00
clickhouse Updated manual with clickhouse cluster information 2023-01-17 14:13:22 +01:00
doxygen Fix documentation errors in .lua.cpp files 2019-07-01 18:40:14 +02:00
how_to_start Added section about Windows configuration file 2022-10-06 19:38:52 +02:00
img Improved IEC documentation 2023-06-04 11:03:00 +02:00
interfaces Added note on ntap 2022-09-02 09:29:30 +02:00
kafka Typo 2022-11-03 12:26:10 +01:00
performances Updated performance and sizing 2023-03-28 11:18:28 +02:00
scada Improved IEC documentation 2023-06-04 11:03:00 +02:00
scripts Fix links 2022-09-29 12:18:01 +02:00
snmp Updated SNMP rules documentation 2023-06-01 10:57:36 +02:00
third_party_integrations Update suricata.rst 2023-05-29 16:20:43 +02:00
use_cases Fixes for #6615 2023-02-02 16:13:03 +01:00
using_with_other_tools Update doc (a single zmq keypair is generated) 2023-05-30 18:09:28 +02:00
web_gui Add Server Ports Analysis page. (#7493) (#7498) 2023-05-29 16:26:03 +02:00
conf.py Initial PDF support #7332 2023-05-13 12:48:13 +02:00
containers.rst Fixes for #6615 2023-02-02 16:13:03 +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 Updated performance and sizing 2023-03-28 11:18:28 +02:00
historical_flows.rst Updated flow dump documentation 2022-03-20 08:26:16 +01:00
index.rst Reworked IEC 60870-5-104 documentation 2023-06-04 10:43:52 +02:00
Makefile Initial PDF support #7332 2023-05-13 12:48:13 +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.