Giter Club home page Giter Club logo

zfswatcher's People

Contributors

eloukkola avatar ptman avatar snabb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zfswatcher's Issues

zfswatcher reports ~2% high

I've been receiving alerts for 85% and 90% thresholds where the zpool information returned from the OS was 83% and 88%. Looking through the source, it seems as though this is a discrepancy between the "Free" and "Avail" reported by both methods.

This is ZoL 0.6.2 on CentOS.

Error parsing zpool status output

Hello Developers.
I hope contribute with the code refinement
I had an error when starting zfswatcher,
The log file explains by itself
Thank you all

2020-10-01 20:38:17 [info] zfswatcher starting
2020-10-01 20:38:17 [crit] invalid line 11 in status output: remove: Removal of vdev 0 copied 552G in 2h27m, completed on Mon Aug 24 05:40:45 2020
>  pool: backup_servers
> state: ONLINE
>status: One or more devices has experienced an unrecoverable error.  An
>       attempt was made to correct the error.  Applications are unaffected.
>action: Determine if the device needs to be replaced, and clear the errors
>       using 'zpool clear' or replace the device with 'zpool replace'.
>   see: http://zfsonlinux.org/msg/ZFS-8000-9P
>  scan: scrub in progress since Thu Oct  1 19:03:39 2020
>       315G scanned at 56.8M/s, 215G issued at 38.8M/s, 716G total
>       36K repaired, 30.02% done, 0 days 03:40:32 to go
>remove: Removal of vdev 0 copied 552G in 2h27m, completed on Mon Aug 24 05:40:45 2020
>    7.21M memory used for removed device mappings
>config:
>
>       NAME                                    STATE     READ WRITE CKSUM
>       backup_servers                          ONLINE       0     0     0
>         mirror-1                              ONLINE       0     0     0
>           ata-ST1000DM003-1CH162_S1DGGSXD     ONLINE       0     0     0
>           ata-SAMSUNG_HD103SJ_S2NWJ50B351535  ONLINE       1     0     3  (repairing)
>
>errors: No known data errors
>
>  pool: dpool
> state: ONLINE
>  scan: scrub in progress since Thu Oct  1 19:03:49 2020
>       308G scanned at 55.6M/s, 288G issued at 52.1M/s, 388G total
>       0B repaired, 74.37% done, 0 days 00:32:33 to go
>config:
>
>       NAME                                          STATE     READ WRITE CKSUM
>       dpool                                         ONLINE       0     0     0
>         mirror-0                                    ONLINE       0     0     0
>           ata-SAMSUNG_HD154UI_S240J50B101993-part3  ONLINE       0     0     0
>           ata-SAMSUNG_HD154UI_S240J50B712198-part3  ONLINE       0     0     0
>
>errors: No known data errors
>
>  pool: vpool
> state: ONLINE
>  scan: scrub in progress since Thu Oct  1 19:03:56 2020
>       938G scanned at 170M/s, 655G issued at 118M/s, 2.14T total
>       0B repaired, 29.92% done, 0 days 03:40:56 to go
>config:
>
>       NAME                               STATE     READ WRITE CKSUM
>       vpool                              ONLINE       0     0     0
>         ata-ST3000VX000-1ES166_Z501YC0L  ONLINE       0     0     0
>       
>errors: No known data errors
2020-10-01 20:38:17 [crit] exiting, parsing ZFS status failed
2020-10-01 20:38:17 [info] zfswatcher stopping

And the zpool status output

# zpool status
  pool: backup_servers
 state: ONLINE
status: One or more devices has experienced an unrecoverable error.  An
	attempt was made to correct the error.  Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
	using 'zpool clear' or replace the device with 'zpool replace'.
   see: http://zfsonlinux.org/msg/ZFS-8000-9P
  scan: scrub in progress since Thu Oct  1 19:03:39 2020
	352G scanned at 51,5M/s, 252G issued at 36,9M/s, 716G total
	36K repaired, 35,22% done, 0 days 03:34:53 to go
remove: Removal of vdev 0 copied 552G in 2h27m, completed on Mon Aug 24 05:40:45 2020
    7,21M memory used for removed device mappings
