Skip to content

Commit

Permalink
Add support for Sophos XG devices
Browse files Browse the repository at this point in the history
Signed-off-by: PhiBo <[email protected]>
  • Loading branch information
phibos committed Aug 29, 2024
1 parent 23680cc commit d035c81
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 1 deletion.
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

0 comments on commit d035c81

Please sign in to comment.