Trunc is a centralized logging platform designed to streamline log management by consolidating all your system and application logs in one place. To get started, you’ll need to configure your system to send logs to the Trunc platform. This guide will walk you through setting it up on a Windows OS.
Step 1: Install the Trunc Windows Agent
We’ve developed a lightweight agent to collect and send your logs to Trunc. Here’s how to get started:
- Download the Windows agent from your Trunc dashboard. This agent secures your logs using AES-128 encryption with the provided key.
- The installer will automatically download to your
Downloads
folder. The configuration file will be saved in:makefileCopy codeC:\Program Files\Trunc
Tip: The agent pulls your computer’s hostname by default. If your hostname isn’t something easily identifiable, it’s recommended to update it beforehand to make it easier to recognize in the dashboard.
Step 2: Install and Configure the Agent
- Open the Command Prompt as Administrator:
- Not running it as an administrator may cause the installation to fail.
- Navigate to your Downloads folder:shellCopy code
C:\WINDOWS\system32>cd %USERPROFILE%\Downloads
- Verify the downloaded file and run the executable. For example, if you downloaded
trunc-logging-agent-0.1.exe
, run:shellCopy code%USERPROFILE%\Downloads>trunc-logging-agent-0.1.exe -h [ip-issued-in-dash] -P [port-issued-in-dash] -k [key-issued-in-dash] -S
Output:csharpCopy code2022/08/15 10:25:27 DEBUG: On main2() starting... 2022/08/15 10:25:27 DEBUG: On main() starting->argc!=2: 8... 2022/08/15 10:25:27 DEBUG: On main() starting->before getopt...
- Start the Trunc service:shellCopy code
%USERPROFILE%\Downloads>net start TruncSvc
Expected Output:csharpCopy codeThe TRUNC service is starting. The TRUNC service was started successfully.
- Enable the service to start automatically on system reboot:shellCopy code
%USERPROFILE%\Downloads>sc config TruncSvc start= auto
Output:csharpCopy code[SC] ChangeServiceConfig SUCCESS
Step 3: Verify the Installation
- Give it a few minutes, and you should see your computer’s hostname appear in the Trunc dashboard.
How to Remove the Trunc Windows Agent
If you need to uninstall the Trunc agent, you can do so via the command prompt.
- Stop the Trunc service:shellCopy code
%USERPROFILE%\Downloads>net stop TruncSvc
- Delete the service:shellCopy code
%USERPROFILE%\Downloads>sc.exe delete TruncSvc
That’s it! You’ve successfully removed the Trunc Windows agent from your system.