Jazigo is a tool written in Go for retrieving configuration for multiple devices, similar to rancid, fetchconfig, oxidized, Sweet.

GoDoc Go Report Card Build Status gocover dev gocover store

Table of Contents

Created by gh-md-toc

About Jazigo

Jazigo is a tool written in Go for retrieving configuration for multiple devices, similar to rancid, fetchconfig, oxidized, Sweet.

Installation and usage are supposed to be dead simple. If you hit any surprising difficulty, please report.

Supported Platforms

Please send pull requests for new plataforms.

Features

  • Written in Go. Single executable file. No runtime dependency.
  • Straightforward usage: run the binary then point browser to web UI. Default settings should work out-of-the-box.
  • Tool configuration is automatically saved as YAML. However one is NOT supposed to edit configuration file directly.
  • Spawns multiple concurrent lightweight goroutines to quickly handle large number of devices.
  • Very easy to add support for new platforms. See the Cisco IOS model as example.
  • Backup files can be accessed from web UI.
  • See file differences directly from the web UI.
  • Support for SSH and TELNET.
  • Can directly store backup files into AWS S3 bucket.
  • Can call an external program and collect its output.

Requirements

Quick Start - Short version

This is how to boot up Jazigo very quickly:

With Go Modules (starting from Go 1.11)

git clone https://github.com/udhos/jazigo ;# clone outside of GOPATH
cd jazigo
go install ./jazigo
mkdir etc repo log
JAZIGO_HOME=$PWD ~/go/bin/jazigo

Without Go Modules (before Go 1.11)

go get github.com/udhos/jazigo
cd ~/go/src/github.com/udhos/jazigo
./build.sh
mkdir etc repo log
JAZIGO_HOME=$PWD ~/go/bin/jazigo

Quick Start - Detailed version

Installation and usage are supposed to be dead simple. If you hit any surprising difficulty, please report.

If you want to build from source code, start from step 1.

If you downloaded the executable binary file, start from step 5.

1. Setup GOPATH as usual

Example:

#export GOPATH=~/go ;# starting from Go 1.8, GOPATH is no longer required
mkdir ~/go

2. Get dependencies

go get github.com/icza/gowut/gwu
go get github.com/udhos/lockfile
go get github.com/udhos/equalfile
go get github.com/udhos/difflib
go get gopkg.in/yaml.v2
go get golang.org/x/crypto/ssh
go get github.com/aws/aws-sdk-go

3. Get source code

go get github.com/udhos/jazigo

4. Compile and install

go install github.com/udhos/jazigo/jazigo

5. Decide where to store config, backup, log and static www files

Example:

export JAZIGO_HOME=$HOME/jazigo
mkdir $JAZIGO_HOME
cd $JAZIGO_HOME
mkdir etc repo log www

Hint: By default, Jazigo looks for directories 'etc', 'repo', 'log', and 'www' under $JAZIGO_HOME. If left undefined, JAZIGO_HOME defaults to /var/jazigo. See command line options to fine tune filesystem locations.

6. Copy static files (CSS and images) to $JAZIGO_HOME/www

Example:

