line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Zabbix2::API::HostInterface; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
8
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
57
|
|
4
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
39
|
|
5
|
2
|
|
|
2
|
|
27
|
use 5.010; |
|
2
|
|
|
|
|
20
|
|
|
2
|
|
|
|
|
50
|
|
6
|
2
|
|
|
2
|
|
6
|
use Carp; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
95
|
|
7
|
2
|
|
|
2
|
|
6
|
use autodie; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
13
|
|
8
|
2
|
|
|
2
|
|
7353
|
use utf8; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
9
|
|
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
40
|
use Moo::Lax; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
8
|
|
11
|
|
|
|
|
|
|
extends qw/Exporter Zabbix2::API::CRUDE/; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use constant { |
14
|
2
|
|
|
|
|
448
|
INTERFACE_TYPE_UNKNOWN => 0, |
15
|
|
|
|
|
|
|
INTERFACE_TYPE_AGENT => 1, |
16
|
|
|
|
|
|
|
INTERFACE_TYPE_SNMP => 2, |
17
|
|
|
|
|
|
|
INTERFACE_TYPE_IPMI => 3, |
18
|
|
|
|
|
|
|
INTERFACE_TYPE_JMX => 4, |
19
|
|
|
|
|
|
|
INTERFACE_TYPE_ANY => 255, |
20
|
2
|
|
|
2
|
|
1358
|
}; |
|
2
|
|
|
|
|
3
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
our @EXPORT_OK = qw/ |
23
|
|
|
|
|
|
|
INTERFACE_TYPE_UNKNOWN |
24
|
|
|
|
|
|
|
INTERFACE_TYPE_AGENT |
25
|
|
|
|
|
|
|
INTERFACE_TYPE_SNMP |
26
|
|
|
|
|
|
|
INTERFACE_TYPE_IPMI |
27
|
|
|
|
|
|
|
INTERFACE_TYPE_JMX |
28
|
|
|
|
|
|
|
INTERFACE_TYPE_ANY |
29
|
|
|
|
|
|
|
/; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
32
|
|
|
|
|
|
|
interface_types => [ |
33
|
|
|
|
|
|
|
qw/INTERFACE_TYPE_UNKNOWN |
34
|
|
|
|
|
|
|
INTERFACE_TYPE_AGENT |
35
|
|
|
|
|
|
|
INTERFACE_TYPE_SNMP |
36
|
|
|
|
|
|
|
INTERFACE_TYPE_IPMI |
37
|
|
|
|
|
|
|
INTERFACE_TYPE_JMX |
38
|
|
|
|
|
|
|
INTERFACE_TYPE_ANY/ |
39
|
|
|
|
|
|
|
], |
40
|
|
|
|
|
|
|
); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub _prefix { |
43
|
0
|
|
|
0
|
|
|
my (undef, $suffix) = @_; |
44
|
0
|
0
|
|
|
|
|
if ($suffix) { |
45
|
0
|
0
|
|
|
|
|
if ($suffix =~ m/ids?/) { |
46
|
0
|
|
|
|
|
|
return 'interface'.$suffix; |
47
|
|
|
|
|
|
|
} |
48
|
0
|
|
|
|
|
|
return 'hostinterface'.$suffix; |
49
|
|
|
|
|
|
|
} else { |
50
|
0
|
|
|
|
|
|
return 'hostinterface'; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
55
|
|
|
|
|
|
|
__END__ |