PDF

Monitoring Files and Folders

NetCrunch allows monitoring files, folders, and text logs.

Node SettingsMonitoringAdd Monitoring Sensor

file

File Sensor

FTP/S, HTTP/S, SSH/Bash, SFTP, Windows/SMB, TFTP

NetCrunch contains a single sensor that allows monitoring files using one of the five common protocols. You can monitor file size, file changes, accessibility, or when it has been updated (file age).

Critical File Events
  • Authentication Error
  • Connection Error
  • File does not exists
  • File read error
Warning File Events
  • Alert on Monitoring Sensor counter
  • File exists
  • File is empty
  • File is not empty
  • File modified
  • File access error
  • File has not been updated within the given time range (file age)
  • File updated too often (file age)

text-file

Text File Sensor

FTP/S, HTTP/S, SSH/Bash, SFTP, Windows/SMB

The sensor allows the monitoring of file properties and file content. The content can be searched globally or per line.

File content event monitor can search for some text using plain text patterns or regular expression. The incremental search will monitor only new occurrences in a file.

Text File Line event monitor tries to match lines, and if a new line is found, an alert is triggered. A search pattern can be plain text or a regular expression. If multiple text lines match the search pattern, the program can group them into a single alert.

Critical File Events
  • Authentication Error
  • Connection Error
  • File does not exist
Warning File Events
  • Alert on Monitoring Sensor counter
  • File exists
  • File is empty
  • File is not empty
  • File modified
  • File access error
  • File has not been updated within a given time (file age)
  • File read error
  • File updated too often (file age)
  • File Content event
  • Text File Line event
Example: Alerting on cron log

For example, we want to know when there is at least 1 job ran on exit. So let's see a sample cron log:

Nov  5 01:01:01 localhost CROND[22826]: (root) CMD (run-parts /etc/cron.hourly)
Nov  5 01:01:01 localhost run-parts(/etc/cron.hourly)[22826]: starting 0anacron
Nov  5 01:01:01 localhost anacron[22836]: Anacron started on 2015-11-05
Nov  5 01:01:01 localhost anacron[22836]: Normal exit (1 job run)
Nov  5 01:01:01 localhost run-parts(/etc/cron.hourly)[22838]: finished 0anacron

We can define the following expression to a more specific line:

anacron.*Normal exit \([1-9]*
Performance Metrics
  • Text.File.Sensor/Check Time
  • Text File.Properties/Size

data-file

Data File

FTP/S, HTTP/S, SSH/Bash, SFTP, Windows/SMB

The sensor loads data from a file using one of the predefined file formats. It supports native NetCrunch XML, JSON, and CSV and allows processing data through Data Parsers, allowing for any data.

folder

Folder Sensors

FTP/S, SSH/Bash, Windows/SMB

The folder sensor allows observing folder content. The sensor can trigger alert when the file is deleted and on various other conditions.

Critical Folder Events
  • Authentication Error
  • Connection Error
  • Folder access error
  • Folder does not exist
Warning Folder Events
  • Folder empty
  • Folder exists
  • Folder not empty
Monitoring Folder Content

You can check the list of files matching the given file mask.

  • Files exist
  • Files not exist
  • New file added
  • File removed
  • Last modified file in the folder is older than...
  • Oldest file in the folder is older than...
  • Last modified file in the folder
  • Oldest file in the folder
Performance Metrics
  • Folder.Sensor/Check Time
  • Folder. Properties/File Count
  • Folder.Properties/Size (bytes)

filefile monitoringfile sensorsensortexttext log