Configuring Tracking Listener

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Configuring Tracking Listener

Tracking Listener does not have a graphical interface. It must be configured using the settings files located in the trackinglistener/conf folder. The settings are described below.

tracking.properties file

This is the main configuration file. Other configuration files may be required, depending on the options selected. Each parameter is made up of a key=value pair. The keys are unique. Lines starting with # are comments.

The various parameters are described below.

Receivers

 

#Receivers to load (one or many)

receiver.1=jmap.extensions.tracking.listener.receiver.TrackingTCPReceiver

receiver.2=jmap.extensions.tracking.listener.receiver.TrackingUDPReceiver

receiver.3=jmap.extensions.tracking.listener.receiver.FilesReceiver

#receiver.4=jmap.extensions.tracking.listener.receiver.Simulator

 

This section contains the configuration of the Tracking Listener's receivers. These modules are responsible for receiving the data using various methods. Several receivers can be used simultaneously. Each receiver has its own settings file.

The main receivers are TrackingTCPReceiver (receives data through TCP/IP, TCP protocol) and TrackingUDPReceiver (receives data through TCP/IP, UDP protocol). Depending on the configuration of the geolocation and TCP/IP transmission equipment, either one of these receivers can be used. Each one has its own settings file.

FileReceiver is less commonly used than the others; it may be used to load data from files.

Simulator is used to simulate data reception by Tracking Listener.

 

#Send alarm if no activity for the specified timeout (ms)

activity.alarm.enabled=true

activity.alarm.timeout=43200000

 

This section allows you to configure alarms that will be sent if no data is received for a given period of time. This can be useful to identify unusual activity (e.g. loss of network connection).

The activity.alarm.enabled parameter allows you to enable (true) or disable (false) sending alarms.

The activity.alarm.timeout parameter is used to define the inactivity period (in milliseconds) after which an alarm will be sent.

Cache

 

#Cache system to load (only one)

cache=jmap.extensions.tracking.listener.cache.FileCache

#cache=jmap.extensions.tracking.listener.cache.MemoryCache

 

This section contains the configuration of the cache system used by Tracking Listener. Tracking Listener uses this cache to store the data received before sending it to the persistence system. If the persistence system is not operating normally, the cache will store the data to prevent it from being lost. In the event data accumulates in the cache, Tracking Listener can send alarms. Refer to the section on alarms for more information.

There are 2 modules. The FileCache module stores data on the disk (trackinglistener/cache folder). Should Tracking Listener experience an interruption, the data on the disk will be reread and sent to the persistence system to minimize data loss. If data accumulates in the cache, disk space usage will increase, which is generally not a problem if this occurs for a short period of time. The cache module is recommended. The settings file for this module does not contain any settings.

The MemoryCache module stores in-memory data. If Tracking Listener is restarted, cached data will be lost. In addition, if cached data accumulates, the memory can become saturated quickly. When possible, it is preferable to use the FileCache module. This module's settings file does not contain any settings.

 

#Send an alarm if cache size becomes higher than specified value.

#Resend alarm if size grows by the specified factor

cache.size.alarm.enabled=true

cache.size.alarm.value=100

cache.size.alarm.value.factor=2

 

This section explains how alarms are sent when data accumulates in the cache.

The cache.size.alarm.enabled setting is used to enable (true) or disable (false) sending alarms.

The cache.size.alarm.value setting determines the size of cached data required to send an alarm. When the cache reaches this limit, an alarm is sent.

The cache.size.alarm.value.factor parameter determines the frequency of subsequent alarms sent until the situation returns to normal. For example, if the value of this factor is 2, a new alarm will be sent each time the size of cached data is doubled. For a value of 100 and a factor of 2, alarms will be sent when the cached data reaches 100, 200, 400, 800, and so forth. This function is used to limit the number of alarms sent.

Decoders

 

#Decoders to load (one or many)

decoder.1=jmap.extensions.tracking.listener.decoder.CypressDecoder

#decoder.2=jmap.extensions.tracking.listener.decoder.BluetreeDecoder

#decoder.3=jmap.extensions.tracking.listener.decoder.CypressDickeyJohnDecoder

 

This section describes the modules used to decode messages coming from geolocation equipment. Each decoder is designed to decode the messages of a specific type of equipment. Several decoders can be used simultaneously. New decoders can be developed to support additional equipment types.

CypressDecoder is the most commonly used decoder with Tracking. It is used to decode messages sent by Cypress' Chameleon CTM equipment.

CypressDisckeyJohnDecoder is used to decode messages originating from Cypress equipment connected to Dickey-John application control systems. Using this module, winter maintenance data can be viewed and analyzed with Tracking.

The existing decoders do not have any settings files.

Persistence Handlers

 

#Persistence handler to load (only one)

handler=jmap.extensions.tracking.listener.persistence.JDBCHandler

#handler=jmap.extensions.tracking.listener.persistence.JMapServerHandler

#handler=jmap.extensions.tracking.listener.persistence.Simulator

 

This section describes the persistence management modules. Persistence modules are used to store the information Tracking Listener receives. Only one persistence management module can be configured at a time.

The JDBCHandler module persists the data directly in a relational database (Tracking database). You can use this module if your network architecture allows Tracking Listener to connect to the Tracking database directly. This module has its own settings file.

