How to connect to the Netmon database
From Netmon
In order to remotely connect to the Netmon database, you must complete the following tasks:
1. Acquire ODBC drivers
The latest ODBC driver for PostgreSQL (the database engine used by Netmon) can be found on the [PostgreSQL ODBC driver download page].
In order to make a remote connection to a PostgreSQL device from a Windows desktop, this driver is required.
2. Edit Netmon database configuration settings
There are two files that need to be modified, both in the directory /etc/postgresql/8.1/main/
- /etc/postgresql/8.1/main/pg_hba.conf
Append the following configuration line to give access to your local network:
host all all X.X.X.X/YY trust
Replace X.X.X.X with the network ID of your LAN (it is the part of your computer's IP address not "covered" by the network mask, with all remaining octets replaced by 0. For example, if your network mask setting is 255.255.255.0 and your IP address is 10.10.1.99, your network ID is 10.10.1.0.)
Replace YY with the subnet bits of your network - this is a shorthand way of writing the network mask - for a network mask of 255.255.255.0 the subnet bits value is /24, because 24 bits of the IP address are devoted to the network ID.
Save and close the file once this has been done.
- /etc/postgresql/8.1/main/postgresql.conf
In this file, you must find the line which reads
#listen_address='localhost'
and replace it with the following line (don't forget to remove the # at the beginning of the line):
listen_address='*'
Once you have done this, the database engine must be restarted. This can be done by restarting the PostgreSQL service, but since the Netmon daemons all depend on the database, they must also be restarted. To accomplish this, execute the following two commands from a root command prompt on your Netmon device:
/etc/init.d/postgresql-8.1 restart
/etc/init.d/netmon restart
When configuring your ODBC connection from Windows, use the following information: Database: netmon35 User: root Password: [leave it blank]
You now should be able to connect to the Netmon database via ODBC.
SQL Queries
The following articles provide SQL queries that you can exploit once remote database connectivity has been established.
Navigation
