Giter Site home page Giter Site logo

cloudxtreme / zfssyncstatus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from johnko/zfssyncstatus

0.0 1.0 0.0 804 KB

Dashboard of ZFS Sync Status, modified from https://github.com/IronSummitMedia/startbootstrap-sb-admin-2

License: Apache License 2.0

CSS 1.64% JavaScript 96.38% HTML 1.97%

zfssyncstatus's Introduction

zfssyncstatus

Dashboard of ZFS Sync Status, modified from https://github.com/IronSummitMedia/startbootstrap-sb-admin-2

Dashboard to see if this system's dataset snapshots are in sync with a remote system's snapshots.

This does nothing on its own. But combine with other tools to make a nice dashboard.

Quick Install

I install this in a FreeBSD jail and forward tcp/80 to it.

See https://github.com/johnko/deploy/blob/master/bin/deploy_zfssyncstatus

Jail fstab

/usr/local/www/data    /iocage/tags/zfssyncstatus/root/usr/local/www/data    nullfs    ro    0    0
/var/log               /iocage/tags/zfssyncstatus/root/var/hostlog           nullfs    ro    0    0

Configuration

This goes on the jail host.

Create a file /usr/local/www/data/json-datasets.js with contents like this for each dataset you want to monitor:

[
{"name":"tank/dataset"},
{"name":"tank/mail"},
{"name":"tank/assets"},
{"name":"tank/website"}
]

Check local / remote snapshots

This goes on the jail host.

Ideally, your zfs send/recv sync script will dump the last local and last remote snapshot names in json to the file /usr/local/www/data/json-snapshots.js

For an example see: https://github.com/johnko/zfs-tools/blob/master/bin/zfs-sync-xz-pull

Set https://github.com/johnko/gtfc-overlay/blob/master/_zfs-offsite-bkp/usr/home/urep/bin/zfs-sync-xz-pull-all to run in a user's crontab to perform the actual sync:

1 * * * * * zfs-sync-xz-pull-all

RAM / zpool Usage Updates

This goes on the jail host.

Similarly a script will output RAM and zpool usage to files:

  • /usr/local/www/data/json-ramusage.js
  • /usr/local/www/data/json-poolusage.js
  • /usr/local/www/data/json-tankusage.js

Since zfs-sync-xz-pull actually dumps the snapshots into separate files, this script also combines them to make /usr/local/www/data/json-snapshots.js

Set https://github.com/johnko/freebsd-system-info/blob/master/bin/stat-json-urep to run in a user's crontab:

0,15,30,45 * * * * stat-json-urep

zfssyncstatus's People

Contributors

johnko avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.