cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Looking to upgrade from Dynatrace Managed to SaaS? See how

Log metric extraction not working

DamianG
Guide

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.

  • Sample logs:

DamianG_0-1728579647374.png

  • Log details: some entries contains details of the SQL "largest_files", as attributes (such as file_name, file_size):
     

DamianG_2-1728579753974.png

I created a processing rule but it is not working:

DamianG_3-1728579819704.png

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:

DamianG_4-1728579884452.png

What I'm doing wrong?

Thank you.

 

5 REPLIES 5

AntonPineiro
DynaMight Guru
DynaMight Guru

Hi,

Which value do you want to extract?

I would create processing rule from log viewer:

AntonPineiro_0-1728658633116.png

Because it would add log content in rule for testing:

AntonPineiro_1-1728658652489.png

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

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

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:

DamianG_2-1728887910423.png

DamianG_0-1728887493310.png

I think this step should not be needed, as the log content is based in attributes added automatically by the log monitoring:

DamianG_1-1728887843896.png

Anyway, the processing rule is created and, after that, the "Metrics extraction" rule as follows:

DamianG_3-1728887968239.png

DamianG_4-1728888016999.png

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.

 

 

 

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

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

Hi,

Good point! I've changed as suggested (file_size as attribute) and now it is working:

DamianG_0-1728908544926.png

Thank you so much for your help!

Regards

Hi,

I was not sure 100% but and I will remember it for sure! 😉

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

Featured Posts