Skip to content

Commit 3205bb7

Browse files
authored
fix: Monitor App Usage (#2905)
## Description Provide a concise summary of the changes made in this pull request - ## Pull request type Check the appropriate box: - [ ] Review Fixes - [ ] Documentation Overhaul - [ ] Feature/Story - Link one or more Engineering Tickets * - [ ] A-Force - [ ] Error in documentation - [ ] Maintenance ## Documentation tickets Link to one or more documentation tickets: - ## Checklist From the below options, select the ones that are applicable: - [ ] Checked for Grammarly suggestions. - [ ] Adhered to the writing checklist. - [ ] Adhered to the media checklist. - [ ] Verified and updated cross-references or added redirect rules. - [ ] Tested the redirect rules on deploy preview. - [ ] Validated the modifications made to the content on the deploy preview. - [ ] Validated the CSS modifications on different screen sizes.
1 parent c563f1c commit 3205bb7

File tree

3 files changed

+46
-55
lines changed

3 files changed

+46
-55
lines changed

website/docs/build-apps/how-to-guides/export-audit-logs.md

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This guide shows you how to export audit logs, which allows you to share system
88

99
## Prerequisites
1010

11-
- Self-hosted Appsmith instance with access to [Admin settings](/getting-started/setup/instance-configuration#admin-settings).
11+
- Appsmith instance with access to [Admin setting](/getting-started/setup/instance-configuration/admin-settings).
1212
- Access to the MongoDB URI, either embedded with Appsmith or external.
1313

1414

@@ -17,51 +17,45 @@ This guide shows you how to export audit logs, which allows you to share system
1717
Follow these steps to connect your MongoDB to fetch audit logs:
1818

1919

20-
<dd>
21-
22-
23-
<div style={{ position: "relative", paddingBottom: "calc(50.52% + 41px)", height: 0, width: "100%" }}>
24-
<iframe
25-
src="https://demo.arcade.software/VORqZSvYo0RPYVSq46Li?embed"
26-
frameBorder="0"
27-
loading="lazy"
28-
webkitAllowFullScreen
29-
mozAllowFullScreen
30-
allowFullScreen
31-
allow="fullscreen"
32-
style={{ position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }}
33-
title="Appsmith | Connect Data"
34-
/>
35-
</div>
36-
37-
3820

39-
</dd>
40-
41-
42-
1. In Appsmith, open the **Admin settings** page from the top-right corner.
4321

44-
2. Open the Advanced tab, and copy the **MongoDB URI**. If the URI is not available, open the environment variable file (`docker.env` for Docker or `values.yaml` for Kubernetes) and copy the `APPSMITH_DB_URL`. The URI looks like:
22+
1. Open the **Admin Settings**, click the settings icon in the top-right corner of your workspace. If the icon is not visible, ensure you are signed in with an administrator account.
4523

24+
2. In **Admin Settings**, go to the **Configuration** section and copy the value of `APPSMITH_DB_URL`.
4625

26+
<dd>
4727

28+
If the URI is not visible, open your environment file (`docker.env` for Docker or `values.yaml` for Kubernetes) and copy the value of `APPSMITH_DB_URL`.
4829

49-
<dd>
5030

5131
```js
5232
mongodb://appsmith:Oabc123@localhost:27017/appsmith
5333
```
5434

35+
<ZoomImage
36+
src="/img/mongo-db-new-settings.png"
37+
alt=""
38+
caption=""
39+
/>
5540

5641
</dd>
5742

5843

59-
2. Create a new MongoDB datasource using the MongoDB URI:
44+
3. Open your Appsmith application and navigate to the **Datasource** section. Click **+ Create New** and select **MongoDB**.
45+
6046

6147
<dd>
6248

6349
- For external MongoDB, use the provided URI or configure it according to your MongoDB setup.
6450

51+
<dd>
52+
53+
```js
54+
mongodb+srv://username:[email protected]/appsmith
55+
```
56+
57+
</dd>
58+
6559
- For embedded MongoDB (internal), append `?authsource=appsmith` to the end of the URI, like this:
6660

6761
<dd>
@@ -77,7 +71,6 @@ For more information on how to configure the MongoDB datasource, see [MongoDB](/
7771

7872
</dd>
7973

80-
8174
## Process and format logs
8275

8376
Follow these steps to fetch audit logs and format the data into a format suitable for monitoring tools:
@@ -89,7 +82,7 @@ Follow these steps to fetch audit logs and format the data into a format suitabl
8982

9083
<dd>
9184

92-
*Example -* To fetch the raw logs displaying detailed application usage information, follow these steps:
85+
*Example:* To fetch the raw logs displaying detailed application usage information, follow these steps:
9386

9487

9588
- Set the **Command** to `Find documents(s)`, the **Collection** to `auditlog`, and configure the query like this:

website/docs/build-apps/how-to-guides/usage-app.md

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This page shows how to build an Appsmith app to monitor other Appsmith applicati
77

88
## Prerequisites
99

10-
- Appsmith instance with access to [Admin setting](/getting-started/setup/instance-configuration#admin-settings).
10+
- Appsmith instance with access to [Admin setting](/getting-started/setup/instance-configuration/admin-settings).
1111
- Access to the MongoDB URI, either embedded with Appsmith or external.
1212

1313

@@ -16,48 +16,45 @@ This page shows how to build an Appsmith app to monitor other Appsmith applicati
1616
Follow these steps to connect your MongoDB and create queries to fetch usage data:
1717

1818

19-
<dd>
20-
21-
<div style={{ position: "relative", paddingBottom: "calc(50.52% + 41px)", height: 0, width: "100%" }}>
22-
<iframe
23-
src="https://demo.arcade.software/VORqZSvYo0RPYVSq46Li?embed"
24-
frameBorder="0"
25-
loading="lazy"
26-
webkitAllowFullScreen
27-
mozAllowFullScreen
28-
allowFullScreen
29-
allow="fullscreen"
30-
style={{ position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }}
31-
title="Appsmith | Connect Data"
32-
/>
33-
</div>
34-
35-
</dd>
36-
37-
38-
1. In Appsmith, open the **Admin settings** page from the top-right corner.
19+
1. Open the **Admin Settings**, click the settings icon in the top-right corner of your workspace. If the icon is not visible, ensure you are signed in with an administrator account.
3920

40-
2. Open the Advanced tab, and copy the **MongoDB URI**. If the URI is not available, open the environment variable file (`docker.env` for Docker or `values.yaml` for Kubernetes) and copy the `APPSMITH_DB_URL`. The URI looks like:
4121

22+
2. In **Admin Settings**, go to the **Configuration** section and copy the value of `APPSMITH_DB_URL`.
4223

24+
<dd>
4325

26+
If the URI is not visible, open your environment file (`docker.env` for Docker or `values.yaml` for Kubernetes) and copy the value of `APPSMITH_DB_URL`.
4427

45-
<dd>
4628

4729
```js
4830
mongodb://appsmith:Oabc123@localhost:27017/appsmith
4931
```
5032

33+
<ZoomImage
34+
src="/img/mongo-db-new-settings.png"
35+
alt=""
36+
caption=""
37+
/>
38+
5139

5240
</dd>
5341

5442

55-
2. Create a new MongoDB datasource using the MongoDB URI:
43+
3. Open your Appsmith application and navigate to the **Datasource** section. Click **+ Create New** and select **MongoDB**.
44+
5645

5746
<dd>
5847

5948
- For external MongoDB, use the provided URI or configure it according to your MongoDB setup.
6049

50+
<dd>
51+
52+
```js
53+
mongodb+srv://username:[email protected]/appsmith
54+
```
55+
56+
</dd>
57+
6158
- For embedded MongoDB (internal), append `?authsource=appsmith` to the end of the URI, like this:
6259

6360
<dd>
@@ -73,11 +70,12 @@ For more information on how to configure the MongoDB datasource, see [MongoDB](/
7370

7471
</dd>
7572

76-
3. Create a new query to fetch logs from the `auditlog` **Collection** and configure the parameters as needed.
77-
73+
4. Create a new query using the connected MongoDB datasource. Select the `auditlog` collection to retrieve event data from your Appsmith instance.
7874

7975
<dd>
8076

77+
You can configure the query using filters to track specific types of activity such as:
78+
8179
- For application lifecycle events, use ` application.created`, `application.updated`, `application.deleted`, and `application.deployed` to track when applications are created, modified, deleted, or deployed.
8280

8381
- To keep track of user actions, use `user.logged_in`, `user.logged_out`, and `user.signed_up` to log user sign-ins, sign-outs, and new user registrations.
@@ -134,7 +132,7 @@ For more information on how logs are stored, see [Log contents](/advanced-concep
134132
</dd>
135133

136134

137-
4. Drag a Chart widget and set its **Series Data** property to display the data, like:
135+
5. Drag a Chart widget and set its **Series Data** property to display the data, like:
138136

139137
<dd>
140138

261 KB
Loading

0 commit comments

Comments
 (0)