public inbox for springfield@sourceware.org
 help / color / mirror / Atom feed
From: Rich Megginson <rmeggins@redhat.com>
To: Gris Ge <fge@redhat.com>, rhel-sysmgt <rhel-sysmgt@redhat.com>,
	springfield@sourceware.org, eng-common-logging@redhat.com
Subject: Re: [ECL] [RFC] Daemon to provide structured storage events: peripety
Date: Mon, 01 Jan 2018 00:00:00 -0000	[thread overview]
Message-ID: <2895d882-5c78-8629-5a2f-8f674396f19e@redhat.com> (raw)
In-Reply-To: <20180516135253.GA12920@redhat.com>

On 05/16/2018 07:52 AM, Gris Ge wrote:
> Hi Guys,
>
> In order to provide structured event for storage subsystem.
> I created a daemon for append structured data and device ID to
> systems logs:
>
>      https://github.com/cathay4t/peripety/
>
> Features:
>   * Use sysfs and devfs for information query only. Designed to handle
>     log burst.
>
>   * Saves logs in journald with structured data. Log are hide by default
>     to eliminate the duplicate entry. Try `journalctl  -o json-pretty
>     IS_PERIPETY=TRUE`
>
>   * Provides consistent id for device of the log.
>
>   * Provides extra information like mount point on fs mount, FC/iSCSI
>     path information on multipath path failure:
>      https://github.com/cathay4t/peripety/blob/master/examples/fs/ext4_mount_lv_mpath_scsi.json
>      https://github.com/cathay4t/peripety/blob/master/examples/mpath/mpath_fc_path_offline.json
>
>   * Provides device dependency information. E.g. LV over mpath over SCSI.
>     Could query all related logs(fs, lvm, mpath, scsi) of physical device
>     by command:
>
>         journalctl DEV_WWID=<WWID> + OWNERS_WWIDS=<WWID>
>
>   * Allows user defined regex in /etc/peripetyd.conf.
>
>   * TBD: C/python/rust lightweight library 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.
>
>
> Example JSON event of multipath FC path failure:
>      {
>        "hostname": "storageqe-18.rhts.eng.bos.redhat.com",
>        "severity": "Warning",
>        "sub_system": "Multipath",
>        "timestamp": 1526053021631595,
>        "event_id": "",
>        "event_type": "DM_MPATH_PATH_FAILED",
>        "dev_wwid": "360a98000324669436c2b45666c567946",
>        "dev_path": "/dev/mapper/360a98000324669436c2b45666c567946",
>        "owners_wwids": [
>          "t10.NETAPP-LUN-2FiCl+EflVyF"
>        ],
>        "owners_paths": [
>          "/dev/sdd"
>        ],
>        "kdev": "8:48",
>        "msg": "device-mapper: multipath: Failing path 8:48.",
>        "extention": {
>          "blk_major_minor": "8:48",
>          "transport": "FC",
>          "port_state": "Online",
>          "target_wwpn": "0x500a0982891b8dc5",
>          "host_wwpn": "0x10000000c9a02834",
>          "speed": "8 Gbit",
>          "driver_name": "lpfc"
>        }
>      }
>
> I have also created some kernel patches to improve this:
>   * Provides WWID by kernel on every log to fix the race issue.
>   * Provides event type by kernel to save the use space regex captures.
> https://github.com/cathay4t/linux/commits/structured_log
>
> Thank you for your time.
>
> Best regards.
>

Thanks!  For better integration with common logging, I suggest you 
develop your own common logging schema with namespace(s).  We will be 
happy to assist you.  See 
https://github.com/ViaQ/elasticsearch-templates/tree/master/namespaces 
for an example of how we break down different components (kubernetes, 
systemd, docker, aushape, etc.) into their own namespaces with their own 
fields.

The common data model also requires certain fields at the "top level" to 
be in a certain format.  For example, instead of

       "timestamp": 1526053021631595,

We use

       "timestamp": "2018-05-11T09:37:01.631595-06:00",

See also 
https://github.com/ViaQ/elasticsearch-templates/releases/download/0.0.16/com.redhat.viaq-openshift-operations.asciidoc

      reply	other threads:[~2018-05-16 14:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-01  0:00 Gris Ge
2018-01-01  0:00 ` Rich Megginson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2895d882-5c78-8629-5a2f-8f674396f19e@redhat.com \
    --to=rmeggins@redhat.com \
    --cc=eng-common-logging@redhat.com \
    --cc=fge@redhat.com \
    --cc=rhel-sysmgt@redhat.com \
    --cc=springfield@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).