In the FKM plugin, users can use wildcard characters or the date generation function to match the filename to be monitored.
There are two ways to design the FKM to look at the latest file:
1. You can add a wildcard at the end of the filename. The FKM plugin supports using * and ? characters to represent a wildcard, as typically used in a UNIX shell session.
For example, we want to monitor a file named siteserver2021-09-16.log
We can use the following pattern
The FKM sampler can grab the latest timestamp of the file by using the "Wildcard Match Time" setting in the FKM Advanced tab.
This setting controls how the "latest" file is picked. You have the option of selecting "changed" or "modified."
Below is the difference between each setting:
When using the wildcard approach, kindly ensure that the setting "Wildcard monitor all matches" is not ticked (unchecked) or greyed out.
If the setting is ticked (checked), FKM will monitor all files that starts with siteserver and ends with .log. This setting can also be found in the FKM sampler's Advanced tab.
2. Since the above example contains today's date in the filename, we can use the today function with the below date format:
To see more date generation function codes supported by the FKM plugin, please refer to the Date Generation section in the FKM documentation.
Attached is the "Monitor Latest File Version" sampler. Please note this sampler was set up on version GA5.9.0.