Fortinet black logo

User Guide

Linux Log Monitoring

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

Linux Log Monitoring

The Linux log monitoring agent plugin allows you to monitor for occurrences of a defined pattern over a given period of time in a specific log file. A simple example would be to monitor the number of times the string "ERROR" appeared in your Apache logs over the past 5 minutes.

Metric Configuration

As a prerequisite, ensure you have the latest version of the Linux agent installed - if you need a refresher, go here.

Within the Linux monitoring category in the monitoring configuration table, click Add Metric. The Linux metric configuration drawer should now be open on the right side of the page.

Navigate to the Logs section.

Metric

Unit

Events

count

Select Add to add and configure the Events metric.

Field

Description

Log Location

The full path to the log file which you would like to monitor.

Log Message Regex Filter

A regex to utilize on each logline. This should be used to look for the specific occurrence you are concerned with. If left blank, this will count every line in the file.

Time Frame

How far back to look for occurrences. For instance, if you want to check for "errors in the past 5 minutes", select 5 minutes.

Frequency

How often the metric should be collected.

Tags

Add tags to the metric.

Because of how the results buffer is built, it will take a period of time to build the initial metric value. This period is the same length of time as the configured Time Frame.

If you have any additional questions, please contact our support team.

Linux Log Monitoring

The Linux log monitoring agent plugin allows you to monitor for occurrences of a defined pattern over a given period of time in a specific log file. A simple example would be to monitor the number of times the string "ERROR" appeared in your Apache logs over the past 5 minutes.

Metric Configuration

As a prerequisite, ensure you have the latest version of the Linux agent installed - if you need a refresher, go here.

Within the Linux monitoring category in the monitoring configuration table, click Add Metric. The Linux metric configuration drawer should now be open on the right side of the page.

Navigate to the Logs section.

Metric

Unit

Events

count

Select Add to add and configure the Events metric.

Field

Description

Log Location

The full path to the log file which you would like to monitor.

Log Message Regex Filter

A regex to utilize on each logline. This should be used to look for the specific occurrence you are concerned with. If left blank, this will count every line in the file.

Time Frame

How far back to look for occurrences. For instance, if you want to check for "errors in the past 5 minutes", select 5 minutes.

Frequency

How often the metric should be collected.

Tags

Add tags to the metric.

Because of how the results buffer is built, it will take a period of time to build the initial metric value. This period is the same length of time as the configured Time Frame.

If you have any additional questions, please contact our support team.