Identify log lines of same request


#1

Hi All,

Assuming there are multiple concurrent provisioning requests through MIQ, how can we identify in automation.log the log lines that belong to the same request?

Or what changes to make so that lines of the same request get tagged in a unique way (so that they can be easily grep-ed)?

BR
Theo


#2

Or what changes to make so that lines of the same request get tagged in a unique way

@tkonto It’s already so…

[----] I, [2019-01-14T16:08:40.560319 #15136:2ae00992f5b8]  INFO -- : Started GET "/api" f
or ::1 at 2019-01-14 16:08:40 +0000

If you see that 15136:2ae00992f5b8 , that’s the process id, colon and a per-request hash.


#3

Hi @himdel,

Thank you for the answer.

Typically what you say is correct.

Actually it is not using unique numbering all the way to the end of the same provisioning:

For example (log extract of a single provisioning):

[----] I, [2019-01-14T17:16:51.364265 #982:641108] INFO – : Q-task_id([miq_provision_24000000000830]) <AEMethod [/Ext_API/Integration/ServiceNow/CMDB/get_hostname]> Starting
[----] I, [2019-01-14T17:16:52.270343 #982:6d79848] INFO – : ----- Get ServiceNow Hostname Record ----- - uri => https://se-qa-api…net/servicenow/rest/api/vocr/serverhost

And it goes like that (number changes) every time a new state is reached during the provisioning workflow.

So multiply that by 3 or 4 concurrent provisioning requests, one can not follow the stream of a specific request as the numbering changes.

BR
Theo


#4

Aah, sorry, you were talking about provisioning requests, not http requests.

What I said is true for http requests, but anything the goes via the queues or automate … I don’t know.