This file is indexed.

/usr/lib/xymon/client/ext/mdstat is in hobbit-plugins 20170628.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/perl -w

# Monitor devices in /proc/mdstat
# Test will go red when a disk has failed (F) or is not usable [_]

#Personalities : [raid1] 
#md7 : active raid1 dm-51[0] dm-32[1]
#      1953118336 blocks [2/2] [UU]
#      
#md4 : active raid1 dm-22[0] dm-44[1]
#      1953118336 blocks [2/2] [UU]
#      [=======>.............]  resync = 37.6% (735336064/1953118336) finish=527.5min speed=38470K/sec
#md2 : active raid1 dm-36[0] dm-28[1]
#      42328960 blocks [2/2] [UU]
#      
#unused devices: <none>

use strict;
use Hobbit;

my $bb = new Hobbit ('mdstat');

open(MDSTAT, '<', "/proc/mdstat") or die "Can't read from /proc/mdstat: $!";
while (<MDSTAT>) {
	my $color = 'clear';
	$color = 'green' if /\[U+\]/;
	$color = 'red' if /\(F\)/ or /\[U*_U*\]/;
	$bb->color_line ($color, $_);
}
close MDSTAT;

$bb->send;