MongoDB agent
Prerequisites
- For prerequisite checks for agent installation, see Prerequisite checks for agent installation.
- URL/IP of the SixthSense collector (your tenant URL, which will be provided by Customer Support).
- Access token from the SixthSense portal. For accessing the token, see Accessing your Access Token under Getting started with the Observability Portal.
- MongoDB agent version "latest".
- Package token to download agent (provided by the onboarding team).
- For information about supported agent versions and framework, see Supported agents.
Downloading the agent version 4.4.0 (latest)
For Windows and Linux based servers, use the following link.
Configuring the MongoDB agent
Create a config.yaml file in the same directory.
sixthsense-mongodb-agent can be configured via yaml or environment variables. Following is the yaml file for configuring.
note
Environment variables are given higher priority over yaml file
Use the following command to start Log operation for storing slow queries in “system.profile” with threshold time 0 =>
System.Profile:
The system.profile collection is used to log detailed information about database operations, including their execution time, query patterns, and resource usage. It is primarily used for performance monitoring and debugging.
Profiling Levels:
MongoDB provides three profiling levels that determine what kind of operations are logged in the system.profile collection: 0 (Off): Profiling is disabled (default setting). No operations are logged. 1 (Slow Operations): Only operations that take longer than a specified threshold (in milliseconds) are logged. The threshold is set using the slowms parameter. 2 (All Operations): All operations are logged, regardless of their execution time.
Running the agent
For Linux:
Use the following command to run the agent.
Checking the Checksum of Build
- Create sha256 on windows agent shasum -a 256 meter-agent.zip
Result: "a681f82afc748e87638189389d59249880faffd31c962543855ebaddff60d38b meter-agent.zip"
- Add into file to compare later echo "a681f82afc748e87638189389d59249880faffd31c962543855ebaddff60d38b meter-agent.zip" > meter-agent.zip.sha256
Result: file will be added meter-agent.zip.sha256
- Match agent file checksum shasum -a 256 -c meter-agent.zip.sha256
Result: meter-agent.zip: OK
For Windows:
Extract meter-agent.zip file and edit the configuration in the yaml file with cluster information.
Open the command prompt with run as Administrator and enter the following command:
nssm.exe install “Service_Name”
In the NSSM service installer screen, the Application tab is selected by default.
Enter the following details:
- Path: meter-agent.exe full path
- Startup directory: folder path
- Arguments: yaml full name
- Click the Details tab.
- Enter the following details:
- Display name: service display name
- Description: service description
- Setup type: select type for setup such as automatic.
- Click the Log on tab.
- Select Local System account radio button.
- Select Allow service to interact with desktop check box.
- Click Install service.