ntopng/attic
2023-11-22 11:33:51 +00:00
..
doc/src/plugins Migrates alerts to an object-oriented implementation 2020-12-22 09:56:38 +01:00
httpdocs Moved no more used files to attic 2023-10-16 13:12:16 +00:00
include Fix some errors and leaks found while fuzzing locally (#7757) 2023-08-14 17:15:20 +02:00
scripts Moved active local host caching into periodic host check 2023-11-22 11:33:51 +00:00
src Updated ndpi alerts (#7200) 2023-02-09 18:46:37 +01:00
tools Cleanup nindex tool 2022-07-06 18:27:23 +02:00
AlertCheckLuaEngine.cpp Added changed files with merge 2021-12-28 15:59:13 +01:00
AlertCheckLuaEngine.h Added changed files with merge 2021-12-28 15:59:13 +01:00
arp_matrix_graph.lua Updated (C) 2021-01-02 12:08:23 +01:00
arp_matrix_utils.lua Updated (C) 2021-01-02 12:08:23 +01:00
ArpStatsHashMatrix.cpp Copyright update (C) 2022-01-03 09:35:09 +01:00
ArpStatsHashMatrix.h Copyright update (C) 2022-01-03 09:35:09 +01:00
ArpStatsMatrixElement.cpp Copyright update (C) 2022-01-03 09:35:09 +01:00
ArpStatsMatrixElement.h Copyright update (C) 2022-01-03 09:35:09 +01:00
CommunityIdFlowHash.cpp Window fixes 2019-06-29 18:54:19 +02:00
CommunityIdFlowHash.h Copyright update (C) 2022-01-03 09:35:09 +01:00
ControlGroups.cpp Copyright update (C) 2022-01-03 09:35:09 +01:00
DivertInterface.cpp Deprecated inline capabilities now implemented in nEdge 2018-07-23 10:53:10 +02:00
DivertInterface.h Deprecated inline capabilities now implemented in nEdge 2018-07-23 10:53:10 +02:00
experimental.lua Replace anomalous with misbehaving to avoid inconsistencies (fix #2866) 2020-01-14 15:49:19 +01:00
FrequentNumericItems.cpp Copyright update (C) 2022-01-03 09:35:09 +01:00
FrequentNumericItems.h Copyright update (C) 2022-01-03 09:35:09 +01:00
FrequentTrafficItems.cpp Copyright update (C) 2022-01-03 09:35:09 +01:00
FrequentTrafficItems.h Copyright update (C) 2022-01-03 09:35:09 +01:00
get_arp_matrix_data.lua Updated (C) 2021-01-02 12:08:23 +01:00
host_sflow_distro.lua fix system view and add rtt host from host_details 2020-03-23 17:38:22 +01:00
prometheus.lua Handle end time on timeseries. (#7438) (#7466) 2023-05-29 15:20:11 +02:00
README.prometheus.md Moved Prometheus to attic 2020-03-19 12:58:48 +01:00
sflow_tree.lua fix system view and add rtt host from host_details 2020-03-23 17:38:22 +01:00
TimeSeries.cpp Code cleanup 2023-01-16 11:47:39 +01:00
TimeSeries.h Code cleanup 2023-01-16 11:47:39 +01:00

Introduction

This readme explains how to integrate ntopng with http://prometheus.io time series database. Prometheus polls data from ntopng that must expose the /metrics URL (pull model).

Installation

After installing prometheus, in order to run it you will need a configuration file. You can use the one provided in the [https://prometheus.io/docs/introduction/getting_started/] (getting started guide).

prometheus --config.file=/etc/prometheus/prometheus.yml

You may also want to enable the admin API (for example to delete old timeseries). In this case, add the corresponding option

prometheus --config.file=/etc/prometheus/prometheus.yml --web.enable-admin-api

By default, it will start a webserver on port 9090. Verify the connection before proceeding.

In order to start monitoring ntopng,

[1] Go inside ntopng preferences -> Timeseries then select Prometheous and save it

[2] you should add a new job to the scrape_configs section in your prometheus.yml:

# A scrape configuration containing exactly one endpoint to scrape:
scrape_configs:
  - job_name: 'ntopng'

    # This is the polling interval. It will affect your data resolution and cpu load.
    # NOTE: keep in sync with "poll_interval" in metrics.lua
    scrape_interval: 10s

    target_groups:
      # This must match your ntopng host and port
      - targets: ['localhost:3000']

Since prometheus does not support custom HTTP headers for authentication, you have two options:

  • disable ntopng login, either locally (-l 0) or both locally and remotely (-l 1)
  • setup an HTTP proxy like nginx to add authentication headers through it

Visualization

You can connect to the prometheus GUI at http://localhost:9090 and see timeseries

LIMITATION

Currently ntopng is able to write into prometheus but not to read from it and display data in the GUI