Skip to content

Parse SBS-1 Messages and upload to SentinelOne DataSet using Go

License

Notifications You must be signed in to change notification settings

imichaelmoore/adsb-go-dataset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dump1090 SBS-1 Message Forwarder to DataSet in Go

This project provides a utility to capture SBS-1 format messages from dump1090's output and then forwards them to SentinelOne's DataSet for further analysis and storage.

Table of Contents

About dump1090 and SBS-1

dump1090 is a popular ADS-B (Automatic Dependent Surveillance-Broadcast) Mode S decoder built specifically for RTL-SDR devices. When run, it outputs aircraft data in SBS-1 format on port 30003. This format provides real-time information about airborne aircraft, including details like speed, position, altitude, and more.

About DataSet (formerly known as Scalyr)

SentinelOne's DataSet, formerly known as Scalyr, offers high-speed logging and server metrics for engineers. It's known for its lightning-fast search capabilities. Engineers often rely on DataSet to troubleshoot server issues, understand application behaviors, and ensure smooth operations.

Setting Up dump1090 with rtl_sdr

To get dump1090 producing SBS-1 messages from an RTL-SDR:

  1. Ensure you have an RTL-SDR dongle.

  2. Install dump1090:

    sudo apt-get install dump1090

  3. Run dump1090 in interactive mode:

    dump1090 --interactive

  4. SBS-1 formatted data will be available on port 30003. Ensure no firewall or other network restrictions block this port.

Requirements

Usage

  1. Clone this repository.

  2. If not installed, install Go.

  3. Run:

    go build

An executable adsb-go-dataset will be created.

You can run the code by executing this binary:

./adsb-go-dataset --dataset_api_write_token=YOUR_TOKEN --dump1090_host=utilities.33901.cloud

You can also set the required configuration by environment variable:

DATASET_API_WRITE_TOKEN=YOUR_TOKEN DUMP1090_HOST=utilities.33901.cloud ./adsb-go-dataset

Ensure dump1090 is running and emitting SBS-1 messages on port 30003.

Running Services with pmtr

pmtr is a versatile tool for running background services. It restarts services that fail and can manage both dump1090 and this project as services.

Create a pmtr.conf configuration file in /etc:

job {
  name dump1090
  cmd /path/to/dump1090
}

job {
  name adsb-go-dataset
  cmd /path/to/adsb-go-dataset --dataset_api_write_token=YOUR_TOKEN --dump1090_host=utilities.33901.cloud --dump1090_port=30003
}

Replace /path/to/ with the appropriate paths.

Start the services with:

pmtr -c /etc/pmtr.conf

Both dump1090 and the SBS-1 forwarder will now run as managed background services. pmtr will restart them if they fail.

Setting up pmtr as a launchd service

Option 1: RPM

A RHEL/CentOS 7 x86_64 RPM package for pmtr can be found here.

Option 2: Build from source

  1. Install the prerequisite tools:

    Ubuntu:

    sudo apt install git build-essential autoconf automake
    

    RedHat/CentOS:

    sudo yum install git gcc autoconf automake make
    
  2. Clone pmtr:

    git clone https://github.com/troydhanson/pmtr.git
    
  3. Build and install:

    cd pmtr
    ./autogen.sh
    ./configure --bindir=/usr/bin --sysconfdir=/etc
    make
    sudo make install
    sudo touch /etc/pmtr.conf
    
  4. Set up initscript to start pmtr automatically at boot:

    cd initscripts
    sudo ./setup-initscript --auto
    

This is where pmtr reports on starting jobs, or on any errors in parsing the configuration file. Any output generated by the jobs also appears in the syslog by default.

Contributions

Pull requests are welcome! Please ensure that contributions adhere to the current coding style.

License

This code is licensed under the MIT License.

About

Parse SBS-1 Messages and upload to SentinelOne DataSet using Go

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages