/
EXAMPLE-MIB.txt
368 lines (319 loc) · 10.4 KB
/
EXAMPLE-MIB.txt
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
EXAMPLE-MIB DEFINITIONS ::= BEGIN
------------------------------------------------------------------------
-- Example MIB for python-netsnmpagent
-- Copyright (c) 2012 Pieter Hollants <pieter@hollants.com>
-- Licensed under the GNU Public License (GPL) version 3
------------------------------------------------------------------------
-- Imports
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
Integer32, Unsigned32, Counter32, Counter64, TimeTicks, IpAddress,
enterprises
FROM SNMPv2-SMI
TEXTUAL-CONVENTION, DisplayString
FROM SNMPv2-TC
MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
FROM SNMPv2-CONF
agentxObjects
FROM AGENTX-MIB;
-- Description and update information
exampleMIB MODULE-IDENTITY
LAST-UPDATED "201211210000Z"
ORGANIZATION "N/A"
CONTACT-INFO
"Editor:
Pieter Hollants
EMail: <pieter@hollants.com>"
DESCRIPTION
"Example MIB for python-netsnmpagent"
REVISION "201211210000Z"
DESCRIPTION
"An example MIB for python-netsnmpagent's example.py."
::= { agentxObjects 30187 }
-- Definition of a generic ExampleNotificationStatus type
ExampleNotificationStatus ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"Indicates the enabling or disabling of a particular class of
notifications."
SYNTAX INTEGER {
disabled (0), -- This class of notifications is disabled
enabled (1) -- This class of notifications is enabled
}
-- Definition of MIB's root nodes
exampleMIBObjects OBJECT IDENTIFIER ::= { exampleMIB 1 }
exampleMIBNotifications OBJECT IDENTIFIER ::= { exampleMIB 2 }
exampleMIBConformance OBJECT IDENTIFIER ::= { exampleMIB 3 }
exampleScalars OBJECT IDENTIFIER ::= { exampleMIBObjects 1 }
exampleTables OBJECT IDENTIFIER ::= { exampleMIBObjects 2 }
------------------------------------------------------------------------
-- Scalars
------------------------------------------------------------------------
exampleUnsigned OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"A read-write, unsigned, 32-bits integer value."
::= { exampleScalars 1 }
exampleUnsignedRO OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A read-only, unsigned, 32-bits integer value."
::= { exampleScalars 2 }
exampleInteger OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"A read-write, signed, 32-bits integer value."
::= { exampleScalars 3 }
exampleIntegerRO OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A read-only, signed, 32-bits integer value."
::= { exampleScalars 4 }
exampleCounter32 OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A read-only, unsigned, 32-bits counter value."
::= { exampleScalars 5 }
exampleCounter64 OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A read-only, unsigned, 64-bits counter value."
::= { exampleScalars 6 }
exampleTimeTicks OBJECT-TYPE
SYNTAX TimeTicks
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"A read-only, unsigned, 32-bits TimeTicks value."
::= { exampleScalars 7 }
exampleIpAddress OBJECT-TYPE
SYNTAX IpAddress
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"A 32-bits IPv4 address."
::= { exampleScalars 8 }
ExampleOctetString ::= TEXTUAL-CONVENTION
DISPLAY-HINT "1024t"
STATUS current
DESCRIPTION
"An octet string containing characters in UTF-8 encoding."
SYNTAX OCTET STRING (SIZE (1..1024))
exampleOctetString OBJECT-TYPE
SYNTAX ExampleOctetString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"An UTF-8 encoded string value."
::= { exampleScalars 9 }
exampleDisplayString OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"An ASCII string value."
::= { exampleScalars 10 }
------------------------------------------------------------------------
-- Tables
------------------------------------------------------------------------
firstTableNumber OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of entries in firstTable."
::= { exampleTables 1 }
firstTable OBJECT-TYPE
SYNTAX SEQUENCE OF FirstTableEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The first example table"
::= { exampleTables 2 }
FirstTableEntry ::=
SEQUENCE {
firstTableEntryIndex DisplayString,
firstTableEntryDesc DisplayString,
firstTableEntryValue Integer32
}
firstTableEntry OBJECT-TYPE
SYNTAX FirstTableEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A particular firstTable row."
INDEX { firstTableEntryIndex }
::= { firstTable 1 }
firstTableEntryIndex OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The index column used to generate string indices into
firstTable."
::= { firstTableEntry 1 }
firstTableEntryDesc OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A firstTableEntry's description."
::= { firstTableEntry 2 }
firstTableEntryValue OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A firstTableEntry's value."
::= { firstTableEntry 3 }
secondTableNumber OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of entries in secondTable."
::= { exampleTables 3 }
secondTable OBJECT-TYPE
SYNTAX SEQUENCE OF SecondTableEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The first example table"
::= { exampleTables 4 }
SecondTableEntry ::=
SEQUENCE {
secondTableEntryIndex Integer32,
secondTableEntryDesc DisplayString,
secondTableEntryValue Unsigned32
}
secondTableEntry OBJECT-TYPE
SYNTAX SecondTableEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A particular secondTable row."
INDEX { secondTableEntryIndex }
::= { secondTable 1 }
secondTableEntryIndex OBJECT-TYPE
SYNTAX Integer32 (0..2147483647)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The index column used to generate numerical indices into
secondTable."
::= { secondTableEntry 1 }
secondTableEntryDesc OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"An secondTableEntry's description."
::= { secondTableEntry 2 }
secondTableEntryValue OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"An secondTableEntry's value."
::= { secondTableEntry 3 }
------------------------------------------------------------------------
-- Notifications
------------------------------------------------------------------------
events OBJECT IDENTIFIER ::= { exampleMIBNotifications 0 }
operation OBJECT IDENTIFIER ::= { exampleMIBNotifications 1 }
exampleUnsignedROChange NOTIFICATION-TYPE
OBJECTS {
exampleUnsignedRO
}
STATUS current
DESCRIPTION
"An exampleScalarsChange notification signifies that there has
been a change to the value of exampleUnsignedRO."
::= { events 1 }
firstTableChange NOTIFICATION-TYPE
OBJECTS {
firstTableEntryDesc, firstTableEntryValue
}
STATUS current
DESCRIPTION
"An firstTableChange notification signifies that there has
been a change to an firstTableEntry."
::= { events 2 }
exampleUnsignedROChangeNotificationsEnabled OBJECT-TYPE
SYNTAX ExampleNotificationStatus
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Controls whether exampleUnsignedROChange notifications are
enabled or disabled."
::= { operation 1 }
firstTableChangeNotificationsEnabled OBJECT-TYPE
SYNTAX ExampleNotificationStatus
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Controls whether firstTableChange notifications are
enabled or disabled."
::= { operation 2 }
------------------------------------------------------------------------
-- Conformance
------------------------------------------------------------------------
exampleMIBGroups OBJECT IDENTIFIER ::= { exampleMIBConformance 1 }
exampleMIBCompliances OBJECT IDENTIFIER ::= { exampleMIBConformance 2 }
exampleMIBScalarsGroup OBJECT-GROUP
OBJECTS {
exampleInteger, exampleIntegerRO,
exampleUnsigned, exampleUnsignedRO,
exampleCounter32, exampleCounter64,
exampleTimeTicks,
exampleIpAddress,
exampleOctetString, exampleDisplayString,
exampleUnsignedROChangeNotificationsEnabled
}
STATUS current
DESCRIPTION
"A collection of objects related to exampleScalars."
::= { exampleMIBGroups 1 }
exampleMIBTablesGroup OBJECT-GROUP
OBJECTS {
firstTableNumber,
firstTableEntryDesc, firstTableEntryValue,
firstTableChangeNotificationsEnabled,
secondTableNumber,
secondTableEntryDesc, secondTableEntryValue
}
STATUS current
DESCRIPTION
"A collection of objects related to exampleTables."
::= { exampleMIBGroups 2 }
exampleMIBScalarsNotificationsGroup NOTIFICATION-GROUP
NOTIFICATIONS {
exampleUnsignedROChange
}
STATUS current
DESCRIPTION
"The notifications which indicate specific changes in
exampleMIBScalars."
::= { exampleMIBGroups 3 }
exampleMIBTablesNotificationsGroup NOTIFICATION-GROUP
NOTIFICATIONS {
firstTableChange
}
STATUS current
DESCRIPTION
"The notifications which indicate specific changes in
exampleTables."
::= { exampleMIBGroups 4 }
END