Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fieldserver MIB #1392

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions generator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ HPE_URL := https://downloads.hpe.com/pub/softlib2/software1/pubsw-linu
IANA_CHARSET_URL := https://www.iana.org/assignments/ianacharset-mib/ianacharset-mib
IANA_IFTYPE_URL := https://www.iana.org/assignments/ianaiftype-mib/ianaiftype-mib
IANA_PRINTER_URL := https://www.iana.org/assignments/ianaprinter-mib/ianaprinter-mib
FIELDSERVER_URL := https://media.msanet.com/NA/USA/SMC/SoftwareDownloads/FS-8704-26%20SNMP%20Standard%20MIB%20File.zip
KEEPALIVED_URL := https://raw.githubusercontent.com/acassen/keepalived/v2.2.8/doc/KEEPALIVED-MIB.txt
VRRP_URL := https://raw.githubusercontent.com/acassen/keepalived/v2.2.8/doc/VRRP-MIB.txt
VRRPV3_URL := https://raw.githubusercontent.com/acassen/keepalived/v2.2.8/doc/VRRPv3-MIB.txt
Expand Down Expand Up @@ -147,6 +148,7 @@ mibs: \
$(MIBDIR)/IANA-CHARSET-MIB.txt \
$(MIBDIR)/IANA-IFTYPE-MIB.txt \
$(MIBDIR)/IANA-PRINTER-MIB.txt \
$(MIBDIR)/FServer-Std.MIB \
$(MIBDIR)/KEEPALIVED-MIB \
$(MIBDIR)/VRRP-MIB \
$(MIBDIR)/VRRPv3-MIB \
Expand Down Expand Up @@ -228,6 +230,20 @@ $(MIBDIR)/.hpe-mib:
@rm -rf $(TMP_DIR) $(TMP)
@touch $(MIBDIR)/.hpe-mib

$(MIBDIR)/FServer-Std.MIB:
$(eval TMP := $(shell mktemp))
@echo ">> Downloading FIELDSERVER MIB to $(TMP)"
@curl $(CURL_OPTS) -o $(TMP) $(FIELDSERVER_URL)
@unzip -j -d $(MIBDIR) $(TMP) FServer-Std.MIB
# Remove invalid line in the MIB
@sed -i.bak '/----/d' $(MIBDIR)/FServer-Std.MIB
# Fix MIB - it claims that these tables have two indices but the data returned
# from the device only has a single index.
@sed -i -r \
'/(analog|binary)(Inputs|Outputs|Values)Entry OBJECT-TYPE/,/::=/ { /[ab][iov]Description/d }' \
$(MIBDIR)/FServer-Std.MIB
@rm -v $(TMP)

$(MIBDIR)/IANA-CHARSET-MIB.txt:
@echo ">> Downloading IANA charset MIB"
@curl $(CURL_OPTS) -o $(MIBDIR)/IANA-CHARSET-MIB.txt $(IANA_CHARSET_URL)
Expand Down
52 changes: 52 additions & 0 deletions generator/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1144,3 +1144,55 @@ modules:
yrfUpTime:
help: The time (in seconds) since the network management portion of the system was last re-initialized - 1.3.6.1.4.1.1182.2.2.4
scale: 0.01

