Docs » Integrations Guide » Use the SignalFx Smart Agent » Smart Agent Quick Start

Smart Agent Quick Start

Deploy Directly on Host

This tutorial assumes you are starting fresh and have no existing collectd agent running on your instance.

Certain installation statements include YOUR_SIGNALFX_REALM. If this value is not set, SignalFx assumes your organization is in the us0 realm. To determine if you are in a different realm and need to supply your realm value in those statements, check your profile page in the SignalFx web application.

Step 1: Download and install the Smart Agent

Linux

curl -sSL https://dl.signalfx.com/signalfx-agent.sh > /tmp/signalfx-agent.sh
sudo sh /tmp/signalfx-agent.sh --realm YOUR_SIGNALFX_REALM YOUR_SIGNALFX_API_TOKEN

Windows

Ensure that the folowing dependencies are installed:

Once the dependencies have been installed, use the following powershell script to install the Smart Agent. The Smart Agent will be installed as a Windows service and will log to the Windows Event Log.

& {Set-ExecutionPolicy Bypass -Scope Process -Force; $script = ((New-Object System.Net.WebClient).DownloadString('https://dl.signalfx.com/signalfx-agent.ps1')); $params = @{access_token = "YOUR_SIGNALFX_API_TOKEN"; ingest_url = "https://ingest.YOUR_SIGNALFX_REALM.signalfx.com"; api_url = "https://api.YOUR_SIGNALFX_REALM.signalfx.com"}; Invoke-Command -ScriptBlock ([scriptblock]::Create(". {$script} $(&{$args} @params)"))}

Your SignalFx API Token can be obtained from the Organization->Access Token tab in SignalFx.

More detailed installation steps to install via a config management tool or using a containerized agent can be found here.

Step 2: Configuration

The default configuration file should be located at /etc/signalfx/agent.yaml on Linux and \ProgramData\SignalFxAgent\agent.yaml on Windows. Also, by default, the file containing your SignalFx API token should be located at /etc/signalfx/token on Linux and \ProgramData\SignalFxAgent\token on Windows.

In the referenced example agent.yaml configuration files below, the default location for the token file is used.

Configure your endpoints

By default, the Smart Agent will send data to the us0 realm. If you are not in this realm, you will need to explicitly set the signalFxRealm option in your config like this:

signalFxRealm: YOUR_SIGNALFX_REALM

To determine if you are in a different realm and need to explicitly set the endpoints, check your profile page in the SignalFx web application.

If you want to explicitly set the ingest, API server, and trace endpoint URLs, you can set them individually like so:

ingestUrl: "https://ingest.YOUR_SIGNALFX_REALM.signalfx.com"
apiUrl: "https://api.YOUR_SIGNALFX_REALM.signalfx.com"
traceEndpointUrl: "https://ingest.YOUR_SIGNALFX_REALM.signalfx.com/v1/trace"

They will default to the endpoints for the realm configured in signalFxRealm if not set.

You can add more monitors and configure them as appropriate.

Example of adding a new monitor

To start collecting apache metrics, you would add the apache monitor to the Smart Agent.yaml file. Your monitor list would then look similar to this:

monitors:
  - type: collectd/cpu
  .
  .
  .
  - type: collectd/apache
    host: localhost
    port: 80

Example of adding a new observer

To start collecting docker container metrics, your first step would be to add a docker observer.

Your observer list would then look similar to this:

observers:
  - type: host
  - type: docker

Next, you would add a docker metrics monitor to the Smart Agent.yaml file. Your type list would now include this monitor (docker-container-stats):

monitors:
  - type: collectd/cpu
  - type: collectd/cpufreq
  .
  .
  .
  - type: docker-container-stats

The Smart Agent automatically picks up any changes to the configuration file, so a restart is not required.

For troubleshooting, you can also check the status of the Smart Agent:

sudo signalfx-agent status

Step 3: Log into SignalFx and see your data!