#
# Patrick Marc Preuss, Refried Jello
#
# 2020-01-13: Inital Version
# 2021-01-08: Update for 6.2
#
# FG Version: 5.6, 6.0.7, 6.2
# HW        : FG1500D
# CLUSTER MODE: AP
# VDOMS       : ENABLED
#
# 2023-10-25: Update for 7.4 by Sebastian
# 2022-11-27: Update for 7.0 by Klaus
#
Value Required HOSTNAME (\S+)
Value VERSION (.*)
Value FIRST_GA_PATCH_BUILD_DATE (.*)
Value SECURITY_LEVEL (.*)
Value FIRMWARE_SIGNATURE (.*)
Value VIRUS_DB (.*)
Value EXTENDED_DB (.*)
Value EXTREME_DB (.*)
Value IPS_DB (.*)
Value IPS_ETDB (.*)
Value APP_DB (.*)
Value FMWP_DB (.*) 
Value INDUSTRIAL_DB (.*)
Value SERIAL_NUMBER (\S+)
Value LICENSE_STATUS (.*)
Value EVALUATION_LICENSE_EXPIRES (.*)
Value VM_RESOURCES (.*)
Value IPS_MALICIOUS_URL_DATABASE (.*)
Value IOT_DETECT (.*)
Value OT_DETECT_DB (.*)
Value OT_PATCH_DB (.*)
Value OT_THREAT_DB (.*)
Value IPS_ENGINE (.*)
Value BOTNET_DB (.*)
Value BIOS_VERSION (\S+)
Value SYSTEM_PART_NUMBER (\S+)
Value LOG_HARD_DISK (.*)
Value PRIVATE_ENCRYPTION (\S+)
Value OPERATION_MODE (\S+)
Value CURRENT_VIRTUAL_DOMAIN (\S+)
Value MAX_NUMBER_OF_VIRTUAL_DOMAINS (\d+)
Value VIRTUAL_DOMAINS_STATUS (.*)
Value VIRTUAL_DOMAIN_CONFIGURATION (\S+)
Value FIPS_CC_MODE (\S+)
Value CURRENT_HA_MODE (.*)
Value CLUSTER_UPTIME (.*)
Value CLUSTER_STATE_CHANGE_TIME (.*)
Value BRANCH_POINT (\S+)
Value RELEASE_VERSION_INFORMATION (\S+)
Value FORTIOS_X86_64 (\S+)
Value SYSTEM_TIME (.*)
Value AV_AI_ML_MODEL (.+)
Value LAST_REBOOT_REASON (.+)

Start
  ^Version:\s+${VERSION}
  ^First\s+GA\s+patch\s+build\s+date:\s+${FIRST_GA_PATCH_BUILD_DATE}
  ^(Current\s+)?Security\s+Level:\s+${SECURITY_LEVEL}
  ^Firmware\s+Signature:\s+${FIRMWARE_SIGNATURE}
  ^Virus-DB:\s+${VIRUS_DB}
  ^Extended\s+DB:\s+${EXTENDED_DB}
  ^AV\s+AI/ML\s+Model:\s+${AV_AI_ML_MODEL}
  ^Extreme\s+DB:\s+${EXTREME_DB}
  ^IPS-DB:\s+${IPS_DB}
  ^IPS-ETDB:\s+${IPS_ETDB}
  ^APP-DB:\s+${APP_DB}
  ^FMWP-DB:\s+${FMWP_DB}
  ^INDUSTRIAL-DB:\s+${INDUSTRIAL_DB}
  ^Serial-Number:\s+${SERIAL_NUMBER}
  ^License\s+Status:\s+${LICENSE_STATUS}
  ^Evaluation\s+License\s+Expires:\s+${EVALUATION_LICENSE_EXPIRES}
  ^VM\s+Resources:\s+${VM_RESOURCES}
  ^IPS\s+Malicious\s+URL\s+Database:\s+${IPS_MALICIOUS_URL_DATABASE}
  ^IoT-Detect:\s+${IOT_DETECT}
  ^OT-Detect-DB:\s+${OT_DETECT_DB}
  ^OT-Patch-DB:\s+${OT_PATCH_DB}
  ^OT-Threat-DB:\s+${OT_THREAT_DB}
  ^IPS-Engine:\s+${IPS_ENGINE}
  ^Botnet\s+DB:\s+${BOTNET_DB}
  ^BIOS\s+version:\s+${BIOS_VERSION}
  ^System\s+Part-Number:\s+${SYSTEM_PART_NUMBER}
  ^Log\s+hard\s+disk:\s+${LOG_HARD_DISK}
  ^Hostname:\s+${HOSTNAME}
  ^Private\s+Encryption:\s+${PRIVATE_ENCRYPTION}
  ^Operation\s+Mode:\s+${OPERATION_MODE}
  ^Current\s+virtual\s+domain:\s+${CURRENT_VIRTUAL_DOMAIN}
  ^Max\s+number\s+of\s+virtual\s+domains:\s+${MAX_NUMBER_OF_VIRTUAL_DOMAINS}
  ^Virtual\s+domains\s+status:\s+${VIRTUAL_DOMAINS_STATUS}
  ^Virtual\s+domain\s+configuration:\s+${VIRTUAL_DOMAIN_CONFIGURATION}
  ^FIPS-CC\s+mode:\s+${FIPS_CC_MODE}
  ^Current\s+HA\s+mode:\s+${CURRENT_HA_MODE}
  ^Cluster\s+uptime:\s+${CLUSTER_UPTIME}
  ^Cluster\s+state\s+change\s+time:\s+${CLUSTER_STATE_CHANGE_TIME}
  ^Branch\s+point:\s+${BRANCH_POINT}
  ^Release\s+Version\s+Information:\s+${RELEASE_VERSION_INFORMATION}
  ^FortiOS\s+x86-64:\s+${FORTIOS_X86_64}
  ^System\s+time:\s+${SYSTEM_TIME}
  ^Last\s+reboot\s+reason:\s+${LAST_REBOOT_REASON}
  ^\s*$$
  ^. -> Error
