File Change Monitor
You can use this SAM component monitor to perform an SHA1/MD5 checksum comparison on a file to determine if it was modified since the last poll occurred. It runs a file integrity test to compare the checksum of a test.txt
file stored on the SolarWinds Platform server with a copy of the same file on a target system.
- If the checksums match, the component monitor reports its status as Up.
- If the checksums do not match, the file was modified. The monitor remains in a Down state until you recalculate the checksum.
This component monitor uses ports 445 (TCP) and 445 (UDP).
It is included in the following SAM application monitor templates:
Prerequisites
For Windows systems, you'll need Windows credentials with read access to the network share and file.
Credentials
Windows credentials with read access to the network share and file.
Statistic
The statistic is the number of hours since the file modification.
Agent-less or SolarWinds Platform agent for Windows requirements
Implementation of these components relies either on WMI or Windows file share access to the target machine.
SolarWinds Platform agent for Linux requirements
Python implementation leverages native file system access directly from the Python script that runs locally on the target agent machine.
To leverage this monitor against a Linux system, use the SolarWinds Platform Agent for Linux. This means that the Linux machine you plan to monitor must have the Linux agent installed, and that the node is managed using the agent within the SolarWinds Platform. See Configure Linux/Unix systems for monitoring by the SolarWinds Platform agent in SAM.
Set up a File Change Monitor
To prepare target systems, create a test.txt
on the SolarWinds Platform server and copy that file to the target Windows server, as described next.
- Prepare target systems.
- In a text editor, create a file named
test.txt
; the file contents do not matter. - Copy the file to local directories in two locations:
- The SolarWinds Platform server
- The target server
- In a text editor, create a file named
- In the SolarWinds Platform Web Console, click Settings > SAM Settings > Component Monitor Library.
- Expand the File Change Monitor row and drill down to select the template or application monitor where you're configuring the monitor.
- On the template (or application monitor) page, expand settings to display File Change Monitor fields.
- Enter values in or enable the following fields (see below for descriptions), as necessary:
- Description
- Enable Component
- Credential for Monitoring
- File Path
- Convert Value
SAM will populate the Current Snapshot Checksum field automatically, after the next two steps.
- To upload a file for snapshot creation:
- Click Choose File.
- Navigate to the
test.txt
file on the SolarWinds Platform server. - Click Open.
- Click Update Checksum.
SAM compares the twotest.txt
files and updates the Current Snapshot Checksum value. - Test the updated component monitor.
- Click Set Test Node to select a node.
- Click Test.
If the test fails, correct the problem described in the error message and try again.
Field descriptions
Description
A default description of the monitor. To override the default description, add to or replace existing text. Changes are automatically saved. The variable to access this field is ${UserDescription}
.
Customize descriptions to specify what will be monitored so related alerts and notifications are more meaningful later.
Enable Component
Determines if the component is enabled. Disabling the component leaves it in a deactivated state that does not influence its application availability or status, as displayed in the SolarWinds Platform Web Console.
Credential for Monitoring
Select a credential with read access to the file or use the <Inherit credential from node> option. If the credential you need is not in the credentials list, add it in the Credentials Library. See Understand the Credentials Library for details.
File Path
The full path where the file is stored on the target system.
Convert Value
Select this option to mathematically convert returned values through the use of data transformations. See Convert values in data transformations for SAM component monitors.
Current Snapshot Checksum
Initially empty, SAM populates this field with the calculated checksum after comparing the monitored file on the target server to the copy on the SolarWinds Platform server. To calculate a new checksum, click Update Checksum..
Statistic Threshold
Specify a threshold that indicates a warning level was breached. Logical operators are in the drop-down list, followed by a blank field where you can enter the value of this threshold. For example: Less than 15
for warning, Less than 5.
for critical. See Application Monitor Thresholds.
User Notes
Add notes for easy reference. You can access this field by using the variable, ${UserNotes}
.