Skip to content

Commit 6ad3a4d

Browse files
authored
Clean up SNMP metrics (#1164)
2 parents fa67439 + 0546fcd commit 6ad3a4d

File tree

2 files changed

+1
-238
lines changed

2 files changed

+1
-238
lines changed

facts/inventory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ def generatekeaconfig(servers, aps, vlans, outputdir):
949949

950950
def _prom_exclude(name):
951951
"""Return True if the name should be excluded from prom configs."""
952-
return re.match(r"^(deceased|donotuse|massflash|spare)", name)
952+
return re.match(r"^(deceased|donotuse|massflash|spare|expob5|expoc4|expoc5)", name)
953953

954954

955955
def generatepromconfigs(switches, pis, aps, outputdir):

nix/nixos-modules/services/snmp-alloy.yml

Lines changed: 0 additions & 237 deletions
Original file line numberDiff line numberDiff line change
@@ -17,42 +17,6 @@ modules:
1717
- 1.3.6.1.2.1.2
1818
- 1.3.6.1.2.1.31.1.1
1919
metrics:
20-
- name: ifNumber
21-
oid: 1.3.6.1.2.1.2.1
22-
type: gauge
23-
help: The number of network interfaces present on this system.
24-
# -- ifTable scalars (indexed by ifIndex) --
25-
- name: ifType
26-
oid: 1.3.6.1.2.1.2.2.1.3
27-
type: EnumAsInfo
28-
help: The type of interface.
29-
indexes:
30-
- labelname: ifIndex
31-
type: gauge
32-
lookups:
33-
- labels: [ifIndex]
34-
labelname: ifAlias
35-
oid: 1.3.6.1.2.1.31.1.1.1.18
36-
type: DisplayString
37-
- labels: [ifIndex]
38-
labelname: ifDescr
39-
oid: 1.3.6.1.2.1.2.2.1.2
40-
type: DisplayString
41-
- labels: [ifIndex]
42-
labelname: ifName
43-
oid: 1.3.6.1.2.1.31.1.1.1.1
44-
type: DisplayString
45-
enum_values:
46-
1: other
47-
6: ethernetCsmacd
48-
24: softwareLoopback
49-
53: propVirtual
50-
131: tunnel
51-
135: l2vlan
52-
136: l3ipvlan
53-
150: mplsTunnel
54-
161: ieee8023adLag
55-
209: bridge
5620
- name: ifMtu
5721
oid: 1.3.6.1.2.1.2.2.1.4
5822
type: gauge
@@ -73,26 +37,6 @@ modules:
7337
labelname: ifName
7438
oid: 1.3.6.1.2.1.31.1.1.1.1
7539
type: DisplayString
76-
- name: ifSpeed
77-
oid: 1.3.6.1.2.1.2.2.1.5
78-
type: gauge
79-
help: An estimate of the interface's current bandwidth in bits per second.
80-
indexes:
81-
- labelname: ifIndex
82-
type: gauge
83-
lookups:
84-
- labels: [ifIndex]
85-
labelname: ifAlias
86-
oid: 1.3.6.1.2.1.31.1.1.1.18
87-
type: DisplayString
88-
- labels: [ifIndex]
89-
labelname: ifDescr
90-
oid: 1.3.6.1.2.1.2.2.1.2
91-
type: DisplayString
92-
- labels: [ifIndex]
93-
labelname: ifName
94-
oid: 1.3.6.1.2.1.31.1.1.1.1
95-
type: DisplayString
9640
- name: ifAdminStatus
9741
oid: 1.3.6.1.2.1.2.2.1.7
9842
type: gauge
@@ -145,67 +89,6 @@ modules:
14589
5: dormant
14690
6: notPresent
14791
7: lowerLayerDown
148-
- name: ifLastChange
149-
oid: 1.3.6.1.2.1.2.2.1.9
150-
type: gauge
151-
help: The value of sysUpTime at the time the interface entered its current operational state.
152-
indexes:
153-
- labelname: ifIndex
154-
type: gauge
155-
lookups:
156-
- labels: [ifIndex]
157-
labelname: ifAlias
158-
oid: 1.3.6.1.2.1.31.1.1.1.18
159-
type: DisplayString
160-
- labels: [ifIndex]
161-
labelname: ifDescr
162-
oid: 1.3.6.1.2.1.2.2.1.2
163-
type: DisplayString
164-
- labels: [ifIndex]
165-
labelname: ifName
166-
oid: 1.3.6.1.2.1.31.1.1.1.1
167-
type: DisplayString
168-
# -- 32-bit counters (ifTable) --
169-
- name: ifInOctets
170-
oid: 1.3.6.1.2.1.2.2.1.10
171-
type: counter
172-
help: The total number of octets received on the interface, including framing characters.
173-
indexes:
174-
- labelname: ifIndex
175-
type: gauge
176-
lookups:
177-
- labels: [ifIndex]
178-
labelname: ifAlias
179-
oid: 1.3.6.1.2.1.31.1.1.1.18
180-
type: DisplayString
181-
- labels: [ifIndex]
182-
labelname: ifDescr
183-
oid: 1.3.6.1.2.1.2.2.1.2
184-
type: DisplayString
185-
- labels: [ifIndex]
186-
labelname: ifName
187-
oid: 1.3.6.1.2.1.31.1.1.1.1
188-
type: DisplayString
189-
- name: ifInUcastPkts
190-
oid: 1.3.6.1.2.1.2.2.1.11
191-
type: counter
192-
help: The number of unicast packets delivered to a higher layer.
193-
indexes:
194-
- labelname: ifIndex
195-
type: gauge
196-
lookups:
197-
- labels: [ifIndex]
198-
labelname: ifAlias
199-
oid: 1.3.6.1.2.1.31.1.1.1.18
200-
type: DisplayString
201-
- labels: [ifIndex]
202-
labelname: ifDescr
203-
oid: 1.3.6.1.2.1.2.2.1.2
204-
type: DisplayString
205-
- labels: [ifIndex]
206-
labelname: ifName
207-
oid: 1.3.6.1.2.1.31.1.1.1.1
208-
type: DisplayString
20992
- name: ifInDiscards
21093
oid: 1.3.6.1.2.1.2.2.1.13
21194
type: counter
@@ -246,46 +129,6 @@ modules:
246129
labelname: ifName
247130
oid: 1.3.6.1.2.1.31.1.1.1.1
248131
type: DisplayString
249-
- name: ifOutOctets
250-
oid: 1.3.6.1.2.1.2.2.1.16
251-
type: counter
252-
help: The total number of octets transmitted out of the interface, including framing characters.
253-
indexes:
254-
- labelname: ifIndex
255-
type: gauge
256-
lookups:
257-
- labels: [ifIndex]
258-
labelname: ifAlias
259-
oid: 1.3.6.1.2.1.31.1.1.1.18
260-
type: DisplayString
261-
- labels: [ifIndex]
262-
labelname: ifDescr
263-
oid: 1.3.6.1.2.1.2.2.1.2
264-
type: DisplayString
265-
- labels: [ifIndex]
266-
labelname: ifName
267-
oid: 1.3.6.1.2.1.31.1.1.1.1
268-
type: DisplayString
269-
- name: ifOutUcastPkts
270-
oid: 1.3.6.1.2.1.2.2.1.17
271-
type: counter
272-
help: The total number of unicast packets requested to be transmitted.
273-
indexes:
274-
- labelname: ifIndex
275-
type: gauge
276-
lookups:
277-
- labels: [ifIndex]
278-
labelname: ifAlias
279-
oid: 1.3.6.1.2.1.31.1.1.1.18
280-
type: DisplayString
281-
- labels: [ifIndex]
282-
labelname: ifDescr
283-
oid: 1.3.6.1.2.1.2.2.1.2
284-
type: DisplayString
285-
- labels: [ifIndex]
286-
labelname: ifName
287-
oid: 1.3.6.1.2.1.31.1.1.1.1
288-
type: DisplayString
289132
- name: ifOutDiscards
290133
oid: 1.3.6.1.2.1.2.2.1.19
291134
type: counter
@@ -522,18 +365,10 @@ modules:
522365
oid: 1.3.6.1.2.1.1.3
523366
type: gauge
524367
help: The time (in hundredths of a second) since the network management portion of the system was last re-initialized.
525-
- name: sysContact
526-
oid: 1.3.6.1.2.1.1.4
527-
type: DisplayString
528-
help: The textual identification of the contact person for this managed node.
529368
- name: sysName
530369
oid: 1.3.6.1.2.1.1.5
531370
type: DisplayString
532371
help: An administratively-assigned name for this managed node.
533-
- name: sysLocation
534-
oid: 1.3.6.1.2.1.1.6
535-
type: DisplayString
536-
help: The physical location of this node.
537372
# ---------------------------------------------------------------------------
538373
# jnxOperating - Juniper Operating State (JUNIPER-MIB)
539374
# OID base: 1.3.6.1.4.1.2636.3.1.13 (jnxOperatingTable)
@@ -574,75 +409,3 @@ modules:
574409
labelname: jnxOperatingDescr
575410
oid: 1.3.6.1.4.1.2636.3.1.13.1.5
576411
type: DisplayString
577-
- name: jnxOperatingTemp
578-
oid: 1.3.6.1.4.1.2636.3.1.13.1.7
579-
type: gauge
580-
help: Temperature of the operating component in degrees Celsius.
581-
indexes:
582-
- labelname: jnxOperatingContentsIndex
583-
type: gauge
584-
- labelname: jnxOperatingL1Index
585-
type: gauge
586-
- labelname: jnxOperatingL2Index
587-
type: gauge
588-
- labelname: jnxOperatingL3Index
589-
type: gauge
590-
lookups:
591-
- labels: [jnxOperatingContentsIndex, jnxOperatingL1Index, jnxOperatingL2Index, jnxOperatingL3Index]
592-
labelname: jnxOperatingDescr
593-
oid: 1.3.6.1.4.1.2636.3.1.13.1.5
594-
type: DisplayString
595-
- name: jnxOperatingBuffer
596-
oid: 1.3.6.1.4.1.2636.3.1.13.1.11
597-
type: gauge
598-
help: Buffer pool utilization percentage of the operating component.
599-
indexes:
600-
- labelname: jnxOperatingContentsIndex
601-
type: gauge
602-
- labelname: jnxOperatingL1Index
603-
type: gauge
604-
- labelname: jnxOperatingL2Index
605-
type: gauge
606-
- labelname: jnxOperatingL3Index
607-
type: gauge
608-
lookups:
609-
- labels: [jnxOperatingContentsIndex, jnxOperatingL1Index, jnxOperatingL2Index, jnxOperatingL3Index]
610-
labelname: jnxOperatingDescr
611-
oid: 1.3.6.1.4.1.2636.3.1.13.1.5
612-
type: DisplayString
613-
- name: jnxOperating1MinLoadAvg
614-
oid: 1.3.6.1.4.1.2636.3.1.13.1.20
615-
type: gauge
616-
help: 1-minute load average of the operating component.
617-
indexes:
618-
- labelname: jnxOperatingContentsIndex
619-
type: gauge
620-
- labelname: jnxOperatingL1Index
621-
type: gauge
622-
- labelname: jnxOperatingL2Index
623-
type: gauge
624-
- labelname: jnxOperatingL3Index
625-
type: gauge
626-
lookups:
627-
- labels: [jnxOperatingContentsIndex, jnxOperatingL1Index, jnxOperatingL2Index, jnxOperatingL3Index]
628-
labelname: jnxOperatingDescr
629-
oid: 1.3.6.1.4.1.2636.3.1.13.1.5
630-
type: DisplayString
631-
- name: jnxOperating5MinLoadAvg
632-
oid: 1.3.6.1.4.1.2636.3.1.13.1.21
633-
type: gauge
634-
help: 5-minute load average of the operating component.
635-
indexes:
636-
- labelname: jnxOperatingContentsIndex
637-
type: gauge
638-
- labelname: jnxOperatingL1Index
639-
type: gauge
640-
- labelname: jnxOperatingL2Index
641-
type: gauge
642-
- labelname: jnxOperatingL3Index
643-
type: gauge
644-
lookups:
645-
- labels: [jnxOperatingContentsIndex, jnxOperatingL1Index, jnxOperatingL2Index, jnxOperatingL3Index]
646-
labelname: jnxOperatingDescr
647-
oid: 1.3.6.1.4.1.2636.3.1.13.1.5
648-
type: DisplayString

0 commit comments

Comments
 (0)