Re: Monitoring btrfs with Prometheus (and soon OpenMonitoring)

2018-10-08 Thread Austin S. Hemmelgarn
On 2018-10-07 09:37, Holger Hoffstätte wrote: The Prometheus statistics collection/aggregation/monitoring/alerting system [1] is quite popular, easy to use and will probably be the basis for the upcoming OpenMetrics "standard" [2]. Prometheus collects metrics by polling host-local "exporters" t

Monitoring btrfs with Prometheus (and soon OpenMonitoring)

2018-10-07 Thread Holger Hoffstätte
The Prometheus statistics collection/aggregation/monitoring/alerting system [1] is quite popular, easy to use and will probably be the basis for the upcoming OpenMetrics "standard" [2]. Prometheus collects metrics by polling host-local "exporters" that respond to http requests; many such export

Re: Monitoring Btrfs

2016-10-19 Thread Stefan Malte Schumacher
Thanks to everybody for the help. I have been doing regular smart-tests for quite some time and I also let scrub run on a regular basis. I will use a simple shellscript witch inspects the output of "greps btrfs fi show" for lines containing "missing" and another which checks "btrfs dev stats" for N

Re: Monitoring Btrfs

2016-10-19 Thread Anand Jain
On 10/19/16 21:33, Austin S. Hemmelgarn wrote: On 2016-10-19 09:06, Anand Jain wrote: On 10/19/16 19:15, Austin S. Hemmelgarn wrote: On 2016-10-18 17:36, Anand Jain wrote: I would like to monitor my btrfs-filesystem for missing drives. This is actually correct behavior, the filesyst

Re: Monitoring Btrfs

2016-10-19 Thread Austin S. Hemmelgarn
On 2016-10-18 17:36, Anand Jain wrote: I would like to monitor my btrfs-filesystem for missing drives. This is actually correct behavior, the filesystem reports that it should have 6 devices, which is how it knows a device is missing. Missing - means missing at the time of mount. So h

Re: Monitoring Btrfs

2016-10-19 Thread Austin S. Hemmelgarn
On 2016-10-19 09:06, Anand Jain wrote: On 10/19/16 19:15, Austin S. Hemmelgarn wrote: On 2016-10-18 17:36, Anand Jain wrote: I would like to monitor my btrfs-filesystem for missing drives. This is actually correct behavior, the filesystem reports that it should have 6 devices, which is

Re: Monitoring Btrfs

2016-10-19 Thread Anand Jain
On 10/19/16 19:15, Austin S. Hemmelgarn wrote: On 2016-10-18 17:36, Anand Jain wrote: I would like to monitor my btrfs-filesystem for missing drives. This is actually correct behavior, the filesystem reports that it should have 6 devices, which is how it knows a device is missing.

Re: Monitoring Btrfs

2016-10-18 Thread Anand Jain
I would like to monitor my btrfs-filesystem for missing drives. This is actually correct behavior, the filesystem reports that it should have 6 devices, which is how it knows a device is missing. Missing - means missing at the time of mount. So how are you planning to monitor a disk wh

Re: Monitoring Btrfs

2016-10-18 Thread Austin S. Hemmelgarn
On 2016-10-17 16:40, Chris Murphy wrote: May be better to use /sys/fs/btrfs//devices to find the device to monitor, and then monitor them with blktrace - maybe there's some courser granularity available there, I'm not sure. The thing is, as far as Btrfs alone is concerned, a drive can be "bad" an

Re: Monitoring Btrfs

2016-10-18 Thread Austin S. Hemmelgarn
On 2016-10-17 23:23, Anand Jain wrote: I would like to monitor my btrfs-filesystem for missing drives. This is actually correct behavior, the filesystem reports that it should have 6 devices, which is how it knows a device is missing. Missing - means missing at the time of mount. So how

Re: Monitoring Btrfs

2016-10-17 Thread Anand Jain
I would like to monitor my btrfs-filesystem for missing drives. This is actually correct behavior, the filesystem reports that it should have 6 devices, which is how it knows a device is missing. Missing - means missing at the time of mount. So how are you planning to monitor a disk whic

Re: Monitoring Btrfs

2016-10-17 Thread Chris Murphy
May be better to use /sys/fs/btrfs//devices to find the device to monitor, and then monitor them with blktrace - maybe there's some courser granularity available there, I'm not sure. The thing is, as far as Btrfs alone is concerned, a drive can be "bad" and you're effectively degraded, while the dr

Re: Monitoring Btrfs

2016-10-17 Thread Kyle Manna
On Mon, Oct 17, 2016 at 9:44 AM, Stefan Malte Schumacher wrote: > Hello > > I would like to monitor my btrfs-filesystem for missing drives. On > Debian mdadm uses a script in /etc/cron.daily, which calls mdadm and > sends an email if anything is wrong with the array. I would like to do > the same

Re: Monitoring Btrfs

2016-10-17 Thread Zygo Blaxell
On Mon, Oct 17, 2016 at 06:44:14PM +0200, Stefan Malte Schumacher wrote: > Hello > > I would like to monitor my btrfs-filesystem for missing drives. On > Debian mdadm uses a script in /etc/cron.daily, which calls mdadm and > sends an email if anything is wrong with the array. I would like to do >

Re: Monitoring Btrfs

2016-10-17 Thread Austin S. Hemmelgarn
On 2016-10-17 12:44, Stefan Malte Schumacher wrote: Hello I would like to monitor my btrfs-filesystem for missing drives. On Debian mdadm uses a script in /etc/cron.daily, which calls mdadm and sends an email if anything is wrong with the array. I would like to do the same with btrfs. In my firs

Monitoring Btrfs

2016-10-17 Thread Stefan Malte Schumacher
Hello I would like to monitor my btrfs-filesystem for missing drives. On Debian mdadm uses a script in /etc/cron.daily, which calls mdadm and sends an email if anything is wrong with the array. I would like to do the same with btrfs. In my first attempt I grepped and cut the information from "btrf