cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do we ingest files into Dynatrace SaaS that has .json?

karthikr
Newcomer_

Team,

Can anyone please let me know how do we ingest files with .json extension onto Dynatrace SAAS environment? I am able to ingest files with .log extension but not files with .json extension.

5 REPLIES 5

PacoPorro
Dynatrace Leader
Dynatrace Leader

Please check custom log source doc and pay special attention to the security rules .

Thanks @PacoPorro for your response. I believe I had gone through this already. In-fact I created .json file under this path /var/lib/dynatrace/oneagent/agent/config/logmodule to allow .json file to discover by OneAgent.

 

{
"@version": "1.0.0",
"allowed-log-paths-configuration": [
{
"directory-pattern": "/tmp/",
"file-pattern": "*.json",
"action": "INCLUDE"
}
]
}

I included the above content as the json file to override the security rules, but however after configuring Ingest rules and when trying to add json file path under Custom Log Source, I am seeing below warning message.

 

Provided value contains following potential issues:

  • not recognized as log, may not be allowed due to security rules

And when I look at the Host page for log sources, it says the following,

/tmp/example1.json (No log data available)

I am not sure what I am doing wrong with any of the configuration, please advise.

 

Could you please check in the  Log Agent's own logs? 

I just tested it in my lab and it works.

PacoPorro_0-1708616323536.pngPacoPorro_1-1708616564073.png

I created your rule

PacoPorro_2-1708616632726.png

Agent restarted just in case. 
Custom log source created. I ignored the security rule warning.

PacoPorro_3-1708616709092.png

Added the ingest rule.

PacoPorro_4-1708616786639.png

 

 

 

Thank you so much @PacoPorro for testing it so quickly. I believe the issue was related to the timestamp key/value pairs that I was using in the .json file, when I created new event with latest timestamp after enabling the log ingesting rules + custom log source path, it worked. I will continue to perform the testing. Thanks for all your help.

Featured Posts