You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project reduces the original Kadira APM to a single Meteor project.
4
-
Most of the original features are working (like Slack alerts), but there is still a lot of work.
5
-
Feel free to contribute!
3
+
This project reduces the original Kadira APM to a single Meteor project and includes template MUP configuration to let you deploy to any remote server.
6
4
7
-
## Running it
5
+
Most of the original features are working (like Slack alerts), but there is still a lot of work. Feel free to contribute!
8
6
9
-
A mongo replica set is required!
7
+
## Get up and running with MUP
10
8
11
-
```
12
-
cd apm
13
-
meteor npm i
14
-
meteor
15
-
```
9
+
The easiest way to get this server up and running is to use the recommended configuration with [MUP](https://github.com/zodern/meteor-up).
16
10
17
-
This opens the following ports:
11
+
### Setup steps
18
12
19
-
* UI: 3000
20
-
* RMA: 11011
21
-
* API: 7007
13
+
1) Clone this repo and run `meteor npm install`.
22
14
23
-
## Login
15
+
2) Copy [`mup-placeholder.js`](mup-placeholder.js) to `mup.js`. Replace the placeholder entries in the configuration with your configuration.
3) Server configuration steps you need to verify prior to deployment:
27
18
28
-
## Meteor apm settings
29
-
`metricsLifetime` sets the maximum lifetime of the metrics. Old metrics are removed after each aggregation.
30
-
The default value is 604800000 (1000 * 60 * 60 * 24 * 7 ^= 7 days).
19
+
a) This setup was tested using a server with at least 512MB of RAM.
31
20
32
-
```
33
-
"metricsLifetime": 604800000
34
-
```
21
+
b) Allow public access to your server on the following ports: 22, 80, 443, 7007, 11011.
22
+
23
+
c) In order for SSL configuration to succeed, you must set setup your DNS to point to your server IP address prior to deployment. Make sure to point both `apm.YOUR_DOMAIN.com` and `apm-engine.YOUR_DOMAIN.com` to the same server IP address.
35
24
36
-
## Meteor client settings
25
+
4) Run `npm run mup-deploy`.
26
+
27
+
5) Visit your APM UI page at `https://apm.YOUR_DOMAIN.com`. Login with username `[email protected]`, password `admin`. **CHANGE YOUR PASSWORD FROM THIS DEFAULT**.
28
+
29
+
6) In the APM web UI, create a new app and pass the settings to your Meteor app:
30
+
31
+
`settings.json`
37
32
```
38
-
"kadira": {
39
-
"appId": "...",
40
-
"appSecret": "...",
33
+
{
34
+
...
35
+
"kadira": {
36
+
"appId": "YOUR_APM_APP_ID",
37
+
"appSecret": "YOUR_APM_APP_SECRET",
41
38
"options": {
42
-
"endpoint": "http://localhost:11011"
39
+
"endpoint": "https://apm-engine.YOUR_DOMAIN.com"
43
40
}
44
-
},
41
+
},
42
+
}
43
+
```
44
+
45
+
7) Re-deploy your Meteor app, and you should see data populating in your APM UI in seconds.
46
+
47
+
## Server Restarts
48
+
49
+
The custom nginx proxy configuration does not persist through a server restart. There is no current way to hook this into MUP easily, so you will need to run `npx mup deploy` again if you need to restart the server. This should not be a problem with normal operation.
50
+
51
+
## Meteor apm settings
52
+
[`metricsLifetime`](settings.json) sets the maximum lifetime of the metrics. Old metrics are removed after each aggregation. The default value is 604800000 (1000 * 60 * 60 * 24 * 7 ^= 7 days).
53
+
54
+
As a baseline, a current Meteor application with ~500 DAL uses 0.7 GB for 7 days of APM data.
55
+
56
+
## Configuration details:
57
+
58
+
If you want to do custom configuration and server setup, here are items to be aware of:
59
+
60
+
1) A mongo replica set is required. This is set up automatically for you when using the template MUP configuration script.
61
+
62
+
2) If you are not getting APM data and see a [No 'Access-Control-Allow-Origin' header is present](#14) console error in your Meteor app, this is due to incorrect nginx proxy configuration. To confirm the issue, ssh into your server (`npx mup ssh`) and run `docker exec mup-nginx-proxy cat /etc/nginx/conf.d/default.conf`. Look for the upstream block for `apm-engine.YOUR_DOMAIN.com`, the entry should look like
45
63
```
64
+
upstream apm-engine.YOUR_DOMAIN.com {
65
+
# YOUR_APP
66
+
server SOME_IP:11011;
67
+
}
68
+
```
69
+
70
+
If you see port 80 for that setting, the MUP hook that tries to update this port may be failing.
46
71
47
72
## Changes to original Kadira
48
73
@@ -56,4 +81,4 @@ The default value is 604800000 (1000 * 60 * 60 * 24 * 7 ^= 7 days).
56
81
## ToDo
57
82
58
83
* Direct db access of alertsman (apm/server/alertsman/server.js) and remove api (apm/server/api/server.js)
0 commit comments