FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
Gaetan_
Staff
Staff
Article Id 269557
Description This article describes how to monitor FortiGate's need for a system file check.
Scope

When a FortiGate with a hard disk is not gracefully shutdown/rebooted (power outage for example), a message stating 'File System Check Recommended!' will appear when connecting to CLI or GUI.

It can be useful to monitor this message for multiple reasons.

 

From CLI:

 

 
CLI.jpg

From GUI:

 

GUI.jpg

Solution

This can be done using the following methods:

  • FortiGate CLI output of command 'fnsysctl ls -l /etc/reboot_safe.chk'. If the file exists then a file system check is recommended.
  • FortiGate API call 'https://<YOUR-FORTGATE-ADDRESS>/api/v2/monitor/web-ui/state/?access_token=<YOUR-API-TOKEN>'. Check for 'need_fs_check' field, values can be 'true' (File System Check Recommended) or 'false' (No File System Check Recommended).
  • FortiManager CLI output of command 'diag fwmanager show-dev-disk-check-status <device_name/id>'.
Contributors