Leser: 1
8 Einträge, 1 Seite |
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
use strict;
use warnings;
use Data::TreeDumper;
use Sys::Statistics::Linux;
my $options = {
SysInfo => 2,
CpuStats => 2,
ProcStats => 2,
MemStats => 2,
PgSwStats => 2,
NetStats => 2,
SockStats => 2,
DiskStats => 2,
DiskUsage => 2,
LoadAVG => 2,
FileStats => 2,
Processes => 2,
};
my $thresholds = {
LoadAVG => { avg_1 => 'gt:20' },
NetStats => { ttbyt => 'gt:4000000' },
PgSwStats => { pswpout => 'gt:1' },
Processes => { cmd => 'eq:(apache2)' },
CpuStats => {
total => 'gt:80',
iowait => 'gt:20'
},
MemStats => {
swapusedper => 'gt:80',
realfreeper => 'lt:10',
},
DiskUsage => {
'/dev/md1' => {
usageper => 'gt:80'
}
},
};
my $lxs = new Sys::Statistics::Linux;
$lxs->set($options);
$lxs->init();
sleep(1);
my $stats = $lxs->get();
my $hits = $lxs->search($thresholds);
print DumpTree($hits);
8 Einträge, 1 Seite |