ntopng/doc/src
2024-04-16 15:16:30 +02:00
..
_static/css
adding_a_license Updated license key installation 2023-02-01 23:26:59 +01:00
advanced_features Change Allowed, Denied -> Authorized, Unauthorized and relocate the learning period preferences of OT Protocols. 2024-01-19 17:50:48 +01:00
alerts Add usage metric in SNMP devices rules. 2024-01-19 11:15:19 +01:00
api Fixes ntop.isshutdown function not exists 2023-10-26 13:54:29 +00:00
basic_concepts Doc: add Alerts Explorer section 2023-10-13 11:38:47 +02:00
cli_options Remove deprecated doc 2024-03-26 18:03:08 +01:00
clickhouse Improved ClickHouse man page 2024-02-11 17:07:35 +01:00
doxygen
how_to_start Added section about Windows configuration file 2022-10-06 19:38:52 +02:00
img Update SNMP device rules doc. 2024-04-16 15:16:30 +02:00
interfaces Added note on ntap 2022-09-02 09:29:30 +02:00
kafka Updated to version 6.1 2023-11-02 17:29:20 +01:00
performances Updated performance and sizing 2023-03-28 11:18:28 +02:00
reports Note about the periodic reports availability 2024-01-24 14:53:22 +01:00
scada Typos 2023-06-05 23:16:35 +02:00
scripts Doc cleanup 2024-02-14 18:43:25 +01:00
snmp Update SNMP device rules doc. 2024-04-16 15:16:30 +02:00
third_party_integrations Doc update 2024-03-18 12:48:26 +01:00
use_cases Update doc with new images and fix typo. 2023-10-06 16:58:32 +02:00
using_with_other_tools Remove deprecated doc 2024-03-26 18:03:08 +01:00
vulnerability_scan [VS] Add historical reports. (#8015) (#7950) 2023-11-20 17:06:23 +01:00
web_gui Add TCP flow connection state (#8210) 2024-02-28 14:45:49 +01:00
conf.py Updated to version 6.1 2023-11-02 17:29:20 +01:00
containers.rst Fixes link in the documentation 2024-03-04 06:02:03 -05:00
example.rst Remove --online-license-check from the help and doc 2021-10-15 09:17:32 +02:00
example_api.lua
faq.rst Updated ntopng doc 2023-10-06 09:58:15 +00:00
historical_flow_analysis_json_example.rst Updated ntopng doc 2023-10-06 09:58:15 +00:00
historical_flows.rst Add TCP flow connection state (#8210) 2024-02-28 14:45:49 +01:00
index.rst Fix menu 2023-12-29 09:17:18 +01:00
Makefile Initial PDF support #7332 2023-05-13 12:48:13 +02:00
operating_ntopng_on_large_networks.rst
README.md Updated doc with latest python3 webserver 2023-06-19 15:07:24 +00: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 Improved windows installation notes 2023-10-10 23:33:28 +02: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; python3 -m http.server 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.