line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Monitis::Process; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
33
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
51
|
|
5
|
|
|
|
|
|
|
require Carp; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use base 'Monitis'; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
3746
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub add { |
10
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
|
|
|
my @mandatory = |
13
|
|
|
|
|
|
|
qw/agentkey cpuLimit memoryLimit virtualMemoryLimit name processName tag/; |
14
|
0
|
|
|
|
|
|
my @optional = qw//; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
return $self->api_post('addProcessMonitor' => $params); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub edit { |
22
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
my @mandatory = |
25
|
|
|
|
|
|
|
qw/testId cpuLimit memoryLimit virtualMemoryLimit name tag/; |
26
|
0
|
|
|
|
|
|
my @optional = qw//; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return $self->api_post('editProcessMonitor' => $params); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub get { |
34
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
my @mandatory = qw/agentId/; |
37
|
0
|
|
|
|
|
|
my @optional = qw//; |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
return $self->api_get('agentProcesses' => $params); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub get_info { |
45
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
my @mandatory = qw/monitorId/; |
48
|
0
|
|
|
|
|
|
my @optional = qw//; |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
return $self->api_get('processInfo' => $params); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub get_results { |
56
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
my @mandatory = qw/monitorId day month year/; |
59
|
0
|
|
|
|
|
|
my @optional = qw/timezone/; |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
return $self->api_get('processResult' => $params); |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
__END__ |