Installing agents

Installing agents for Linux - Version 4.0.0 (Latest)

Prerequisites

  • For prerequisite checks for agent installation, see Prerequisite checks for agent installation.
  • OS: Ubuntu, Debian, RHEL, CentOS, RockeyLinux. See Supported OS Versions
  • SixthSense Infra Agent. See Installing the Agent.
  • URL/IP of the Sixthsense collector (your tenant URL provided by Customer Support)
  • Access token provided by Customer Support.
  • PACKAGE_TOKEN - Access Token required for downloading SixthSense Package provided by Customer Support.
  • PACKAGE_TOKEN_USERNAME - Username for Access Token provided by Customer Support.
  • TOKEN - Access Token from the SixthSense portal Settings page.
  • For supported agent versions and framework, see VM agents.

Download & Unzip the agent

  1. Download latest ss_infra_agent-4.0.0-linux.zip release binary provided by Customer Support.
export PACKAGE_TOKEN="token"
export AGENT_VERSION="4.0.0"
curl --header "PRIVATE-TOKEN:${PACKAGE_TOKEN}" --output ss_infra_agent_${AGENT_VERSION}-linux.zip "https://artifacts-observability.sixthsense.rakuten.com/api/v4/projects/15/packages/generic/sixthsense-infra-agent/${AGENT_VERSION}/ss_infra_agent_${AGENT_VERSION}-linux.zip"
  1. Unzip release binary and go to the agent directory.
unzip ss_infra_agent_${AGENT_VERSION}-linux.zip
cd ss_infra_agent_${AGENT_VERSION}-linux
  1. Copy the agent binary and ss_config.yaml to the following directory
  • /usr/local/bin
  1. Give permission to the binary, configuration file for all.
  • sudo chmod +x /usr/local/bin/ss_infra_agent_4.0.0-linux/ss_infra_agent_linux-{arch} # See Supported Architecture
  • sudo chmod +x /usr/local/bin/ss_infra_agent_4.0.0-linux/ss-config.yaml

Configure the agent

Update ss_config.yaml as per the instructions mentioned in the configuration file.

# sixthsense-infra-agent can be configured via yaml
global_settings:
# A service name groups together all machines that run the same service.
service_name: <CentOS_VM>
# To establish communication between the Infrastructure Agent and the SixthSense backend, authentication is performed using an access token. Login to Sixthsense UI --> On Side Navigation bar Go to Settings --> Copy Access Token.
authentication: <xxxxxx>
# The endpoint of the backend that collects and processes telemetry data from agents.
sixthsense_backend: grpc-collector-observability.sixthsense.rakuten.com:443
# Enables TLS encryption for secure communication with the backend. Allowed values: true|false.
secure: true
# Specifies the logging level for the agent. This helps control the amount of diagnostic data written to logs. Allowed values: debug|error|info.
logLevel: info
# Specifies the directory or file path where logs are stored.
logPath: <vm_agent.log>
# Sets the maximum number of processes the agent will monitor concurrently.
maxProcessLimit: 10
# Port for pprof profiling of agent.(Optional)
# pprofPort: 6060
# Sets the memory usage cap (in MB) for the agent to prevent overconsumption of system resources.(Optional)
# maxMemoryUsageLimit: 1024 # MB
# Sets how often performance data is collected and reported by the agent in seconds.(Optional)
# perfInterval: 60 # seconds

Add the agent as a Service

  1. Create a service file in /etc/systemd/system directory using the following command.
  • cd /etc/systemd/system
  • sudo vi ss_infra_agent.service
  1. Add the following contents to the file (s_infra_agent.service):
[Unit]
Description=Sixthsense Infra Agent
After=network.target
[Service]
Type=simple
# Environment="HTTPS_PROXY=proxy-server:port"
ExecStart=<agent_binary_file_path> #/usr/local/bin/ss_infra_agent_4.0.0-linux/ss_infra_agent_linux_{arch}
Restart=always
WorkingDirectory=<agent_directory> #/usr/local/bin/ss_infra_agent_4.0.0-linux
RestartSec=10
[Install]
WantedBy=multi-user.target
  • Note: Environment="HTTPS_PROXY=proxy-server:port" should be set only when network restrictions are in place. The values for proxy-server and port must be provided by the client or installer.
  1. Save and close the file.
  • If your service requires network connectivity, remove the After=network.target line.
  • Set Type=simple if your command doesn't fork into background or set Type=forking if it forks.
  • Set Restart=always to make sure the service is restarted automatically if it fails or stops.
  • Set RestartSec to specify the time between restart attempts.

Start the agent

Start the agent as Service using Systemd

  1. Reload the systemd daemon to read the new service file:
sudo systemctl daemon-reload
  1. Enable the service to start automatically on boot:
