Using Nagios For Monitoring Trimble GNSS Receivers

As part of the testing that I do I have a significant number, normally around 12, of receivers that are being run 24/7. The 24/7 is the theory, but in practice there is often one not working correctly due to a configuration issue, especially after firmware updates

Nagios is a Open Source Network monitoring tools, which is extended by adding plug-ins, the standard installation supports checking most of the basic parts of the receiver operation, but there will need to be special plugin’s for Trimble Specific applications.

I am running Nagios on Ubuntu which has a few little tweaks to get this running the way we want. The main change that is required, if you are doing NTRIP data testing, is to change the service_check_timeout in the main configuration, 90 seconds is normally good enough

service_check_timeout=90

Posted in Uncategorized | Comments Off on Using Nagios For Monitoring Trimble GNSS Receivers

Nagios Installation

There are two things that you need to do for Nagios on Ubuntu

Fix the Disk Monitor, to solve the /home/name/.gvfs is not accessible problem.

You need to add -A -i ‘.gvfs’ to the end of the command lines in the disk.cmd
nagios3 plugin. (/etc/nagios-plugins/config)

See, http://forums.meulie.net/viewtopic.php?f=61&t=4502.

You will also want to allow commands via the web interface. As root at the terminal type

/etc/init.d/nagios3 stop
dpkg-statoverride –update –add nagios www-data 2710 /var/lib/nagios3/rw
dpkg-statoverride –update –add nagios nagios 751 /var/lib/nagios3
/etc/init.d/nagios3 start

You also need to change the nagios.cfg file (/etc/nagios3/nagios.cfg)

# EXTERNAL COMMAND OPTION
# This option allows you to specify whether or not Nagios should check
# for external commands (in the command file defined below). By default
# Nagios will *not* check for external commands, just to be on the
# cautious side. If you want to be able to use the CGI command interface
# you will have to enable this.
# Values: 0 = disable commands, 1 = enable commands

check_external_commands=1

I also generally tell the system to check for commands only every second

# EXTERNAL COMMAND CHECK INTERVAL
# This is the interval at which Nagios should check for external commands.
# This value works of the interval_length you specify later. If you leave
# that at its default value of 60 (seconds), a value of 1 here will cause
# Nagios to check for external commands every minute. If you specify a
# number followed by an “s” (i.e. 15s), this will be interpreted to mean
# actual seconds rather than a multiple of the interval_length variable.
# Note: In addition to reading the external command file at regularly
# scheduled intervals, Nagios will also check for external commands after
# event handlers are executed.
# NOTE: Setting this value to -1 causes Nagios to check the external
# command file as often as possible.

#command_check_interval=15s

command_check_interval=1s

Posted in Uncategorized | Comments Off on Nagios Installation

Telling EXIM4 to avoid using TLS

Nagios as it is packaged for Ubuntu requires Exim4 for mail, which is poor since I should be able to use any mail agent. Especially since EXIM4 is a huge pain.

If you are using a SMTP server that supports TLS but doesn’t have a valid certificate, self signed internal (like trimble.com) or not for the real domain like TrimbleTool.com which is really bluehost then you can probably tell EXIM to just ignore the error, but it is easiest to just tell exim to not use TLS if what you are sending is not important.

To do this just add to the configuration file

hosts_avoid_tls = *

Posted in Uncategorized | Comments Off on Telling EXIM4 to avoid using TLS

Simulation of IBSS Rover Load

Simulation of IBSS Rover Load

Download IBSS_Client_Load.zip

While it is not a common thing that people would want, there is some times when you want to simulate load on a NTRIP caster, there is the system for NTRIP base station load but the rover load id generally more useful but for some cases you want to be able to simulate GPS/GNSS base stations.

The system is implemented as a bash script, which was mainly done since it was to be run on a LINUX host, it is an interesting example of what can be done in a script.

USAGE: Just run IBSS_Test.sh from the command line.

The system is controlled by environment variables, which are set in the configuration file.

Configuration File Settings


USER=grk
PASS=grkpassword
ORG=ntrip4
BASE_ORG=ntrip1
IBSS_SERVER=ibss.trimbleos.com
ADD_NUMBER_TO_USER_PASS=1

FIRST_CLIENT=191
LAST_CLIENT=200
DELETE_FILES=1
TEST_TIME=20