The JMapServerHandler module delegates data persistence to JMap Server. All the data received will be sent to JMap Server, which handles persistence in the Tracking database. This module has its own settings file.

The Simulator module is used for test purposes only and does not handle any persistence.

 

#Persistence thread pool size

threadpool.size=2

 

This setting is used to define how many threads will be used for persistence. This can be used to execute simultaneous persistence tasks when a large volume of data is received. The default value of 2 is appropriate in most situations.

Filters

 

#Filters (zero, one or many)

#filter.0=jmap.extensions.tracking.listener.filter.TrackingDataFilterSpeedValidity

 

This section contains the configuration of the filter modules. Filters are optional and are used to filter the data received from geolocation devices.

The only filter available is TrackingDataFilterSpeedValidity. It allows you to ignore data received if the speed indicated is 0 or lower. Other filters can be added as needed.

SMTP

 

#SMTP parameters for sending alarms using email

smtp.host=mail.k2geospatial.com

smtp.username=someuser

smtp.password=apassword

smtp.from=tracking@k2geospatial.com

smtp.recipients=manager@k2geospatial.com

 

This section allows you to define settings to send alarms by email. If no settings are defined, no email can be sent.

The smtp.recipients parameter is used to define the email addresses of the people who will receive the alarms. Separate the addresses using the " ; " character.

Logs

 

log.level=info

 

Tracking Listener has a log file. This parameter defines the level of information to record in the log. The log files are located in trackinglistener/logs.

The available levels are: all, debug, info, error, and fatal.

Settings files of the modules

jmap.extensions.tracking.listener.receiver.TrackingTCPReceiver.properties file

 

port=3636

 

This file contains a single parameter that defines the port to be used by the TrackingTCPReceiver module in order to receive data via the TCP protocol. The port can be different, depending on your needs.

jmap.extensions.tracking.listener.receiver.TrackingUDPReceiver.properties file

 

port=3637

 

This file contains a single parameter that defines the port to be used by the TrackingUDPReceiver module in order to receive data via the UDP protocol. The port can be different, depending on your needs.

jmap.extensions.tracking.listener.receiver.Simulator.properties file

 

delay.min=3000

delay.max=10000

 

#MOBILEID=X,Y,INPUT,DIRECTION|...

Mobile_1=-73.56769676273318,45.494208187827,0,0|-73.56485608621003,45.492955408051074,1,0|-73.59709811452376,45.47284507389789,1,0

Mobile_2=-73.66769676273318,45.474208187827,0,0|-73.46485608621003,45.292955408051074,1,0|-73.49709811452376,45.67284507389789,0,0

 

This file contains the parameters of the Simulator module. This module is used to simulate data reception by Tracking Listener. The simulator reads the data of this file and simulates data reception, with a variable frequency.

The delay.min and delay.max parameters determine the frequency (in milliseconds) of the data simulated by the simulator. The delay is random and always falls between the minimum delay and maximum delay.

The following lines are used to set the list of mobiles simulated as well as their simulated behaviour. Each line starts with the name of the mobile (the key) and contains series of 4 values separated by " | " characters. Each series contains the x and y coordinates, the value of the entries and the mobile's direction. Once the end of the line is reached for a mobile, the simulator restarts from the beginning.

jmap.extensions.tracking.listener.persistence.JDBCHandler.properties file

 

# Parameters for JDBC persistence

jdbc.driver=org.gjt.mm.mysql.Driver

jdbc.url=jdbc:mysql://localhost:3306/tracking?useCursorFetch=true

jdbc.username=root

jdbc.password=

jdbc.poolsize=1

 

This file contains the settings of the JDBCHandler module. These parameters are used to establish a JDBC connection with a relational database system.

The jdbc.driver parameter indicates which class of the JDBC pilot must be used. This class must be in the Java classpath.

The jdbc.url parameter is the database connection string. It varies based on the chosen pilot.

The jdbc.username and jdbc.password parameters contain the database authentication information.

You can activate the password encryption using the password(mot_de_passe) function.

Example: jdbc.password=password(Bonjour!123)

The password written in clear text will automatically be replaced by the password encrypted in the file.

jmap.extensions.tracking.listener.persistence.JMapServerHandler.properties file

 

poolid=99

 

# Parameters for JMapServer

# connectionmode : CONNECTION_DIRECT or CONNECTION_PROXY

 

jmapserver.host=localhost

jmapserver.port=7003

jmapserver.httpport=8080

jmapserver.proxypath=/jmap/servlet/jmapproxy

jmapserver.serverid=jmap

jmapserver.connectionmode=CONNECTION_DIRECT

jmapserver.username=administrator

jmapserver.password=

 

This file contains the parameters of the JMapServerHandler module. These parameters are used to establish a connection with JMap Server.

The jmapserver.host and jmapserver.port parameters define the options for a direct connection (if jmapserver.connectionmode=CONNECTION_DIRECT).

The jmapserver.httpport, jmapserver.proxypath and jmapserver.serverid parameters define the options for a proxy connection (if jmapserver.connectionmode=CONNECTION_PROXY).

The jmapserver.username and jmapserver.password parameters contain the JMap Server authentication information.

You can enable the password encryption using the password(mot_de_passe) function.

Example: jmapserver.password=password(Bonjour!123)

The password written in clear text will automatically be replaced by the password encrypted in the file.