From bc037f7e9971b802c175a39c2f14c6b97672b30f Mon Sep 17 00:00:00 2001 From: lukebarrett24 Date: Tue, 28 May 2024 13:35:22 -0700 Subject: [PATCH 1/4] Linux Internal Metrics Update --- agent-installation/linux.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/agent-installation/linux.mdx b/agent-installation/linux.mdx index 5e23099..0ad4fb7 100644 --- a/agent-installation/linux.mdx +++ b/agent-installation/linux.mdx @@ -37,13 +37,15 @@ Log in to Middleware, navigate to the Installation Page in the bottom left corne Copy the appropriate installation command based on your machine’s operating system. Copying the command directly from the Installation page ensures your API key and UID are inserted accurately. + To change the MW Agent internal metrics port, use the `MW_AGENT_INTERNAL_METRICS_PORT` environment variable. The port defaults to `8888`. + `DEB`: Compatible with Debian or Debian-based operating systems. For AWS instances this includes Ubuntu and Debian. ```bash Shell - MW_API_KEY= MW_TARGET=https://.middleware.io:443 bash -c "$(curl -L https://install.middleware.io/scripts/deb-install.sh)" + MW_AGENT_INTERNAL_METRICS_PORT=8888 MW_API_KEY= MW_TARGET=https://.middleware.io:443 bash -c "$(curl -L https://install.middleware.io/scripts/deb-install.sh)" ``` @@ -52,7 +54,7 @@ Copy the appropriate installation command based on your machine’s operating sy `RPM`: Compatible with Red Hat Package Manager and operating systems like Red Hat or CentOS. Use this for AWS instances using Amazon Linux. ```bash Shell - MW_API_KEY=xxxxxxxxxx MW_TARGET=https://.middleware.io:443 bash -c "$(curl https://install.middleware.io/scripts/rpm-install.sh)" + MW_AGENT_INTERNAL_METRICS_PORT=8888 MW_API_KEY=xxxxxxxxxx MW_TARGET=https://.middleware.io:443 bash -c "$(curl https://install.middleware.io/scripts/rpm-install.sh)" ``` From a47544a32255f0f8601afff633f1d82be45afde2 Mon Sep 17 00:00:00 2001 From: lukebarrett24 Date: Tue, 28 May 2024 13:57:37 -0700 Subject: [PATCH 2/4] adding install steps to step 3 instead of step 2 --- agent-installation/linux.mdx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/agent-installation/linux.mdx b/agent-installation/linux.mdx index 0ad4fb7..51f2a92 100644 --- a/agent-installation/linux.mdx +++ b/agent-installation/linux.mdx @@ -37,15 +37,13 @@ Log in to Middleware, navigate to the Installation Page in the bottom left corne Copy the appropriate installation command based on your machine’s operating system. Copying the command directly from the Installation page ensures your API key and UID are inserted accurately. - To change the MW Agent internal metrics port, use the `MW_AGENT_INTERNAL_METRICS_PORT` environment variable. The port defaults to `8888`. - `DEB`: Compatible with Debian or Debian-based operating systems. For AWS instances this includes Ubuntu and Debian. ```bash Shell - MW_AGENT_INTERNAL_METRICS_PORT=8888 MW_API_KEY= MW_TARGET=https://.middleware.io:443 bash -c "$(curl -L https://install.middleware.io/scripts/deb-install.sh)" + MW_API_KEY= MW_TARGET=https://.middleware.io:443 bash -c "$(curl -L https://install.middleware.io/scripts/deb-install.sh)" ``` @@ -54,13 +52,23 @@ Copy the appropriate installation command based on your machine’s operating sy `RPM`: Compatible with Red Hat Package Manager and operating systems like Red Hat or CentOS. Use this for AWS instances using Amazon Linux. ```bash Shell - MW_AGENT_INTERNAL_METRICS_PORT=8888 MW_API_KEY=xxxxxxxxxx MW_TARGET=https://.middleware.io:443 bash -c "$(curl https://install.middleware.io/scripts/rpm-install.sh)" + MW_API_KEY=xxxxxxxxxx MW_TARGET=https://.middleware.io:443 bash -c "$(curl https://install.middleware.io/scripts/rpm-install.sh)" ``` -### Step 3: Add Host Tags [Optional] +### Step 3: Optional Configurations + +#### Add MW Agent Internal Metrics + +To change the MW Agent internal metrics port, use the `MW_AGENT_INTERNAL_METRICS_PORT` environment variable. Use the following example by replacing the port number (which is by default set to `8888`): + +```bash Shell +MW_AGENT_INTERNAL_METRICS_PORT=8888 MW_API_KEY=upnycrphsnoeliwoiyzpnmkqxfihohbbkuth MW_TARGET=https://xejkc_mdt.middleware.io:443 bash -c "$(curl -L https://install.middleware.io/scripts/rpm-install.sh)" +``` + +#### Add Host Tags Create filterable custom tags by adding the `MW_HOST_TAGS` environment variable to the installation command as comma-separated key-value pairs. Use the tag `name` to create an alias for the host (e.g. production). Check your host tags have been embedded by navigating to __Infrastructure__ -> __Your Desired Host__ -> __System Information__ From e4c67a5dc5ff8083bcd9315d3da1d10a018102dc Mon Sep 17 00:00:00 2001 From: lukebarrett24 Date: Tue, 28 May 2024 15:25:47 -0700 Subject: [PATCH 3/4] adding more flags --- agent-installation/linux.mdx | 60 +++++++++++++++++++++++++++++++----- 1 file changed, 53 insertions(+), 7 deletions(-) diff --git a/agent-installation/linux.mdx b/agent-installation/linux.mdx index 51f2a92..3b491ca 100644 --- a/agent-installation/linux.mdx +++ b/agent-installation/linux.mdx @@ -59,17 +59,48 @@ Copy the appropriate installation command based on your machine’s operating sy ### Step 3: Optional Configurations -#### Add MW Agent Internal Metrics +The following flags are optional modifications you can make to the MW Linux Agent. Add any of these flags to the beginning of one of the above install commands. -To change the MW Agent internal metrics port, use the `MW_AGENT_INTERNAL_METRICS_PORT` environment variable. Use the following example by replacing the port number (which is by default set to `8888`): + For more information on configuring your MW Linux Agent, navigate to the [mw_agent](https://github.com/middleware-labs/mw-agent/blob/master/cmd/host-agent/main.go#L63) repository. -```bash Shell -MW_AGENT_INTERNAL_METRICS_PORT=8888 MW_API_KEY=upnycrphsnoeliwoiyzpnmkqxfihohbbkuth MW_TARGET=https://xejkc_mdt.middleware.io:443 bash -c "$(curl -L https://install.middleware.io/scripts/rpm-install.sh)" -``` +#### `MW_CONFIG_CHECK_INTERVAL` + +This is a duration string to periodically check for OpenTelemetry collector configuration updates. This configuration is only useful if `MW_FETCH_ACCOUNT_OTEL_CONFIG` is set to `true`. + +#### `MW_FETCH_ACCOUNT_OTEL_CONFIG` + +The MW Linux Agent fetches the OpenTelemetry collector configuration from Middleware's backend. Setting `MW_FETCH_ACCOUNT_OTEL_CONFIG` to false will disable this fetching process. Users will have to provide their own OpenTelemetry collector configuration in an appropriate location (either at the default location or at the location set by `MW_OTEL_CONFIG_FILE` environment variable). + +#### `MW_FLUENT_PORT` + +The MW Agent has a built in Fluentd receiver. This value allows you to change the listener port for Fluentd. + +#### `MW_LOGFILE` + +This allows you to specify the location of your logfile that stores MW Agent logs instead of logging them to the Systemd log journal. + +#### `MW_LOGFILE_SIZE` + +Log file size in Megabytes to store MW Agent logs. This flag only applies if logfile flag is specified. + +#### `MW_AGENT_FEATURES_INFRA_MONITORING` + +Infrastructure monitoring is enabled by default in MW Agent. Setting `MW_AGENT_FEATURES_INFRA_MONITORING` to false will disable infrastructure monitoring on the host. + +#### `MW_CONFIG_FILE` +This allows you to specify the location of the configuration file for MW Agent. -#### Add Host Tags -Create filterable custom tags by adding the `MW_HOST_TAGS` environment variable to the installation command as comma-separated key-value pairs. Use the tag `name` to create an alias for the host (e.g. production). +#### `MW_OTEL_CONFIG_FILE` + +This allows you to specify the location of the OpenTelemetry collector configuration file. + +#### `MW_AGENT_INTERNAL_METRICS_PORT` + +This changes the location of the MW Agent internal metrics port. The default port is set to `8888`. + +#### `MW_HOST_TAGS` +This allows you to create filterable custom tags as comma-separated key-value pairs. Use the tag `name` to create an alias for the host (e.g. production). Check your host tags have been embedded by navigating to __Infrastructure__ -> __Your Desired Host__ -> __System Information__ @@ -77,6 +108,21 @@ Create filterable custom tags by adding the `MW_HOST_TAGS` environment variable MW_HOST_TAGS=key1:value1,key2:value2,... MW_API_KEY=... ``` +#### `MW_DOCKER_ENDPOINT` + +This flag allows you to set the endpoint for your Docker socket if it is different from the default socket. + +#### `MW_AGENT_SELF_PROFILING` + +This flag is for profiling the MW Agent itself. + +#### `MW_PROFILING_SERVER_URL` + +This flag allows you to specifiy the Server Address for redirecting your profiling data. + + + + ### Step 4: Verify Installation Run the following command to verify the status of the Infra Agent: From 393c6a164e28c5c2fff0a705040a9764ee61cb0d Mon Sep 17 00:00:00 2001 From: lukebarrett24 Date: Tue, 28 May 2024 16:31:45 -0700 Subject: [PATCH 4/4] tejas updates --- agent-installation/linux.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/agent-installation/linux.mdx b/agent-installation/linux.mdx index 3b491ca..1edd66f 100644 --- a/agent-installation/linux.mdx +++ b/agent-installation/linux.mdx @@ -114,15 +114,13 @@ This flag allows you to set the endpoint for your Docker socket if it is differe #### `MW_AGENT_SELF_PROFILING` -This flag is for profiling the MW Agent itself. +This flag is for running continuous profiling on the MW Agent itself. #### `MW_PROFILING_SERVER_URL` This flag allows you to specifiy the Server Address for redirecting your profiling data. - - ### Step 4: Verify Installation Run the following command to verify the status of the Infra Agent: