Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Configuring NtopNG to log to external MySQL server

    Scheduled Pinned Locked Moved Traffic Monitoring
    5 Posts 4 Posters 7.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kaze
      last edited by

      Hello, how do you setup NtopNG to log to a remote MySQL server ?
      do I need to edit  /usr/local/etc/rc.d/ntopng.sh ?

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        Not now, no… https://redmine.pfsense.org/issues/7000

        Pull requests -> https://github.com/pfsense/FreeBSD-ports/tree/devel/net/pfSense-pkg-ntopng

        1 Reply Last reply Reply Quote 0
        • B
          bradi
          last edited by

          Hi, I have ntopng installed and configured to log historical data to mysql.  However on restart of service it seems to replace the rc script with original package settings.  Is there a way I can prevent this behavior?

          
          #!/bin/sh
          # This file was automatically generated
          # by the pfSense service handler.
          
          # Updated 2017-03-01 to support historical data logging to MySQL
          # ntopng parameter : -F "mysql;{host|socket};{dbname};{tablename};{user};{password}"
          # or
          # ntopng parameter : --dump-flows "mysql;{host|socket};{dbname};{tablename};{user};{password}" 
          
          rc_start() {
          		/usr/local/bin/redis-server --bind 127.0.0.1 ::1 --dir /var/db/ntopng/ --dbfilename ntopng.rdb &
          	/usr/local/bin/ntopng --data-dir /var/db/ntopng --pid /var/run/ntopng.pid --dump-flows "mysql;192.168.1.15;ntopng;flows;ntopng;password" --dont-change-user --daemon --http-port 0 --https-port 3000 --interface 'vtnet0' --dns-mode '0' --local-networks '192.168.1.0/24' &
          
          }
          
          rc_stop() {
          	/usr/bin/killall ntopng redis-cli redis-server
          
          }
          
          case $1 in
          	start)
          		rc_start
          		;;
          	stop)
          		rc_stop
          		;;
          	restart)
          		rc_stop
          		rc_start
          		;;
          esac
          
          
          1 Reply Last reply Reply Quote 0
          • D
            doktornotor Banned
            last edited by

            No, you need to patch the package properly as already noted above (or just uninstall the GUI part altogether).

            
            pkg delete pfSense-pkg-ntopng
            pkg install ntopng
            
            
            1 Reply Last reply Reply Quote 0
            • arrmoA
              arrmo
              last edited by

              Sorry, a bit confused here - but likely me … :(. I am having issues with ntopng though, the GUI seems to keep stopping / breaking, and as well. Two troubling items in the system log file,
              May 27 09:49:19 pfSense bandwidthd: Postgresql logging selected but postgresql support is not compiled into binary.  Please check the documentation in README, distributed with this software.

              Hmmm ... does the installed version of ntopng really include postgresql support? Also, with ntopng down yet again, I also see this in the log quite a bit,
              May 27 16:54:04 pfSense kernel: pid 6475 (ntopng), uid 0: exited on signal 11 (core dumped)

              Finally, I did check the packages - should both of these exist,
              ntopng-2.4.2017.01.20_1        Network monitoring tool with command line and web interfaces
              pfSense-pkg-ntopng-0.8.6_1    pfSense package ntopng

              Any pointers you have would be greatly appreciated! I can't seem to keep ntopng up and running ... :(.

              Thanks!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.