10 Oct 2024 06:08 PM - last edited on 16 Oct 2024 07:37 AM by MaciejNeumann
Hi all,
I have the SQL Extension running on my environment, adding logs automatically. I would like to extract a value from the logs using log metrics, but it is not working.
I created a processing rule but it is not working:
where I used <<content="\\MSSQL\\DATA\\">> as filter for the log entries. I'm using the attributes included in each log entry, but metric extraction rule is not working:
What I'm doing wrong?
Thank you.
Solved! Go to Solution.
11 Oct 2024 04:00 PM
Hi,
Which value do you want to extract?
I would create processing rule from log viewer:
Because it would add log content in rule for testing:
And you can create processor definition and test rule, as preview. And you can save it when you see it is working as expected.
Best regards
14 Oct 2024 07:43 AM
Hi,
I've created the processing rule using log viewer as you said. In addition, I've created a processor definition, based in the automatic log content in rule for testing:
I think this step should not be needed, as the log content is based in attributes added automatically by the log monitoring:
Anyway, the processing rule is created and, after that, the "Metrics extraction" rule as follows:
Attribute "file_name", "database", "file_size" and "server" are already visible automatically in the Log Viewer, as mentioned before, and also included in the log processing rule. But the metric is not available yet.
Thank you.
14 Oct 2024 09:55 AM
Hi,
As it is a metric, can you try to add file_size as attribute? It means, file_size as attribute, and file_name as dimension.
Just to try as file_size is INT value, maybe does not like to add STRING as metric.
Best regards
14 Oct 2024 01:23 PM
Hi,
Good point! I've changed as suggested (file_size as attribute) and now it is working:
Thank you so much for your help!
Regards
14 Oct 2024 06:17 PM
Hi,
I was not sure 100% but and I will remember it for sure! 😉
Best regards