# If you have downloaded jazigo using 'go get':
cp ~/go/src/github.com/udhos/jazigo/www/* $JAZIGO_HOME/www

# Otherwise get static files from https://github.com/udhos/jazigo/tree/master/www
cd $JAZIGO_HOME/www
wget https://raw.githubusercontent.com/udhos/jazigo/master/www/fail-small.png
wget https://raw.githubusercontent.com/udhos/jazigo/master/www/ok-small.png
wget https://raw.githubusercontent.com/udhos/jazigo/master/www/jazigo.css
wget https://raw.githubusercontent.com/udhos/jazigo/master/www/GitHub-Mark-32px.png

7. Run jazigo once (see -runOnce option)

$GOPATH/bin/jazigo -runOnce

Watch messages logged to standard output for errors.

Hint: Since root privileges are usually not needed, run Jazigo as a regular user.

8. Run jazigo forever

$GOPATH/bin/jazigo -disableStdoutLog

9. Open the web interface

Point web browser at: http://localhost:8080/jazigo

Global Settings

You might want to adjust global settings. See the Jazigo admin window under http://localhost:8080/jazigo/admin.

maxconfigfiles: 120
holdtime: 12h0m0s
scaninterval: 10m0s
maxconcurrency: 20
maxconfigloadsize: 10000000

maxconfigfiles: This option limits the amount of files stored per device. When this limit is reached, older files are discarded.

holdtime: When a successful backup is saved for a device, the software will only contact that specific device again after expiration of the 'holdtime' timer.

scaninterval: The interval between two device table scans. If the device table is fully processed before the 'scaninterval' timer, the software will wait idly for the next scan cycle. If the full table scan takes longer than 'scaninterval', the next cycle will start immediately.

maxconcurrency: This option limits the number of concurrent backup jobs. You should raise this value if you need faster scanning of all devices. Keep in mind that if your devices use a centralized authentication system (for example, Cisco Secure ACS), the authentication server might become a bottleneck for high concurrency.

maxconfigloadsize: This limit puts restriction into the amount of data the tool loads from a file to memory. Intent is to protect the servers' memory from exhaustion while trying to handle multiple very large configuration files.

Importing Many Devices

You can use the Web UI to add devices, but it is not designed for importing a large number of devices.

The easiest way to include many devices is by using the command line option -deviceImport.

1. Build a device table using this format:

$ cat table.txt
#
# model   id   hostport      transports username password enable-password
#
cisco-ios lab1 router1905lab telnet     san      fran     sanjose
cisco-ios lab2 router3925lab telnet     san      fran     sanjose
junos     auto ex4200lab     ssh,telnet backup   juniper1 not-used
junos     auto 1.1.1.1:2222  ssh        backup   juniper1 not-used
$

Hint: The device id must be unique. You can generate a meaningful device id manually as you like. You can also let Jazigo create id's automatically by specifying the special id auto.

2. Then load the table with the option -deviceImport:

$ $GOPATH/bin/jazigo -deviceImport < table.txt

Using AWS S3

Quick recipe for using S3 bucket:

1. Create a bucket 'bucketname' on AWS region 'regionname'.

2. Authorize the client to access the bucket

An usual way is to create an IAM user, add key/secret, and put those credentials into ~/.aws/credentials:

$ cat ~/.aws/credentials
[default]
aws_access_key_id = key
aws_secret_access_key = secret

3. Run jazigo pointing its config and repository paths to S3 bucket ARN:

S3 bucket ARN: arn:aws:s3:regionname::bucketname/foldername

# Example
ARN=arn:aws:s3:regionname::bucketname/foldername
$GOPATH/bin/jazigo -configPathPrefix=$ARN/etc/jazigo.conf. -repositoryPath=$ARN/repo

Hint: You could point config and repository to distinct buckets.

Calling an external program

You can use the pseudo model run to call an external program to collect custom configuration.

Create a device using the model run, then specify the program arguments in the attribute runprog:

Example:

# This example calls: /bin/bash -c "env | egrep ^JAZIGO_"
runprog:
- /bin/bash
- -c
- env | egrep ^JAZIGO_

The external program invoked by the model run will receive its device authentication credentials as environment variables:

JAZIGO_DEV_ID=deviceid
JAZIGO_DEV_HOSTPORT=host[:port] -- port is optional
JAZIGO_DEV_USER=username
JAZIGO_DEV_PASS=password

The external program is expected to issue captured configuration to stdout and then to exit with zero exit status.

Comments
  • Build Issue on MacOS

    Build Issue on MacOS

    Attempting to install I get this message. $ go install github.com/udhos/jazigo/jazigo src/github.com/udhos/jazigo/dev/model.go:66: undefined: registerModelLinux

    go version go1.7.5 darwin/amd64 Yosemite 10.10.5 Darwin Kernel Version 14.5.0

  • Build failing

    Build failing

    Hey, this is a really cool project, would love to give it a go!

    Unfortunately, the build is failing:

    # github.com/udhos/jazigo/dev
    ../../go/src/github.com/udhos/jazigo/dev/model.go:65: undefined: registerModelLinux
    FAIL	github.com/udhos/jazigo/dev [build failed]
    
  • When the scan interval is modified, the scan loop should proceed

    When the scan interval is modified, the scan loop should proceed

    Need to interrupt time.Sleep(sleep) below:

    func scanLoop(jaz *app) {
            for {
                    jaz.logf("scanLoop: starting")
                    opt := jaz.options.Get()
                    begin := time.Now()
                    dev.Scan(jaz.table, jaz.table.ListDevices(), jaz.logger, opt, jaz.requestChan)
                    elap := time.Since(begin)
                    sleep := opt.ScanInterval - elap
                    if sleep < 1 {
                            sleep = 0
                    }
                    jaz.logf("scanLoop: sleeping for %s (target: scanInterval=%s)", sleep, opt.ScanInterval)
                    time.Sleep(sleep)
            }
    }
    
    
  • Fetching a big config from c6509 cisco

    Fetching a big config from c6509 cisco

    For some reason, telnet connection works and it fetches the configuration nicely.

    Only problem is that the config is quite big and it does not backup entirely (about half comes through and about a half is missing from the end)

    What could be the cause?

    I increased the maxconfigloadsize: 20000000 But still it stops at config size 46938

  • deviceImport problem with lock failure

    deviceImport problem with lock failure

    Hi,

    Thanks for the software and seems to be runnig fine apart from couple of problems.. this and other issue which will be coming shortly

    Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.51-3 (2017-12-13) x86_64 GNU/Linux installed jazigo today with Quick Start - Short version instructions

    Working fine, connections are fine, login credentials are working and manual device entry works.

    But when i use deviceimport feature:

    table.txt (copy from the git site https://github.com/udhos/jazigo) is used for testing the import of nodes to jazigo:

    model id hostport transports username password enable-password cisco-ios node ip ssh username password xxxx

    jazigo not running or running.. same error appears

    2018/01/22 13:59:49 main: could not get exclusive lock: exclusiveLock: lock failure: '/var/jazigo/etc/jazigo.conf.lock': open /var/jazigo/etc/747543250: no such file or directory panic: main: refusing to run without exclusive lock

    goroutine 1 [running]: main.main() /locationtoinstallfolder/go/src/github.com/udhos/jazigo/jazigo/main.go:168 +0x2551

Traefik config validator: a CLI tool to (syntactically) validate your Traefik configuration filesTraefik config validator: a CLI tool to (syntactically) validate your Traefik configuration files
Traefik config validator: a CLI tool to (syntactically) validate your Traefik configuration filesTraefik config validator: a CLI tool to (syntactically) validate your Traefik configuration files

Traefik Config Validator Note This is currently pre-release software. traefik-config-validator is a CLI tool to (syntactically) validate your Traefik

Dec 16, 2021
A simple tool for retrieving a request's IP address on the server.

reqip A simple tool for retrieving a request's IP address on the server. Inspired from request-ip Installation Via go get go get github.com/mo7zayed/r

Oct 26, 2022
An IPFS bytes exchange for caching and retrieving data from Filecoin

?? go-hop-exchange An IPFS bytes exchange to allow any IPFS node to become a Filecoin retrieval provider and retrieve content from Filecoin Highlights

Aug 25, 2022
Tapestry is an underlying distributed object location and retrieval system (DOLR) which can be used to store and locate objects. This distributed system provides an interface for storing and retrieving key-value pairs.

Tapestry This project implements Tapestry, an underlying distributed object location and retrieval system (DOLR) which can be used to store and locate

Mar 16, 2022
mdmb is a tool for simulating Apple devices interacting with Apple MDM servers.

mdmb mdmb — short for MDM Benchmark, à la ab — is a tool for simulating Apple devices interacting with Apple MDM servers. mdmb creates sets of fake Ap

Dec 1, 2022
Tool for monitoring network devices (mainly using SNMP) - monitoring check plugin
Tool for monitoring network devices (mainly using SNMP) - monitoring check plugin

Thola Description A tool for monitoring network devices written in Go. It features a check mode which complies with the monitoring plugins development

Dec 29, 2022
communicate with iOS devices implemented with Golang

Golang-iDevice much more easy to use ?? electricbubble/gidevice-cli Installation go get github.com/electricbubble/gidevice Devices package main impor

Dec 18, 2022
Automatically compress podcasts to tiny file sizes for bandwidth constrained devices like cellular.
Automatically compress podcasts to tiny file sizes for bandwidth constrained devices like cellular.

tinycast Automatically compress podcasts to tiny file sizes for bandwidth constrained connections like cellular or satellite.

Sep 18, 2022
Connect your devices into a single private WireGuard®-based mesh network.

Wiretrustee A WireGuard®-based mesh network that connects your devices into a single private network. Why using Wiretrustee? Connect multiple devices

Dec 31, 2022
Prometheus exporter for counting connected devices to a network using nmap

nmapprom Prometheus exporter for counting the hosts connected to a network using nmap · Report Bug · Request Feature Table of Contents About The Proje

Oct 17, 2021
Manage SwOS devices

swosman Manage SwOS devices This application for management MikroTik devices running of SWoS TODO Link Getting setting Save new setting Getting status

Dec 7, 2022
Demo of EdgeX Foundry Ireland (or Jakarta) release with real Modbus, SNMP and GPIO pin devices

Ireland Demo This demo shows the Ireland (or Jakarta - it works for both) release of EdgeX with the following devices: Comet Systems T0310 temperature

Nov 6, 2021
Nomad plugin for reserving device mappings used by ebs devices.

Nomad Skeleton Device Plugin Skeleton project for Nomad device plugins. This project is intended for bootstrapping development of a new device plugin.

Jan 5, 2022
User Agents detector for tv, phone, tablet and desktop devices.

gouseragents Accurate and fresh list of desktop, phone, tablet and tv user agents. install go get github.com/emetriq/gouseragents usage import ( "f

Apr 26, 2022
Provides communication with USB Human Interface Devices.

This package is discontinued This package does not work with Go1.6+. I won't be updating this package since a better alternative is already available,

Dec 1, 2022
WebDAV server for SSH. Similar to sshfs but does not require proprietary MacFUSE on macOS

sshwebdav: WebDAV server for SSH sshwebdav provides a WebDAV server for a remote SSH host. sshwebdav is similar to sshfs but does not require propriet

Nov 9, 2022
Centralized Configuration System written in Golang - Spring cloud compatible
Centralized Configuration System written in Golang - Spring cloud compatible

Centralized Configuration System What is Vecosy Vecosy is a configuration service exposed through REST/GRPC. Is Spring Cloud Conf compatible and also

Dec 13, 2022
A load balancer supporting multiple LB strategies written in Go
A load balancer supporting multiple LB strategies written in Go

farely A load balancer supporting multiple LB strategies written in Go. Goal The goal of this project is purley educational, I started it as a brainst

Dec 21, 2022