From d035c811a52be5b632e40c74e92a0822c9fc2c90 Mon Sep 17 00:00:00 2001 From: PhiBo Date: Thu, 29 Aug 2024 17:55:55 +0200 Subject: [PATCH] Add support for Sophos XG devices Signed-off-by: PhiBo --- generator/Makefile | 12 +++- generator/generator.yml | 124 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+), 1 deletion(-) diff --git a/generator/Makefile b/generator/Makefile index bd33e407..4c5de2cc 100644 --- a/generator/Makefile +++ b/generator/Makefile @@ -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 @@ -79,6 +80,7 @@ clean: $(MIBDIR)/.net-snmp \ $(MIBDIR)/.paloalto_panos \ $(MIBDIR)/.synology \ + $(MIBDIR)/.sophos_xg \ $(MIBDIR)/.kemp-lm \ $(MIBDIR)/readynas \ $(MIBDIR)/readydataos @@ -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 \ @@ -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)" @@ -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) - diff --git a/generator/generator.yml b/generator/generator.yml index 3fd7b424..784157e6 100644 --- a/generator/generator.yml +++ b/generator/generator.yml @@ -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: