ntopng/attic
2020-08-18 15:10:04 +02:00
..
doc/src/plugins Unifies status_id and status_key 2020-04-15 14:29:03 +02:00
httpdocs Cleanup old fontawesome 4 and bootstrap 3 2019-12-09 15:35:39 +01:00
include Fixes crash and removes unused PortContactStats 2020-03-27 13:36:51 +01:00
scripts/lua Refactors NtopngUtils into NtopUtils 2020-08-18 15:10:04 +02:00
src Fixes crash and removes unused PortContactStats 2020-03-27 13:36:51 +01:00
arp_matrix_graph.lua fix for system view 2020-03-24 12:39:08 +01:00
arp_matrix_utils.lua ArpMatrix code moved to attic 2020-01-30 09:57:32 +01:00
ArpStatsHashMatrix.cpp ArpMatrix code moved to attic 2020-01-30 09:57:32 +01:00
ArpStatsHashMatrix.h ArpMatrix code moved to attic 2020-01-30 09:57:32 +01:00
ArpStatsMatrixElement.cpp ArpMatrix code moved to attic 2020-01-30 09:57:32 +01:00
ArpStatsMatrixElement.h ArpMatrix code moved to attic 2020-01-30 09:57:32 +01:00
CommunityIdFlowHash.cpp Window fixes 2019-06-29 18:54:19 +02:00
CommunityIdFlowHash.h Improved scheduling algorithm to guarantee minimum service time when number of entries allow 2020-01-06 23:36:36 +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 Partial fix (community code is now clean) for #2533 2020-08-07 17:20:26 +02:00
FrequentNumericItems.h Partial fix (community code is now clean) for #2533 2020-08-07 17:20:26 +02:00
FrequentTrafficItems.cpp Partial fix (community code is now clean) for #2533 2020-08-07 17:20:26 +02:00
FrequentTrafficItems.h Partial fix (community code is now clean) for #2533 2020-08-07 17:20:26 +02:00
get_arp_matrix_data.lua ArpMatrix code moved to attic 2020-01-30 09:57:32 +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 Moved Prometheus to attic 2020-03-19 12:58:48 +01: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

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