How to integrate OS logs with external, centralized logs?

Hey all,

for an upcoming project we are going to support another team that has been building a larger application.

They use ELK stack for centralized logging of all their component applications, thus we need to integrate the logs generated by OutSystems with the existing logs. How would we go about that? Is there an OS API we can use? Do we have to manually export the logs from ServiceCenter?

The question is not as much about how to deliver the logging data to the external tool but more about how to get the logging data in the first place. My search is coming up empty so far, but I hope I just haven't been looking in the right corner yet.

Best regards,
Michael

Hi Michael,

OutSystems has "Asynchronous Logging API" that provides few actions to perform on Database. Possibly you can create an API to trigger it with every event of LogError and LogRecord to post it to external service which is responsible to expose to centralized logging system.

Hi Michael,

Some of the Entities used in Service Center are exposed to you in the System references (like Sent_Email, with the details for emails sent by the platform), but not errors. They live in the OSLOG Entities, and they're a set of tables that get cycled on a weekly basis.

There's a good explanation of the Outsystems data model and the Entities you can dig into for the data you're looking for here:

https://itnext.io/outsystems-server-side-data-model-almost-everything-to-know-11a03590b99

Solution

Afonso Carvalho wrote:

Hi Michael,

Some of the Entities used in Service Center are exposed to you in the System references (like Sent_Email, with the details for emails sent by the platform), but not errors. They live in the OSLOG Entities, and they're a set of tables that get cycled on a weekly basis.

There's a good explanation of the Outsystems data model and the Entities you can dig into for the data you're looking for here:

https://itnext.io/outsystems-server-side-data-model-almost-everything-to-know-11a03590b99

Hi Afonso,

one of the links in that article led me to the right place: https://success.outsystems.com/Support/Enterprise_Customers/Upgrading/Keep_OutSystems_log_data_in_a_separate_database

From there, it was easy enough to find the right extension to add as a dependency

image2019-7-2_8-55-19.png

Now we can read the platform logs, collate them and expose them via REST API to the central logging service. Thank you!

Best regards,
Michael Segbers

Solution

I was unaware of that extension, and was assuming you'd have to process those Entities yourself through a Timer or another mechanism. Very useful to anyone already using OS11.