Coder Social home page Coder Social logo

peripety's Introduction

Storage Event Notification Daemon

Peripety is designed to parse system storage logging into structured storage event helping user investigate storage issues.

To do so, it provides three tools:

  • Daemon -- peripetyd

    The daemon parses incoming storage logs and saved the structured peripety storage event for future query or event notification.

    The daemon has build-in regular expressions for parsing system logs. If that does not works on your system. You may define your own regexs in /etc/peripetyd.conf. Please refer to sample config which contains detail documentation.

  • CLI -- prpt

    Command line tool of peripety for event query, event monitor, block information query. Please check manpage of prpr for detail documents.

  • Rust binding -- peripety

    Developer friendly interface for query, monitor peripety storage events. Please check crate document for detail. TODO: Add docs.rs link.

Features

  • Provides device consistent id, event type and extra information like FC/iSCSI path detail and FS mount point.

  • CLI tool prpt to query, monitor events and query block information.

  • Non-invasive/non-IO generating for event processing.

  • Events are stored in journald with structured data(JSON).

  • Allows user defined regex in /etc/peripetyd.conf.

  • Rust crate peripety for query block information on all kind of dev string(major:minor, scsi_id, nvme ctrl_id+ns_id, etc).

  • TODO: Varlink(JSON) interface.

  • TODO: Handle user space tool logs like mulitpathd, iscsid.

How-to

  • Install
# Please install systemd-devel package.
make
sudo make install
  • Start Daemon
sudo systemctl start peripetyd
  • Start monitor CLI
# You may remove the `sudo` if in `systemd-journal` group.
sudo prpt monitor -J
  • Trigger some test events
# SCSI sector hardware error
./tests/scsi.sh
# Multipath path failure
./tests/dmmp.sh
# File system I/O error
./tests/fs.sh
# File system over LVM over multipath
./tests/fs_lvm_dmmp.sh
# LVM ThinProvisioning pool full
./tests/lvm_tp.sh
  • Query events
# You may remove the `sudo` if in `systemd-journal` group.
sudo prpt query

Event examples

FAQ

What can be done by kernel

I have created some patches hoping kernel could provides in logs:

  • Structured log via /dev/kmsg.
  • WWID of device matters to fix race issue.
  • Event type string to save regex capture.

Why another daemon?

Why not expand udisks for this?

  • Current design of udisks require modules written in C which is not a good language for string manipulation which is quit common when parsing eventing.

  • Udisks components are trigger by uevent which only have add/change/del event type defined, modules need to extra work to find out what just happened. Yes, we can change udisks to support event types, but IMHO, that require much more work than creating new storage event daemon in rust.

Why this tool is better?

  • Rust is almost-memory-leak-proof and quite easy to handle threading, IPC and string manipulation.

  • Only do one thing quick and simple -- provide storage events.

peripety's People

Contributors

cathay4t avatar dwlehman avatar mulkieran avatar

Watchers

 avatar  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.