Fortinet black logo

User Guide

Start or end Maintenance from the FortiMonitor Linux Agent

24.2.0
Copy Link
Copy Doc ID af1daa65-c273-11ec-9fd1-fa163e15d75b:550170
Download PDF

Start or end Maintenance from the FortiMonitor Linux Agent

You can start or end maintenance on the server where the Linux Agent is installed using the server's command-line interface. Starting maintenance will end any active incidents on the server and prevent new ones from being created while the maintenance period is active.

To start or end the maintenance, run the following command with the appropriate options:

python /usr/bin/fm-agent/maintenance.py

Option

Description

  • h, --help

Lists all of the supported options and their description.

  • s, --start

Start maintenance. This option must always be used with -d or --duration.

  • d DURATION, --duration=DURATION

The duration of the maintenance in minutes.

  • e, --end

End any active maintenance on the server.

  • t METRIC_TAGS, --metric-tags=METRIC_TAGS

An optional comma-separated list of tags to pass to the maintenance.


For example, to start a maintenance period of 120 minutes, run the following command:

python3 /usr/bin/fm-agent/maintenance.py --start --duration=120

An error will occur if you start a maintenance period without including a duration.

To end any active maintenance on the server, run the following command:

python /usr/bin/fm-agent/maintenance.py --end

Log messages can be found in /var/log/fm-agent/maintenance.log.

Start or end Maintenance from the FortiMonitor Linux Agent

You can start or end maintenance on the server where the Linux Agent is installed using the server's command-line interface. Starting maintenance will end any active incidents on the server and prevent new ones from being created while the maintenance period is active.

To start or end the maintenance, run the following command with the appropriate options:

python /usr/bin/fm-agent/maintenance.py

Option

Description

  • h, --help

Lists all of the supported options and their description.

  • s, --start

Start maintenance. This option must always be used with -d or --duration.

  • d DURATION, --duration=DURATION

The duration of the maintenance in minutes.

  • e, --end

End any active maintenance on the server.

  • t METRIC_TAGS, --metric-tags=METRIC_TAGS

An optional comma-separated list of tags to pass to the maintenance.


For example, to start a maintenance period of 120 minutes, run the following command:

python3 /usr/bin/fm-agent/maintenance.py --start --duration=120

An error will occur if you start a maintenance period without including a duration.

To end any active maintenance on the server, run the following command:

python /usr/bin/fm-agent/maintenance.py --end

Log messages can be found in /var/log/fm-agent/maintenance.log.