config:

	NAME                                    STATE     READ WRITE CKSUM
	backup_servers                          ONLINE       0     0     0
	  mirror-1                              ONLINE       0     0     0
	    ata-ST1000DM003-1CH162_S1DGGSXD     ONLINE       0     0     0
	    ata-SAMSUNG_HD103SJ_S2NWJ50B351535  ONLINE       1     0     3  (repairing)

errors: No known data errors

  pool: dpool
 state: ONLINE
  scan: scrub in progress since Thu Oct  1 19:03:49 2020
	356G scanned at 52,0M/s, 337G issued at 49,3M/s, 388G total
	0B repaired, 86,96% done, 0 days 00:17:29 to go
config:

	NAME                                          STATE     READ WRITE CKSUM
	dpool                                         ONLINE       0     0     0
	  mirror-0                                    ONLINE       0     0     0
	    ata-SAMSUNG_HD154UI_S240J50B101993-part3  ONLINE       0     0     0
	    ata-SAMSUNG_HD154UI_S240J50B712198-part3  ONLINE       0     0     0

errors: No known data errors

  pool: vpool
 state: ONLINE
  scan: scrub in progress since Thu Oct  1 19:03:56 2020
	1,03T scanned at 154M/s, 793G issued at 116M/s, 2,14T total
	0B repaired, 36,26% done, 0 days 03:24:51 to go
config:

	NAME                               STATE     READ WRITE CKSUM
	vpool                              ONLINE       0     0     0
	  ata-ST3000VX000-1ES166_Z501YC0L  ONLINE       0     0     0

errors: No known data errors

OpenZFS on Raspberry PI does not have a "status:" line in zpool status.

Not really sure this is a zfswatcher problem, but OpenZFS on rasbian does not have a "status:" line in the zpool status command, so zfswatcher exits with a crit error. Here is log file:

2015-03-27 22:39:39 [info] zfswatcher starting
2015-03-27 22:39:40 [crit] invalid line 3 in status output: scrub: none requested

pool: data
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
data ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
disk/by-id/ata-Hitachi_HTS725032A9A360_110214PCJL00GLGU26WJ ONLINE 0 0 0
disk/by-id/ata-WDC_WD3200BEVT-26A23T0_WD-WXN1A8017896 ONLINE 0 0 0

errors: No known data errors
2015-03-27 22:39:40 [crit] exiting, parsing ZFS status failed
2015-03-27 22:39:40 [info] zfswatcher stopping

GUI LED status doesn't refresh if ledctl disables beacon

There’s a minor problem in that if you:

  1. Enable locate in the zfswatcher UI
  2. Disable locate via ledctl on the CLI
  3. zfswatcher UI still shows the beacon active even on refresh
    a. click to clear indicator; the LED stays off (at least the function is not inverted)

Can't send email, or debug email sending attempts

I'm trying to configure a new zfswatcher installation but can't get it to send any emails. I'm sure my config file is faulty, but I can't figure out what. The problem is I cannot find any error messages or even any indication that zfswatcher is attempting to send any email. (I did set enable="true" in that section, then triggered critical events that get picked up correctly in zfswatcher.log.) If there's a way to get such debug info, please consider this a doc request. If not, consider this a feature request.

Zfswatcher looks like exactly the tool I was looking for, but without emails it's not much use!

statistics page

Do you think you will develop the statistics page at some point, or is the project on hold?

Regards,
A happy user

Can't compile on freebsd

Hello,
I can't compile thesource code on ZFSGuru(freebsd 9.2-001),
I have installed the Go lang & can run the hello world test program...
I got this:
GOPATH=pwd/golibs /usr/local/go/bin/go build -o zfswatcher

__/tmp/zfswatcher

osutil_freebsd.go:41: cannot convert unsafe.Pointer(&buf[0]) (type unsafe.Pointer) to type syscall.Timeval
osutil_freebsd.go:41: invalid indirect of syscall.Timeval(unsafe.Pointer(&buf[0])) (type syscall.Timeval)
osutil_freebsd.go:43: not enough arguments in call to time.Unix
*** [zfswatcher] Error code 2

Stop in /tmp/zfswatcher.