# MSA fieldserver gateways
#
# Gateway configuration guides:
# * General info: https://cdn.chipkin.com/assets/uploads/2022/Mar/FieldServer_Configuration_Guide_03-19-58-11.pdf
# * SNMP: see "Protocol Driver Manual - SNMP STD" at https://us.msasafety.com/smc/protocols
fieldserver:
walk:
- "FIELDSERVER-STD-MIB-v1-00aF::analogInputsTable"
- "FIELDSERVER-STD-MIB-v1-00aF::analogOutputsTable"
- "FIELDSERVER-STD-MIB-v1-00aF::analogValuesTable"
- "FIELDSERVER-STD-MIB-v1-00aF::binaryInputsTable"
- "FIELDSERVER-STD-MIB-v1-00aF::binaryOutputsTable"
- "FIELDSERVER-STD-MIB-v1-00aF::binaryValuesTable"
overrides:
aiDescription:
type: DisplayString
ignore: true
aoDescription:
type: DisplayString
ignore: true
avDescription:
type: DisplayString
ignore: true
biDescription:
type: DisplayString
ignore: true
boDescription:
type: DisplayString
ignore: true
bvDescription:
type: DisplayString
ignore: true
lookups:
- source_indexes:
- aiValue
lookup: aiDescription
- source_indexes:
- aoValue
lookup: aoDescription
- source_indexes:
- avValue
lookup: avDescription
- source_indexes:
- biValue
lookup: biDescription
- source_indexes:
- boValue
lookup: boDescription
- source_indexes:
- bvValue
lookup: bvDescription
87 changes: 87 additions & 0 deletions snmp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14174,6 +14174,93 @@ modules:
oid: 1.3.6.1.4.1.35265.1.139.6.1.1.2.3
type: gauge
help: Percentage of the device CPU utilization during the last 5 minutes - 1.3.6.1.4.1.35265.1.139.6.1.1.2.3
fieldserver:
walk:
- 1.3.6.1.4.1.6347.2.2
- 1.3.6.1.4.1.6347.2.3
- 1.3.6.1.4.1.6347.2.4
- 1.3.6.1.4.1.6347.2.5
- 1.3.6.1.4.1.6347.2.6
- 1.3.6.1.4.1.6347.2.7
metrics:
- name: aiValue
oid: 1.3.6.1.4.1.6347.2.2.1.1
type: gauge
help: Value - 1.3.6.1.4.1.6347.2.2.1.1
indexes:
- labelname: aiValue
type: gauge
lookups:
- labels:
- aiValue
labelname: aiDescription
oid: 1.3.6.1.4.1.6347.2.2.1.2
type: DisplayString
- name: aoValue
oid: 1.3.6.1.4.1.6347.2.3.1.1
type: gauge
help: Value - 1.3.6.1.4.1.6347.2.3.1.1
indexes:
- labelname: aoValue
type: gauge
lookups:
- labels:
- aoValue
labelname: aoDescription
oid: 1.3.6.1.4.1.6347.2.3.1.2
type: DisplayString
- name: avValue
oid: 1.3.6.1.4.1.6347.2.4.1.1
type: gauge
help: Value - 1.3.6.1.4.1.6347.2.4.1.1
indexes:
- labelname: avValue
type: gauge
lookups:
- labels:
- avValue
labelname: avDescription
oid: 1.3.6.1.4.1.6347.2.4.1.2
type: DisplayString
- name: biValue
oid: 1.3.6.1.4.1.6347.2.5.1.1
type: gauge
help: Value - 1.3.6.1.4.1.6347.2.5.1.1
indexes:
- labelname: biValue
type: gauge
lookups:
- labels:
- biValue
labelname: biDescription
oid: 1.3.6.1.4.1.6347.2.5.1.2
type: DisplayString
- name: boValue
oid: 1.3.6.1.4.1.6347.2.6.1.1
type: gauge
help: Value - 1.3.6.1.4.1.6347.2.6.1.1
indexes:
- labelname: boValue
type: gauge
lookups:
- labels:
- boValue
labelname: boDescription
oid: 1.3.6.1.4.1.6347.2.6.1.2
type: DisplayString
- name: bvValue
oid: 1.3.6.1.4.1.6347.2.7.1.1
type: gauge
help: Value - 1.3.6.1.4.1.6347.2.7.1.1
indexes:
- labelname: bvValue
type: gauge
lookups:
- labels:
- bvValue
labelname: bvDescription
oid: 1.3.6.1.4.1.6347.2.7.1.2
type: DisplayString
hpe:
walk:
- 1.3.6.1.4.1.232.1.2.2.1.1
Expand Down