We building a dashboard that will show the metrics for certain error conditions, with this we want to be able to have that log line to be available on the dashboard. Let me give a easy example. Lets say one of the metrics is to show if a "File not found". If there is a counter for it, we want to display or have a link to the log entry/s for that metric to for example see what file was not found in the log line.
Is this possible and if so, how would this be done?
Solved! Go to Solution.
Hi @Brandt74 there is an extension https://www.dynatrace.com/hub/detail/filesystem-monitoring-extension-v2 which can be used to achieve this.
File count: Number of files matching a pattern
File age count: Number of files matching a pattern and an age
File age: Age of a specific file (oldest or newest when returning more than 1 file)
File size: Size of the files in bytes
File mounted: Is a file mounted on Unix NFS
Another solution, Switch on log monitoring v2. Set the log source where you would like to search the "file not found" pattern.
At the log viewer set a filter for the log content pattern "file not found" then:
You can create a log metric with the peviously mentioned log filter. Now your "file not found" log lines will be counted. You can vizualize this metric or you can create an alert for the metric.
or You can pin the log filter result to a dashboard, so you can see the filtered log lines on the dashboard.
Regarding the what file question: If you can define well the location of the file name in the log line, you can parse out from the logline with a simple log processing.
Simple filter in log viewer for file not found log lines, result can be pinned to a dashboard.
Simple log metric with source and content pattern:
Simple parse a log attribute. Result obm.type value will be propagated based on the log contet after Type:
Above processing rule results in the log viewer if "Type:" is found in a log line:
Extra tip: log attributes can be dimensions at a more complex log metric:
At this log metic the error lines counted and the additional dimension is also added. So in data explorer you can split or filer by log attributes (by dimensions)
Here is a simple example for log monitoring dashboard:
I hope it helps.