UiPath Studio ─────► Filebeat ─────► Logstash ─────► Elastic ──────► kibana
This gist contains 4 config files for elastic, tested with version 8.2 on Windows.
- elastic.yml: no modifications but prior to publishing I had set
network.host: 127.0.0.1
to a proper IPv4 address - kibana.yml: no modifications
- filebeat.yml: enabled the first input, set output to logstash, uncommented setup.kibana
- logstash.yml: this is the major part of this gist:
- splits the incoming line into time, loglevel, jsonstring
- ingest the jsonstring as json
- removes fields
- resets the @timestamp field to something from the json
Will ingest such lines:
20:07:55.7614 Info {"message":"BlankProcess execution started","level":"Information","logType":"Default","timeStamp":"2022-05-05T20:07:55.7551414+02:00","fingerprint":"5d2143c3-64a2-435b-8d0c-2b9732196f94","windowsIdentity":"WORKGROUP\\user","machineName":"client","fileName":"Main","initiatedBy":"Studio","processName":"BlankProcess","processVersion":"1.0.0","jobId":"473e70dc-d2ee-4009-af9b-22db8f2923f7","robotName":"rob01","machineId":7654321,"organizationUnitId":1234567}
20:07:57.0361 Trace {"message":"Initializing settings...","level":"Trace","logType":"User","timeStamp":"2022-05-05T20:07:57.0361775+02:00","fingerprint":"51090979-56b0-40ec-95b7-b5b4f1368bce","windowsIdentity":"WORKGROUP\\user","machineName":"client","fileName":"InitAllSettings","processName":"BlankProcess","processVersion":"1.0.0","jobId":"473e70dc-d2ee-4009-af9b-22db8f2923f7","robotName":"rob01","machineId":7654321,"organizationUnitId":1234567}
20:07:57.5225 Trace {"message":"[OrchestratorQueueName, ProcessABCQueue]\r\n[OrchestratorQueueFolder, ]\r\n[logF_BusinessProcessName, Framework]\r\n[MaxRetryNumber, 0]\r\n[MaxConsecutiveSystemExceptions, 0]\r\n[ExScreenshotsFolderPath, Exceptions_Screenshots]\r\n[LogMessage_GetTransactionData, Processing Transaction Number: ]\r\n[LogMessage_GetTransactionDataError, Error getting transaction data for Transaction Number: ]\r\n[LogMessage_Success, Transaction Successful.]\r\n[LogMessage_BusinessRuleException, Business rule exception.]\r\n[LogMessage_ApplicationException, System exception.]\r\n[ExceptionMessage_ConsecutiveErrors, The maximum number of consecutive system exceptions was reached. ]\r\n[RetryNumberGetTransactionItem, 2]\r\n[RetryNumberSetTransactionStatus, 2]\r\n[ShouldMarkJobAsFaulted, False]","level":"Trace","logType":"User","timeStamp":"2022-05-05T20:07:57.5225678+02:00","fingerprint":"95905515-1123-4b0c-a05d-bc33ad2b39d3","windowsIdentity":"WORKGROUP\\user","machineName":"client","fileName":"Main","foo":"bar","logVersion":"v4","processName":"BlankProcess","processVersion":"1.0.0","jobId":"473e70dc-d2ee-4009-af9b-22db8f2923f7","robotName":"rob01","machineId":7654321,"organizationUnitId":1234567}
20:07:57.5255 Trace {"message":"[OrchestratorQueueName, ProcessABCQueue]\r\n[OrchestratorQueueFolder, ]\r\n[logF_BusinessProcessName, Framework]\r\n[MaxRetryNumber, 0]\r\n[MaxConsecutiveSystemExceptions, 0]\r\n[ExScreenshotsFolderPath, Exceptions_Screenshots]\r\n[LogMessage_GetTransactionData, Processing Transaction Number: ]\r\n[LogMessage_GetTransactionDataError, Error getting transaction data for Transaction Number: ]\r\n[LogMessage_Success, Transaction Successful.]\r\n[LogMessage_BusinessRuleException, Business rule exception.]\r\n[LogMessage_ApplicationException, System exception.]\r\n[ExceptionMessage_ConsecutiveErrors, The maximum number of consecutive system exceptions was reached. ]\r\n[RetryNumberGetTransactionItem, 2]\r\n[RetryNumberSetTransactionStatus, 2]\r\n[ShouldMarkJobAsFaulted, False]","level":"Trace","logType":"User","timeStamp":"2022-05-05T20:07:57.5255568+02:00","fingerprint":"c6010783-c368-4e31-b50f-8fa7fe06ac71","windowsIdentity":"WORKGROUP\\user","machineName":"client","fileName":"Main","foo":"bar","processName":"BlankProcess","processVersion":"1.0.0","jobId":"473e70dc-d2ee-4009-af9b-22db8f2923f7","robotName":"rob01","machineId":7654321,"organizationUnitId":1234567}
20:07:57.5255 Info {"message":"BlankProcess execution ended","level":"Information","logType":"Default","timeStamp":"2022-05-05T20:07:57.5280823+02:00","fingerprint":"ccea9910-f398-4cfb-b4aa-4205bff7a6ba","windowsIdentity":"WORKGROUP\\user","machineName":"client","fileName":"Main","totalExecutionTimeInSeconds":1,"totalExecutionTime":"00:00:01","foo":"bar","processName":"BlankProcess","processVersion":"1.0.0","jobId":"473e70dc-d2ee-4009-af9b-22db8f2923f7","robotName":"rob01","machineId":7654321,"organizationUnitId":1234567}
Download for Windows (no installation, no Admin permissions needed)
- Elastic: https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.2.0-windows-x86_64.zip
- Logstash: https://artifacts.elastic.co/downloads/logstash/logstash-8.2.0-windows-x86_64.zip
- Kibana: https://artifacts.elastic.co/downloads/kibana/kibana-8.2.0-windows-x86_64.zip
- Filebeat: https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.2.0-windows-x86_64.zip
Extract and run in 4 PowerShell windows:
.\bin\elasticsearch.bat
.\bin\logstash.bat -f .\config\logstash.conf
.\filebeat.exe -e -c .\filebeat.yml
.\bin\kibana.bat```