sudo systemctl enable ss_infra_agent.service
  1. Start the agent service:
sudo systemctl start ss_infra_agent.service
  1. Check the service status to ensure that it is running:
sudo systemctl status ss_infra_agent.service
  • Note: The VM Agent starts automatically on boot and will be restarted automatically if it crashes or stops unexpectedly.

Start the agent directly using nohup

To start the agent, use the following command.

nohup ./ss_infra_agent_service &

In case of network restrictions, append proxy to the nohup command to enable connection to sixthsense-backend.

nohup HTTPS_PROXY=proxy-server:port ./ss_infra_agent_service &
  • nohup - to start with logs, logs will be stored in nohup.out file
  • "&" - to start as background process

Check the logs

journalctl -u processname -n 100

Logs Directory

<agent_directory>/logs
Default:/usr/local/bin/ss_infra_agent_4.0.0-linux/logs

Verify that agent is reporting to Sixthsense : Validate Agent Reporting

Stop the agent

Stop the agent registered as Service using Systemd

sudo systemctl stop ss_infra_agent.service

Stop/Kill the agent started using nohup

kill -9 $(pgrep infra_agent)

Installing agents for Linux - Version 3.1.3

Prerequisites

  • For prerequisite checks for agent installation, see Prerequisite checks for agent installation.
  • OS: Ubuntu, Debian, RHEL, CentOS.
  • SixthSense Infra Agent. See Installing the Agent.
  • URL/IP of the Sixthsense collector (your tenant URL provided by Customer Support)
  • Access token provided by Customer Support.
  • PACKAGE_TOKEN - Access Token required for downloading SixthSense Package provided by Customer Support.
  • PACKAGE_TOKEN_USERNAME - Username for Access Token provided by Customer Support.
  • TOKEN - Access Token from the SixthSense portal Settings page.
  • For supported agent versions and framework, see VM agents.

Downloading the agent

  1. Download latest ss_infra_agent-x.x.x.linux-amd64.tar.gz release binary provided by Customer Support.
export PACKAGE_TOKEN="token"
export AGENT_VERSION="3.1.3"
curl --header "PRIVATE-TOKEN:<TOKEN>" --output ss_infra_agent_3.1.3-linux-amd64.tar.gz "https://artifacts-observability.sixthsense.rakuten.com/api/v4/projects/15/packages/generic/sixthsense-infra-agent/3.1.3/ss_infra_agent_3.1.3-linux-amd64.tar.gz"
  1. Unzip release binary and go to the agent directory.
tar -xvzf ss_infra_agent-${AGENT_VERSION}.linux-amd64.tar.gz
cd ss_infra_agent-${AGENT_VERSION}.linux-amd64
  1. Copy the agent binary and config.yaml to the following directory /usr/local/bin

Configuring and starting the agent

Update ss_infra_agent_config.yaml as per the instructions mentioned in the configuration file.

# sixthsense-infra-agent can be configured via yaml or environment variables
#
# Note: Environment Variables are given higher priority over yaml file
#
# Following are the environment variables that can be set:
# ENV VARIABLE CORRESPONDS TO
# SS_SERVICE_NAME service_name
# SS_AUTHENTICATION authentication
# SS_BACKEND sixthsense_backend
# SS_LOGGING logging
# SS_SECURE secure
# SS_TOPNPROCESS topN_processes
sixthsense:
service_name: CentOS_VM
# Login to Sixthsense UI Go to Settings on Side Navbar Copy Access Token
authentication: ${SIXTHSENSE_TOKEN}
# debug|error|info
logging: info
sixthsense_backend: grpc-collector-observability.sixthsense.rakuten.com:443
secure: true
# note that the limit for capturing the processes is 15.
topN_processes: 5
  1. Configure the following environment variables:
Environment Variable NameDescription
SS_RESTART_MINUTE_INTERVALAgent self-restart interval in hours
SS_RESTART_MEMORY_LIMITMemory limit in MB to trigger restart
SS_PPROF_PORTPort for pprof profiling (optional)
  1. Give permission to the binary, configuration file for all chmod u+x /usr/local/bin/ss_infra_agent chmod u+x /usr/local/bin/ss_infra_agent_config.yaml

  2. Create a service file in /etc/systemd/system directory using the following command.

  • cd /etc/systemd/system
  • sudo vi ss_infra_agent.service
  1. Add the following contents to the file:
[Unit]
Description=Sixthsense Infra Agent
After=network.target
[Service]
Type=simple
# Environment="HTTPS_PROXY=proxy-server:port"
ExecStart=/usr/local/bin/ss_infra_agent --collector.processes
Restart=always
WorkingDirectory=/usr/local/bin
RestartSec=10
[Install]
WantedBy=multi-user.target
note