Also when I try to type 'go install' I get:
setup.go:25:2: cannot find package "code.google.com/p/gcfg" in any of:
/usr/local/go/src/pkg/code.google.com/p/gcfg (from $GOROOT)
/root/go/src/code.google.com/p/gcfg (from $GOPATH)
webserver.go:26:2: cannot find package "github.com/abbot/go-http-auth" in any of:
/usr/local/go/src/pkg/github.com/abbot/go-http-auth (from $GOROOT)
/root/go/src/github.com/abbot/go-http-auth (from $GOPATH)
leds.go:27:2: cannot find package "github.com/damicon/zfswatcher/notifier" in any of:
/usr/local/go/src/pkg/github.com/damicon/zfswatcher/notifier (from $GOROOT)
/root/go/src/github.com/damicon/zfswatcher/notifier (from $GOPATH)
setup.go:29:2: cannot find package "github.com/ogier/pflag" in any of:

/usr/local/go/src/pkg/github.com/ogier/pflag (from $GOROOT) /root/go/src/github.com/ogier/pflag (from $GOPATH)

please advice.
Thanks a lot,
Michael

Request for help with Apache2 VirtualHost config

Thanks for this great utility, I've been using it with the built-in web server on an alternate port but now trying to move it to a named virtual host but struggling to find the correct DocumentRoot. I'm pointing the DocumentRoot to /usr/share/zfswatcher/www but only getting the directory listing.

My config in /etc/apache2/sites-enabled/zfswatcher.conf:

<VirtualHost *>
DocumentRoot "/usr/share/zfswatcher/www"
ServerName zfswatcher

Options FollowSymLinks
AllowOverride None

<Directory "/usr/share/zfswatcher/www">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
Require all granted

Where should this be pointed? Thanks.

Deb install complains that zfs is not installed

After following https://github.com/zfsonlinux/zfs/wiki/Debian to install zfs and then went to install
zfs watcher with the provided .deb file i get this issue

➜  Downloads sudo apt install zfs-dkms
Reading package lists... Done
Building dependency tree       
Reading state information... Done
zfs-dkms is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 zfswatcher : Depends: zfs but it is not installable or
                       ubuntu-zfs but it is not installable or
                       debian-zfs but it is not installable
              Recommends: ledmon but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

System Info

OS: Debian GNU/Linux 8.7 (jessie) x86_64
Kernel: 3.16.0-4-amd64

CRUX Port

Hi Just wnated to share a CRUX port I've put together for ``zfswatcher:

# Description:  ZFS pool monitoring and notification daemon
# URL:          http://zfswatcher.damicon.fi/
# Maintainer:   ames Mills, prologic at shortcircuit dot net dot au
#
# Depends on:   go

name=zfswatcher
version=0.03
release=1
source=(http://shortcircuit.net.au/~prologic/distfiles/$name-$version.tar.gz)

build() {
    cd $name-$version

    # Fix go path
    sed -i -e 's|/usr/local/go/bin/go|/usr/bin/env go|g' Makefile

    make

    make DESTDIR=$PKG install

    # Fix man paths
    mv $PKG/usr/share/man $PKG/usr
}

Note the sed and mv hacks I had to do? Perhaps these could be configurable if not already?

Running Dockerized?

Just wondering whether you've tried to run this Dockerized at all and if that worked? I imagine you'd have to run it as a "privileged" container with ledctl and zfs installed in the container's image?

Development

I really like your work, and was wondering if you are going to continue to develop more on the web interface. Despite the new zfs-zed module, I think a lot of us are missing a web interface with more info, logs, statistics, etc.

Wishlist: Add "webroot" option

I have zfswatcher's web service listening on 127.0.0.1:28372, with Apache mod_proxy catching at http://server/zfswatcher and sending requests through to the zfswatcher service. This is primarily for security (SSL, etc).

At the moment, the only way to achieve this is by editing the templates in /usr/share/zfswatcher/www/templates; and prefixing "/zfs" to all the URLs. While this works fine for my, I figured others might be doing something similar.

It would be great if we could have an option in zfswatcher.conf, perhaps called something like "webroot", which specifies the prefix/directory the web service should use.

sendmail support?

There doesn't seem to be (unless I'm mistaken) a way to configure zfswatcehr to use a sendmail compatible binary for email notifications. e.g: esmtp

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.