07 Nov 2017 01:17 PM
Hello. I recently added custom log file to the apache2 process and Dynatrace is unable to display the content of log file. It perform the "Pre-processing log files" and return the error : No supported date format found in log file(s).
How must I configure my log file with correct date ? Below some example of log entries.
[SERVICEPERFDATA] 1510060541 U-AP-SPONTIS-32.44-PRO PING 4.004 0.000 PING OK - Packet loss = 0%, RTA = 0.21 ms rta=0.212000ms;200.000000;600.000000;0.000000 pl=0%;20;60;0
or
[HOSTPERFDATA] 1510060512 U-AP-SPONTIS-32.34-PRO 4.003 PING OK - Packet loss = 0%, RTA = 0.22 ms rta=0.221000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0
I think the second value is a timestamp. Maybe I can change it to other format.
Thank for your help
Solved! Go to Solution.
08 Nov 2017 01:22 PM
It's enough o have sth like this:
2017-11-08 14:22:00 UTC [HOSTPERFDATA] 1510060512 U-AP-SPONTIS-32.34-PRO 4.003 PING OK - Packet loss = 0%, RTA = 0.22 ms rta=0.221000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0
24 Nov 2017 12:06 PM
Hi, I am getting the same error when i manually configured a log file. but the data in the log file is of xml format. I am able to detect errors in this file but unable to analyse the logs whereas i am able to download the log file from dynatrace console.
Could you please let me know what changes needs to be done in order to open the log contents also is it possible to expose this log file to service assurance tool.
Thanks in advance,
24 Nov 2017 06:35 PM
Can you paste an example log line here (or send it to me). Generally xml or json is not supported yet, but of the structure is simple enough to treat it as text, it can be doable.
27 Nov 2017 08:22 AM - last edited on 03 Jan 2024 12:41 PM by MaciejNeumann
Hi,
<?xml version="1.0" encoding="UTF-8"?><ns1:LogRequest xmlns:ns1="URL " xmlns:ns="URL " xmlns:ns="URL " xmlns:ns0123456789="URL " xmlns:soapenv="URL/ " xmlns:tns1="URL " xmlns:ns0123="URL " xmlns:ns012345678910="URL " xmlns:ns="URL " xmlns:ns01="URL " xmlns:ns="URL " xmlns:ns0123456789="URL " xmlns:tns1="URL " xmlns:ns0123="URL " xmlns:ns012345678910="URL " xmlns:ns="URL " xmlns:ns01="URL " xmlns:ns="URL " xmlns:soapenv="URL/ " xmlns:com3="URL " xmlns:org="URL " xmlns:com1="URL" xmlns:com2="URL ">
<!--You have a CHOICE of the next 4 items at this level-->
<org:MSISDN>447400011</org:MSISDN>
<org:Header>
<com:CommonHeader>
<com1:CorrelationId_T>100110011101</com1:CorrelationId_T>
<com1:ActivityName_T>IH001-CheckpointService</com1:ActivityName_T>
<com1:MsgType_T>Synchronous</com1:MsgType_T>
<com1:Source>IC1001-01-AS-GetOrganizationInfo-Starter</com1:Source>
<com1:MessageProp_T />
<com1:Security_T />
<com1:Timestamp>2017-08-24T13:20:00-05:00</com1:Timestamp>
<com1:ConsumerInfo />
<com1:ProviderInfo />
</com:CommonHeader>
</org:Header>
</org:OrganizationInfo_3DS_Request></ns:Transaction></ns:Header><Category>RequestPayload</Category><Audit>false</Audit></ns1:LogRequest>
28 Nov 2017 09:00 AM
This format is not supported yet.
09 Nov 2017 06:43 AM
Hello. I successfully modified my nagios log output using the macro $LONGDATETIME instead of $TIMET.
[SERVICEPERFDATA] Thu Nov 9 07:42:39 CET 2017 U-AP-SPONTIS-32.20-PRO PING 4.004 0.000 PING OK - Packet loss = 0%, RTA = 0.35 ms rta=0.354000ms;200.000000;600.000000;0.000000 pl=0%;20;60;0
16 Nov 2017 02:01 PM
Is it possible to provide a custom date time format? We have an application that outputs logs with the following date/time format but Dynatrace doesn't seem to recognise it.
2017-11-16 12:35 +00:00: {"name":"content/service/repository/v1","hostname":"my.fqdn.host.name","pid":3980,"level":50,"msg":"price Error: insert or update on table \"price\" violates foreign key constraint \"price_id_fkey\"","time":"2017-11-16T12:35:45.799Z","v":0}
Rob
02 Jan 2018 01:15 PM
It should be configurable what kind of date format is accepted or Dynatrace should be more liberal with timestamps. Its really weird such a limitation for this product. We also had to modify our logs so that Dynatrace could recognise the files. However, we can't read eg. our ecom platform logs at all with the current setup. Even if we fixed the timestamps, we would not be able to read the old logs.
30 May 2018 01:35 PM
https://www.dynatrace.com/support/help/infrastructure/log-analytics/what-log-format-does-log-analytics-support/