BASE=SPS852.INFO-\(ntrip1\)
#http_proxy=http://proxy.trimble.com:3128
http_proxy=
STARTUP_DELAY=0
TMP_DATA_PATH=/tmp


The parameters are as follows.

IBSS Caster Connection Settings

USER

User name for the NTRIP server

PASS

Password for the NTRIP server.

ORG

The organization that the user belongs to

ADD_NUMBER_TO_USER_PASS

If this is not set then all rovers will login with the same user name and password. When this is set the user name will have the current CLIENT Number added to the end of the username and password.

Eg.
Without add number to user
all users grk with a password of grkpassword
With add number to user
grk1 with a password of grkpassword1
grk2 with a password of grkpassword2

IBSS_SERVER

The base part of the DNS name, name suffix for the caster. ibss.trimbleos.com

Test Settings

When Server load is being generated you will have a number of simultaneous connections the number of connections defined by the FIRST_SERVER and LAST_SERVER, with the number of servers being Last-First.

The server number should be unique among all simultaneous connections, as some files are created for each server connection and having two with the same number will confuse the reporting.

FIRST_CLIENT and LAST_CLIENT

Integer: THe number for the CLIENT, CLIENT will be between FIRST_CLIENT and LAST_CLIENT

DELETE_FILES

0: Leave Temporary Files after test.
1: Delete Temporary Files after test, recommended

TEST_TIME

Test Time in Seconds

STARTUP_DELAY

The delay, in seconds between NTRIP client connections starting up

BASE

The Base Station to connect to

Misc Settings

TMP_DATA_PATH

Directory location that temp files shold be stored in /tmp is generally best or .

NOTES:

This generates a lot of processes, which a modern computer doesn’t have a lot of problems with, standard Linux installations can easily support 100 simulated NTRIP servers in a single test.

Mac OS X has limits that means you can simulate about 40 connections per test, you CAN have multiple tests running at once, or change the limits

Posted in Uncategorized | Tagged | Comments Off on Simulation of IBSS Rover Load

Simulation of NTRIP Server Load

Simulation of IBSS Base Station Server Load

Download the NTRIP_Server_Load system.

While it is not a common thing that people would want, there is some times when you want to simulate load on a NTRIP caster, there is the system for NTRIP client load which is generally more useful but for some cases you want to be able to simulate GPS/GNSS base stations.

The system is implemented as a bash script, which was mainly done since it was to be run on a LINUX host, it is an interesting example of what can be done in a script.

USAGE: Just run NTRIP_Server_Load.sh from the command line.

The system is controlled by environment variables, which are set in the configuration file. (If you need to run multiple at the same time pass a parameter)

Note that while it is called NTRIP load, it is is really a Trimble IBSS tester, the only difference being how the username and URL’s are formed.

Configuration File Settings


FAKE_LOAD=0
SOURCE_SERVER=sps852.com
SOURCE_PORT=28001
CHUNKED=1
BPS=220

USER=user
PASS=password
ORG=ntrip4
IBSS_SERVER=ibss.trimbleos.com
ADD_NUMBER_TO_USER_PASS=1

FIRST_SERVER=1
LAST_SERVER=50
DELETE_FILES=1
TEST_TIME=6000
STARTUP_DELAY=0
TMP_DATA_PATH=/tmp

BASE=Test_Server_
#http_proxy=http://proxy.trimble.com:3128
http_proxy=
#CYGWIN=1

The parameters are as follows.

Data Source Information

FAKE_LOAD

0 : Use a real source of GPS data
1 : Generate Fake data load.

Fake load is useful to just load up the server, but has the down side in that it means you can not use a GPS receiver as a test. You might want to use a combination of fake and real load.
Faked Load is human readable and of fixed length with a single line per second which makes checking for the number of records received as simple as a line count

BPS

n : Bytes per second of data to send when generating a fake load.

SOURCE_SERVER & SOURCE_PORT

The Server and port of a raw TCP socket that will provide the data that is sent to the caster. This source can be from any TCP connection, generally a CMR stream from a real receiver is used. There is only a single connection to the source server, it is recommended that this be a local connection.

CHUNKED

When sending data

0 : Send as a standard un-chunked stream
1 : Send the data in chunks

I believe that NTRIP2 servers should be chunked, but depending on the caster or proxy it may not be supported. It shouldn’t make any real difference. Chunking is designed so that the server knows when a full packet of data has been sent. Without chunking then the caster will just decent what is a packet

IBSS Caster Connection Settings