The commented line above for proxy configuration i.e. Environment="HTTPS_PROXY=proxy-server:port" must be used only when there are network restrictions. Proxy-server and port should be filled by the client or installer.

  1. Save and close the file.
  • If your service requires network connectivity, remove the After=network.target line.
  • Set Type=simple if your command doesn't fork into background or set Type=forking if it forks.
  • Set Restart=always to make sure the service is restarted automatically if it fails or stops.
  • Set RestartSec to specify the time between restart attempts.
  1. Reload the systemd daemon to read the new service file.

sudo systemctl daemon-reload

  1. Start the agent as systemctl service

sudo systemctl start ss_infra_agent.service

  1. Check the service status to ensure that it is running.

sudo systemctl status ss_infra_agent.service

  1. Enable the service to start automatically on boot.

sudo systemctl enable ss_infra_agent.service

  1. Check the logs.

journalctl -u processname -n 100

On booting, the VM Agnet will start automatically and will be restarted if it crashes or stops for some reason.

Starting the agent directly

To start the agent, use the following command.

nohup ./ss_infra_agent_service --collector.processes &

In case of network restrictions, pass proxy to the meter-agent process to enable connection to sixthsense-backend.

HTTPS_PROXY=proxy-server:port ./ss_infra_agent_service --collector.processes &
  • --collector.processes – to send process level data
  • nohup - to start with logs, logs will be stored in nohup.out file
  • "&" - to start as background process

Installing agents for Windows Version 3.1.1 (latest)

Prerequisites

  • OS: Windows Server versions 2008R2 and later, and desktop Windows version 7 and later
  • SixthSense Windows VM Agent. For more information, see Installing the Agent.
  • URL/IP of the Sixthsense backend collector (the tenant URL provided by Customer Support)
  • Access token provided by Customer Support.
  • PACKAGE_TOKEN - Access Token required for downloading SixthSense Package provided by Customer Support.
  • PACKAGE_TOKEN_USERNAME - Username for Access Token provided by Customer Support.
  • TOKEN - Access Token from the SixthSense portal Settings page.
  • For supported agent versions and framework, see VM agents.

Downloading the agent

  1. Download latest ss_windows_infra_agent-<version_no>.zip release folder provided by Customer Support.
curl --header "PRIVATE-TOKEN:<TOKEN>" --output ss_windows_infra_agent.zip "https://artifacts-observability.sixthsense.rakuten.com/api/v4/projects/15/packages/generic/sixthsense-infra-agent/3.1.1/ss_windows_infra_agent.zip"
  1. Unzip the release zip folder and place it in the agent directory.

Installing the agent

You can install the VM agent for Windows through the silent installation.

Silent installation

  1. Update ss_windows_infra_agent_config.yaml as in the instructions mentioned in the config file.
# sixthsense-infra-agent can be configured via yaml or environment variables
#
# Note: Environment Variables are given higher priority over yaml file
#
# Following are the environment variables that can be set:
# ENV VARIABLE CORRESPONDS TO
# SS_SERVICE_NAME service_name
# SS_AUTHENTICATION authentication
# SS_BACKEND sixthsense_backend
# SS_LOGGING logging
# SS_SECURE secure
# SS_DEFAULTCOLLECTOR default_collectors
# SS_DEFAULTCOLLECTOR_PLACEHOLDER default_collectors_placeholdersixthsense
service_name: <custom_service_name>
# Login to the SixthSense portal > Go to **Settings** on left navigation bar > Copy Access Token
authentication: <service_auth_token>
# debug|error|info
logging: info
sixthsense_backend: <sixthsense_backend_collector>
# For connectivity to backend using onecloud private network: 100.99.116.221:80
# For connectivity to backend using intra public network: 133.237.176.44:80
# SSL connection with backend true|false
secure: true
# For OneCloud Platform use secure: false
#cpu,cs,logical_disk,net,os,service,system,textfile
default_collectors: "cpu,cs,logical_disk,net,os,memory,system,iis,process,cpu_info"
default_collectors_placeholder: "[defaults]"
enabled: cpu,cs,net,service`
  1. Download Windows agent from the curl command.

  2. To register Infra agent as a Service in Windows, type in the following command in cmd: sc create ServiceName binPath= "full-path-to-exe"

Example:

sc create infra_agent binPath= "C:\InfraAgent\windows_exporter.exe"
  1. Confirm whether the service is registered by opening Services and search for the Service Name with which you've registered.

  2. Edit the config.yaml file as per your requirement and save.

  3. Run the service by opening the Services again and look for Service name > Start or sc start <service_name>

  4. Look for your Service name > Start the Service or through sc start ServiceName.

Example:

sc start infra_agent