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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
zabbix_export:
version: '5.4'
date: '2021-05-09T00:00:00Z'
groups:
-
name: Templates/Modules
templates:
-
template: 'EtherLike-MIB SNMP'
name: 'EtherLike-MIB SNMP'
description: |
Template EtherLike-MIB (duplex control only)
MIBs used:
EtherLike-MIB
Template tooling version used: 0.38
groups:
-
name: Templates/Modules
discovery_rules:
-
name: 'EtherLike-MIB Discovery'
type: SNMP_AGENT
snmp_oid: 'discovery[{#SNMPVALUE},1.3.6.1.2.1.10.7.2.1.19,{#IFOPERSTATUS},1.3.6.1.2.1.2.2.1.8,{#IFALIAS},1.3.6.1.2.1.31.1.1.1.18,{#IFNAME},1.3.6.1.2.1.31.1.1.1.1,{#IFDESCR},1.3.6.1.2.1.2.2.1.2]'
key: net.if.duplex.discovery
delay: 1h
filter:
evaltype: AND
conditions:
-
macro: '{#IFOPERSTATUS}'
value: '1'
formulaid: A
-
macro: '{#SNMPVALUE}'
value: (2|3)
formulaid: B
description: 'Discovering interfaces from IF-MIB and EtherLike-MIB. Interfaces with up(1) Operational Status are discovered.'
item_prototypes:
-
name: 'Interface {#IFNAME}({#IFALIAS}): Duplex status'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.10.7.2.1.19.{#SNMPINDEX}'
key: 'net.if.duplex[dot3StatsDuplexStatus.{#SNMPINDEX}]'
history: 7d
description: |
MIB: EtherLike-MIB
The current mode of operation of the MAC
entity. 'unknown' indicates that the current
duplex mode could not be determined.
Management control of the duplex mode is
accomplished through the MAU MIB. When
an interface does not support autonegotiation,
or when autonegotiation is not enabled, the
duplex mode is controlled using
ifMauDefaultType. When autonegotiation is
supported and enabled, duplex mode is controlled
using ifMauAutoNegAdvertisedBits. In either
case, the currently operating duplex mode is
reflected both in this object and in ifMauType.
Note that this object provides redundant
information with ifMauType. Normally, redundant
objects are discouraged. However, in this
instance, it allows a management application to
determine the duplex status of an interface
without having to know every possible value of
ifMauType. This was felt to be sufficiently
valuable to justify the redundancy.
Reference: [IEEE 802.3 Std.], 30.3.1.1.32,aDuplexStatus.
valuemap:
name: 'EtherLike-MIB::dot3StatsDuplexStatus'
tags:
-
tag: Application
value: 'Interface {#IFNAME}({#IFALIAS})'
trigger_prototypes:
-
expression: 'last(/EtherLike-MIB SNMP/net.if.duplex[dot3StatsDuplexStatus.{#SNMPINDEX}])=2'
name: 'Interface {#IFNAME}({#IFALIAS}): In half-duplex mode'
priority: WARNING
description: 'Please check autonegotiation settings and cabling'
manual_close: 'YES'
preprocessing:
-
type: JAVASCRIPT
parameters:
- |
try {
var data = JSON.parse(value);
}
catch (error) {
throw 'Failed to parse JSON of EtherLike-MIB discovery.';
}
var fields = ['{#SNMPVALUE}','{#IFOPERSTATUS}','{#IFALIAS}','{#IFNAME}','{#IFDESCR}'];
data.forEach(function (element) {
fields.forEach(function (field) {
element[field] = element[field] || '';
});
});
return JSON.stringify(data);
valuemaps:
-
name: 'EtherLike-MIB::dot3StatsDuplexStatus'
mappings:
-
value: '1'
newvalue: unknown
-
value: '2'
newvalue: halfDuplex
-
value: '3'
newvalue: fullDuplex
|