USER

User name for the NTRIP server

PASS

Password for the NTRIP server.

ADD_NUMBER_TO_USER_PASS

Not used at the moment

NOTE: User and password are not currently supported today.
The user name is fixed at SPS852-GAMELC1003
The password is fixed as password

ORG

The organization that the user belongs to

IBSS_SERVER

The base part of the DNS name, name suffix for the caster. ibss.trimbleos.com

Test Settings

When Server load is being generated you will have a number of simultaneous connections the number of connections defined by the FIRST_SERVER and LAST_SERVER, with the number of servers being Last-First.

The server number should be unique among all simultaneous connections, as some files are created for each server connection and having two with the same number will confuse the reporting.

FIRST_SERVER and LAST_SERVER

Integer: THe number for the server, servers will be between FIRST_SERVER and LAST_SERVER

DELETE_FILES

0: Leave Temporary Files after test.
1: Delete Temporary Files after test, recommended

TEST_TIME

Test Time in Seconds

STARTUP_DELAY

The delay, in seconds between NTRIP Server simulated loads

Misc Settings

TMP_DATA_PATH

Directory location that temp files shold be stored in /tmp is generally best or .

NOTES:

This generates a lot of processes, which a modern computer doesn’t have a lot of problems with, standard Linux installations can easily support 100 simulated NTRIP servers in a single test.

Mac OS X has limits that means you can simulate about 40 connections per test, you CAN have multiple tests running at once, or change the limits

Posted in Uncategorized | Tagged | Comments Off on Simulation of NTRIP Server Load

Sending a Clone file to a receiver

Generally when you upgrade the firmware in a Trimble GNSS receiver it will keep the same settings. There are some cases, mainly a downgrade of firmware or installing test code when it will reset to defaults.

The send_clone.sh utility is designed to make this simple and easy to do.

Usage: send_clone.sh [-h] [-p user:passwd] -i IP -f local_file [-z]

Download the current settings, in clone format, of a receiver at ‘IP’, sending from ‘local_file’
-h = get help
-p user:passwd = don’t use default user=admin,passwd=password
-i IP = receiver IP
-c filename = local filename
-z upload through the proxy

The parameters are the same as for firmware update

The file name is the file name that the file will be downloaded to, note that for people unlucky enough to have a case sensitive file system the file name must always be in uppercase.

Download send_clone.sh

Note that the receiver will be rebooted after the clone file is installed.

Posted in Uncategorized | Tagged | Comments Off on Sending a Clone file to a receiver

Downloading the Current configuration of a receiver

Generally when you upgrade the firmware in a Trimble GNSS receiver it will keep the same settings. There are some cases, mainly a downgrade of firmware or installing test code when it will reset to defaults.

The get_clone.sh utility is designed to make saving the configuration simple and easy to do.

Usage: get_clone.sh [-h] [-s failsafe] [-p user:passwd] -i IP -f local_file [-z]
Download the current settings, in clone format,  of a receiver at 'IP', saved to 'local_file'
  -h = get help
  -p user:passwd = don't use default user=admin,passwd=password
  -i IP = receiver IP
  -c filename = local filename
  -z Download through the proxy

The parameters are the same as for firmware update

The file name is the file name that the file will be downloaded to, note that for people unlucky enough to have a case sensitive file system the file name will always be in uppercase.

Download get_clone.sh

Posted in Uncategorized | Tagged | Comments Off on Downloading the Current configuration of a receiver

Command Line Firmware Upgrade

If you have only a few receiver’s then you can simply upgrade them using the web interface, if you have a number of them then it can take a while to do them all.

firmware_upgrade.sh is a bash script, that requires curl, that allows you to upgrade a receiver from the command line.

Usage: firmware_upgrade.sh [-h] [-p user:passwd] -i IP -f local_file [-z]
Upgrade of receiver at 'IP' with 'local_file'
  -h = get help
  -p user:passwd = don't use default user=admin,passwd=password
  -i IP = receiver IP
  -f filename = local filename
  -z Upgrade through the proxy

The options are reasonably obvious, note that the application does not upgrade though a proxy unless you use the -z option.
This is because it is expected that more of the receivers are on the local network.

when you want to use the proxy it is entered using the standard http_proxy variable. http=proxy.tirmble.com:3128 for example.

Download firmware_upgrade.sh firmware_upgrade.sh

Posted in Uncategorized | Tagged | Leave a comment