Application log monitoring is a wide topic and can have various scenarios depending on the application behaviour. This article provides some examples making use of FKM and StateTracker plugins. Sometimes there can be multiple ways to perform similar tasks in Geneos. Here we aim to inspire users to adapt Geneos configurations as needed.
Case 1: An application which process incoming data generates a new log file per job. The logs should contain "job started" and then "job completed" after 5 minutes.
The FKM plugin may be considered in this case. We can configure FKM Tables to monitor a pattern "job started", and with the pattern "job completed" as Clear Key.
We also need to modify some options in the FKM Advanced tab. We will enable the column Seconds Since Last Trigger, so it will show a timer if "job started" appears. And in order to show all filenames matching the file wildcard, the Wildcard Monitor All Matches option is turned on.
Then a gateway rule can be created against the "secondsSinceLastTrigger" column, to compare if it is over 300 (sec). The FKM sampler configuration in XML format has been attached as a reference.
Case 2: An application performs housekeeping tasks to get ready for market open Monday to Friday. The log file should contain the string "housekeeping finished" before 8 am in the morning.
We can make use of StateTracker plugin with the Timeout option inside. In the configuration, we can detect the "housekeeping finished" message to go into Finished status, and if no message is detected until 08:00:00, it will go into Timed Out status.
And in the sampler?s Advanced tab, we can configure Active Time such that the sampler is only active on trading days.
The StateTracker configuration in XML format is attached here for your reference.
Case 3: An application routes trades to a remote system, each trade is recorded with an unique transaction ID in the log file. We would like to monitor the log that for each transaction ID, there should be a corresponding acknowledgement message within 60 seconds.
We will try to configure the StateTracker plugin for this requirement. In order to allow the capture of log pattern together with the transaction ID, the Template checkbox should be selected.
When a new trade is received, we use a Relative Timeout of 60 seconds to monitor the time. If the acknowledgement message is received, we use the Remove Tracker option to clear the corresponding trade.
The resulting Active Console will then show transactions under processing and those that have timed out.
We have attached the StateTracker sampler configuration for your quick reference.