Skip to content

updated log info for ECG #10906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ To install ECG on Windows and track user session, please follow the steps below.
3. Download and unzip the latest ECG release:

```
Invoke-WebRequest -Uri "https://lightwing-downloads-temp.s3.ap-south-1.amazonaws.com/ecg/harness_autostop_ecg_windows_amd64.zip" -OutFile "./Downloads\harness_autostop_ecg_windows_amd64.zip"
Invoke-WebRequest -Uri "https://lightwing-downloads-temp.s3.ap-south-1.amazonaws.com/ecg/harness_autostop_ecg_windows_amd64_v1.0.2.zip" -OutFile "./Downloads\harness_autostop_ecg_windows_amd64.zip"

Expand-Archive -Path "./Downloads\harness_autostop_ecg_windows_amd64.zip" -DestinationPath "./Downloads\harness_autostop_ecg_windows_amd64"
cd ecg_1.2.0_linux_amd64
Expand All @@ -152,31 +152,45 @@ cd ecg_1.2.0_linux_amd64

```
mkdir C:\Users\Administrator\harness
mv .\Downloads\harness_autostop_ecg_windows_amd64\harness_autostop_ecg_windows_amd64 C:\Users\Administrator\harness\harness_autostop_ecg_windows_amd64.exe
```

5. Configure the ECG by setting global environment variables on the machine:

```
setx ECG_accountID "{account_id}" /M
setx ECG_apiURL "https://app.harness.io/gateway/lw/api" /M
setx ECG_ruleHostName "{host_name}" /M
setx ECG_user_session_watch "true" /M
```

Where you should replace `{account_id}` with your Harness account id, and `{host_name}` with the hostname of your autostopping rule (without the `http://`)
mv .\Downloads\harness_autostop_ecg_windows_amd64\harness_autostop_ecg_windows_amd64.exe C:\Users\Administrator\harness\harness_autostop_ecg_windows_amd64.exe
```

5. Set the environment variables at the system level needed for ECG:

```cmd
# Replace {host_name} with Autostopping rule host name (remove "https://" from the hostname)
setx ECG_ruleHostName "{host_name}" /M

# Replace "{account_id}" with Harness Account ID
setx ECG_accountID "{account_id}" /M

setx ECG_apiURL "https://app.harness.io/gateway/lw/api" /M
setx ECG_user_session_watch "true" /M

# For explicitly specifying the log location (optional)
setx ECG_logs_location "C:\Users\Administrator\harness\logs\ecg.log" /M
```

![](./static/configure-ecg-for-auto-stopping-rules-00.png)

:::note
If you use a non-standard Harness URL, you can change the `apiURL` accordingly.
:::

6. Install ECG as a Windows service:

a. Navigate into the folder where you placed the executable:

```cmd
cd C:\Users\Administrator\harness
```

b. Install the ECG service:

```cmd
.\harness_autostop_ecg_windows_amd64.exe install
```

![](./static/configure-ecg-for-auto-stopping-rules-00.png)

If you use a non-standard Harness URL, you can change the `apiURL` accordingly.

6. Finally install the ECG as a Windows service and start it

```
cd C:\Users\Administrator\harness
./harness_autostop_ecg_windows_amd64.exe install
Start-Service Harness-ecg
```

## Validation

Expand Down