Skip to main content

Digital Hydrant Collectors

Project description

Outside Open

Digital Hydrant Collectors

Open Source network information collector, developed for the Digital Hydrant project

Installation

System Requirements

Install with Pip

$ sudo pip install digital-hydrant

Install from source

Clone this repository

$ git clone https://github.com/outsideopen/digital-hydrant-collectors.git
$ cd ~/digital-hydrant-collectors
$ sudo ./setup.py install

Usage

Configuration

  • Create a new Hydrant on the Digital Hydrant website
  • Run the hydrant init script with your api token
    • *You should delete this command from .bash_history as it poses a potential security risk
      • If you have $HISTCONTROL set to "ignorespace" or "ignoreboth" then you can add a space before running the command
      • OR you can execute the command with your token and then run history -d $((HISTCMD-2)) to delete the command from your history
$ sudo hydrant --init <MY_TOKEN>
  • OR manually copy the api token to your configuration file at /etc/digital-hydrant/config.ini
    • *If your config file does not yet exist you can run sudo hydrant --init to initialize the default config file
[api]
token = $MY_TOKEN

Run it

$ sudo hydrant

Options

usage: hydrant [-h] [--init [TOKEN]] [--systemd [LOCATION]] [-c] [-u] [-cq] [-v] [-f]

Run Digital-Hydrant data collectors

optional arguments:
  -h, --help            show this help message and exit
  --init [TOKEN]        setup local config file and database. optionally accepts a hydrant's api token
  --systemd [LOCATION]  move the digital-hydrant service file to it's system location (defaults to
                        /usr/lib/systemd/system/)
  -c, --collect         dictates that data collection should be run
  -u, --upload          dictates that stored data should be uploaded
  -cq, --clear-queue    delete all entries from local database
  -v, --version         show program's version number and exit
  -f, --force           runs Digital Hydrant without checking for system dependencies(this may cause
                        errors)

By default, both collection and upload will execute unless otherwise specified

DH_cron

In order to schedule collector execution, Digital Hydrant uses a cron-like string with the following structure
  • <day of week(1-7)> <days> <hours> <minutes> <seconds>
  • whichever value is populated first will be read as "every <value> <interval>" and the remaining values will be combined and read as "at <values>"
    • examples:
      • * 4 18 30 0 = "every 4 days at 18:30:00"
      • 5 * * 30 45 = "every thursday at 0:30:45"
  • day of the week values start on Sunday (i.e. 1 = Sun... 7 = Sat)
  • for DH_cron strings with the day of the week populated, the days value will be ignored
  • if no schedule string is provided then the default value of * * * * * will be used, indicating that the process should only be run once

Features

  • Easily add new collectors
  • Build off existing network scanning tools
  • Integrated logging
  • Very flexible and configurable

Contributing

Step 1

  • Option 1

    • 🍴 Fork this repo!
  • Option 2

    • 👯 Clone this repo to your local machine using https://github.com/outsideopen/digital-hydrant-collectors

Step 2

  • HACK AWAY! 🔨🔨🔨

Step 3


FAQ

  • What is Outside Open?
    • Outside Open is a team of smart, passionate artists, photographers, cyclists, hikers, soccer players, parents, beekeepers, blacksmiths and tinkerers. What unites this disparate team is a love for building and integrating amazing technology to help their clients succeed. They think outside the “singular technical solution” box. They embrace solutions from both the standard corporate software/hardware world and the open source community. This sets them apart and enables them to provide highly customized and scaleable solutions. Outside Open was founded in 2012 by Trevor Young and Greg Lawler, two technology leaders with a love for technology and a desire to help others succeed.

Support

Reach out at one of the following places!


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

digital-hydrant-0.1.7.tar.gz (47.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

digital_hydrant-0.1.7-py3-none-any.whl (68.8 kB view details)

Uploaded Python 3

File details

Details for the file digital-hydrant-0.1.7.tar.gz.

File metadata

  • Download URL: digital-hydrant-0.1.7.tar.gz
  • Upload date:
  • Size: 47.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5

File hashes

Hashes for digital-hydrant-0.1.7.tar.gz
Algorithm Hash digest
SHA256 ae3138a65dabb78c456296642ee5bc6156c9c1f54d395ed61d684defff5d94a6
MD5 68949ce5fcce093b15cc666ac6437ac3
BLAKE2b-256 c3d3026736b34eef1122a904f997b82cc5d62a199fff02ed6e33d9f3ad166f0f

See more details on using hashes here.

File details

Details for the file digital_hydrant-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: digital_hydrant-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 68.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5

File hashes

Hashes for digital_hydrant-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 cdc7df748543e019bbb7e474d385379f4e520fbc89f978ce50f3bcc3f41bfaa8
MD5 372e9b88177e63710f133180e6359a6c
BLAKE2b-256 163d1fc18cf273a4313b24d95cb2fb78d7a242b0034a1467340b46fa735e3a92

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page