appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
32.45k stars 3.51k forks source link

[Feature]: Download audit logs using cron job #30448

Open sujdev7 opened 6 months ago

sujdev7 commented 6 months ago

Is there an existing issue for this?

Summary

There should be a way to download audit logs using a cron job. The downloaded data can be used as a datasource to create usage analytics dashboards, which can show trends like # of users, # of users by apps, adoption of apps over time and more. It will also help enterprises split their Appsmith bill among their different departments

Why should this be worked on?

Analytics on Appsmith usage has been a long requested feature, but it would be hard to build a one-size fits all. This functionality will help businesses track and eventually, maximize adoption of their apps

mdani-sg commented 4 months ago

We need a way to integrate audit logs to our operational tooling. It does not have to be a cron job, we just need the audit log in a file that can be tailed, consumed by ELT tools such as fluentd.

Nikhil-Nandagopal commented 4 months ago

@mdani-sg you should be able to connect to the mongoDB running in your appsmith instance and simply pull it from there. You can also download the audit log file manually using the export option in the audit logs page

mdani-sg commented 3 months ago

@Nikhil-Nandagopal can you please give us an example of Mongo query?

ssichynskyi commented 1 month ago

@Nikhil-Nandagopal could you provide an example? Better even to have an article on how to pull out logs from the DB.

yalhyane commented 1 month ago

@Nikhil-Nandagopal is it possible to achieve this using the new workflow feature? If so, could you please point to some documentation on how to use it?

infinitetrooper commented 1 month ago

@yalhyane - Please share your license email to workflows@appsmith.com so we can enable workflows for you once it's out for beta. Thank You.

yalhyane commented 1 month ago

@infinitetrooper thank you for the info, I'll provide the license email later. My current concern is whether it's possible to access audit logs from workflows?

infinitetrooper commented 1 month ago

@yalhyane - Yes, you can connect the Mongo DB of your instance as a datasource in Appsmith and build workflow/apps on top of it to fetch the data you need.

yalhyane commented 1 month ago

@infinitetrooper I can go with that, thank you. Could you please let me know when workflows will be available for use?

infinitetrooper commented 1 month ago

We're starting onboarding this month, please drop an email to workflows@appsmith.com and I'll add you to the list.