Skip to content
New issue

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

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

Already on GitHub? # to your account

Add support for Sophos XG devices #1239

Merged
merged 1 commit into from
Sep 12, 2024
Merged
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
12 changes: 11 additions & 1 deletion generator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ INFRAPOWER_URL := https://www.austin-hughes.com/wp-content/uploads/2021/05/IP
LIEBERT_URL := https://www.vertiv.com/globalassets/documents/software/monitoring/lgpmib-win_rev16_299461_0.zip
READYNAS_URL := https://www.downloads.netgear.com/files/ReadyNAS/READYNAS-MIB.txt
READYDATAOS_URL := https://www.downloads.netgear.com/files/GDC/RD5200/READYDATA_MIB.zip
SOPHOS_XG_URL := https://docs.sophos.com/nsg/sophos-firewall/MIB/SOPHOS-XG-MIB.zip

CYBERPOWER_VERSION := 2.11
CYBERPOWER_URL := https://dl4jz3rbrsfum.cloudfront.net/software/CyberPower_MIB_v$(CYBERPOWER_VERSION).MIB.zip
Expand All @@ -79,6 +80,7 @@ clean:
$(MIBDIR)/.net-snmp \
$(MIBDIR)/.paloalto_panos \
$(MIBDIR)/.synology \
$(MIBDIR)/.sophos_xg \
$(MIBDIR)/.kemp-lm \
$(MIBDIR)/readynas \
$(MIBDIR)/readydataos
Expand Down Expand Up @@ -140,6 +142,7 @@ mibs: \
$(MIBDIR)/servertech-sentry3-mib \
$(MIBDIR)/servertech-sentry4-mib \
$(MIBDIR)/.synology \
$(MIBDIR)/.sophos_xg \
$(MIBDIR)/UBNT-UniFi-MIB \
$(MIBDIR)/UBNT-AirFiber-MIB \
$(MIBDIR)/UBNT-AirMAX-MIB.txt \
Expand Down Expand Up @@ -293,6 +296,14 @@ $(MIBDIR)/servertech-sentry4-mib:
@echo ">> Downloading servertech-sentry4-mib"
@curl $(CURL_OPTS) -o $(MIBDIR)/servertech-sentry4-mib $(SERVERTECH4_URL)

$(MIBDIR)/.sophos_xg:
$(eval TMP := $(shell mktemp))
@echo ">> Downloading Sophos XG to $(TMP)"
@curl $(CURL_OPTS) -o $(TMP) $(SOPHOS_XG_URL)
@unzip -j -d $(MIBDIR) $(TMP) SOPHOS-XG-MIB20.txt
@rm -v $(TMP)
@touch $(MIBDIR)/.sophos_xg

$(MIBDIR)/.synology:
$(eval TMP := $(shell mktemp))
@echo ">> Downloading synology to $(TMP)"
Expand Down Expand Up @@ -371,4 +382,3 @@ $(MIBDIR)/readydataos:
@unzip -j -d $(MIBDIR) $(TMP) READYDATAOS-MIB.txt
@mv -v $(MIBDIR)/READYDATAOS-MIB.txt $(MIBDIR)/readydataos
@rm -v $(TMP)

124 changes: 124 additions & 0 deletions generator/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,130 @@ modules:
walk:
- 1.3.6.1.4.1.30065.3.1.1 # aristaSwFwdIp

# Sophos XG
#
# Sophos XG MIBs can be found here:
# https://docs.sophos.com/nsg/sophos-firewall/MIB/SOPHOS-XG-MIB.zip
#
# Tested on Sophos XG v20
#
sophos_xg:
walk:
- 1.3.6.1.4.1.2604.5.1.1 # sfosXGDeviceInfo
- 1.3.6.1.4.1.2604.5.1.2 # sfosXGDeviceStats
- 1.3.6.1.4.1.2604.5.1.3 # sfosXGServiceStatus
- 1.3.6.1.4.1.2604.5.1.4 # sfosXGHAStats
- 1.3.6.1.4.1.2604.5.1.5 # sfosXGLicenseDetails
overrides:
# Info
sfosCurrentDate:
type: ParseDateAndTime
datetime_pattern: "%a %b %d %H:%M:%S %Y"
# Services
sfosPoP3Service:
type: EnumAsStateSet
sfosImap4Service:
type: EnumAsStateSet
sfosSmtpService:
type: EnumAsStateSet
sfosFtpService:
type: EnumAsStateSet
sfosHttpService:
type: EnumAsStateSet
sfosAVService:
type: EnumAsStateSet
sfosASService:
type: EnumAsStateSet
sfosDNSService:
type: EnumAsStateSet
sfosHAService:
type: EnumAsStateSet
sfosIPSService:
type: EnumAsStateSet
sfosApacheService:
type: EnumAsStateSet
sfosNtpService:
type: EnumAsStateSet
sfosTomcatService:
type: EnumAsStateSet
sfosSSLVpnService:
type: EnumAsStateSet
sfosIPSecVpnService:
type: EnumAsStateSet
sfosDatabaseservice:
type: EnumAsStateSet
sfosNetworkService:
type: EnumAsStateSet
sfosGarnerService:
type: EnumAsStateSet
sfosDroutingService:
type: EnumAsStateSet
sfosSSHdService:
type: EnumAsStateSet
sfosDgdService:
type: EnumAsStateSet

# HA
sfosHAStatus:
type: EnumAsInfo
sfosDeviceCurrentAppKey:
ignore: true
sfosDevicePeerAppKey:
ignore: true
sfosDeviceCurrentHAState:
type: EnumAsStateSet
sfosDevicePeerHAState:
type: EnumAsStateSet
sfosDeviceLoadBalancing:
type: EnumAsInfo

# License
sfosBaseFWLicRegStatus:
type: EnumAsStateSet
sfosBaseFWLicExpiryDate:
type: ParseDateAndTime
datetime_pattern: "%b %d %Y"
sfosNetProtectionLicRegStatus:
type: EnumAsStateSet
sfosNetProtectionLicExpiryDate:
type: ParseDateAndTime
datetime_pattern: "%b %d %Y"
sfosWebProtectionLicRegStatus:
type: EnumAsStateSet
sfosWebProtectionLicExpiryDate:
type: ParseDateAndTime
datetime_pattern: "%b %d %Y"
sfosMailProtectionLicRegStatus:
type: EnumAsStateSet
sfosMailProtectionLicExpiryDate:
type: ParseDateAndTime
datetime_pattern: "%b %d %Y"
sfosWebServerProtectionLicRegStatus:
type: EnumAsStateSet
sfosWebServerProtectionLicExpiryDate:
type: ParseDateAndTime
datetime_pattern: "%b %d %Y"
sfosSandstromLicRegStatus:
type: EnumAsStateSet
sfosSandstromLicExpiryDate:
type: ParseDateAndTime
datetime_pattern: "%b %d %Y"
sfosEnhancedSupportLicRegStatus:
type: EnumAsStateSet
sfosEnhancedSupportLicExpiryDate:
type: ParseDateAndTime
datetime_pattern: "%b %d %Y"
sfosEnhancedPlusLicRegStatus:
type: EnumAsStateSet
sfosEnhancedPlusLicExpiryDate:
type: ParseDateAndTime
datetime_pattern: "%b %d %Y"
sfosCentralOrchestrationLicRegStatus:
type: EnumAsStateSet
sfosCentralOrchestrationLicExpiryDate:
type: ParseDateAndTime
datetime_pattern: "%b %d %Y"

# Synology
#
# Synology MIBs can be found here:
Expand Down
Loading