|
| 1 | +# Quickstart |
| 2 | + |
| 3 | +- [SingleHost](#single-host) |
| 4 | + |
| 5 | + |
| 6 | +## Single Host |
| 7 | + |
| 8 | +This tutorial assumes you are starting fresh and have no existing collectd agent running on your instance. |
| 9 | + |
| 10 | +#### Step 1: Download and install the agent |
| 11 | + |
| 12 | +```sh |
| 13 | +curl -sSL https://dl.signalfx.com/signalfx-agent.sh > /tmp/signalfx-agent.sh |
| 14 | +sudo sh /tmp/signalfx-agent.sh YOUR_SIGNALFX_API_TOKEN |
| 15 | +``` |
| 16 | + |
| 17 | +Your SignalFx API Token can be obtained from the Organization->Access Token tab in [SignalFx](https://app.signalfx.com) |
| 18 | + |
| 19 | +More detailed installation steps to install via a config management tool or using a containerized agent can be found [here](../README.md#installation) |
| 20 | + |
| 21 | +#### Step 2: Configuration |
| 22 | + |
| 23 | +The default configuration file should be located at `/etc/signalfx/agent.yaml` |
| 24 | +Also, by default, the token file should be located at `/etc/signalfx/token` |
| 25 | +which should contain your SignalFx API Token. |
| 26 | +In the example configuration below, the default location for the token file is being referenced. |
| 27 | + |
| 28 | +Here is an example of the configuration file - |
| 29 | + |
| 30 | +``` |
| 31 | +--- |
| 32 | +# *Required* The access token for the org that you wish to send metrics to. |
| 33 | +signalFxAccessToken: {"#from": "/etc/signalfx/token"} |
| 34 | +ingestUrl: {"#from": "/etc/signalfx/ingest_url", default: "https://ingest.signalfx.com"} |
| 35 | +
|
| 36 | +intervalSeconds: 10 |
| 37 | +
|
| 38 | +logging: |
| 39 | + # Valid values are 'debug', 'info', 'warning', and 'error' |
| 40 | + level: info |
| 41 | +
|
| 42 | +# observers are what discover running services in the environment |
| 43 | +observers: |
| 44 | + - type: host |
| 45 | +
|
| 46 | +monitors: |
| 47 | + - {"#from": "/etc/signalfx/monitors/*.yaml", flatten: true, optional: true} |
| 48 | + - type: collectd/cpu |
| 49 | + - type: collectd/cpufreq |
| 50 | + - type: collectd/df |
| 51 | + - type: collectd/disk |
| 52 | + - type: collectd/interface |
| 53 | + - type: collectd/load |
| 54 | + - type: collectd/memory |
| 55 | + - type: collectd/protocols |
| 56 | + - type: collectd/signalfx-metadata |
| 57 | + - type: collectd/uptime |
| 58 | + - type: collectd/vmem |
| 59 | + |
| 60 | +metricsToExclude: |
| 61 | +``` |
| 62 | + |
| 63 | +You can add more [monitors](./monitor-config.md) and configure the monitors appropriately. |
| 64 | + |
| 65 | +##### Example of adding a new monitor |
| 66 | + |
| 67 | +To start collecting apache metrics you'd add the [apache monitor](./monitors/collectd-apache.md) to the agent.yaml file. |
| 68 | +Your monitor list would now look similar to: |
| 69 | + |
| 70 | +``` |
| 71 | +monitors: |
| 72 | + - type: collectd/cpu |
| 73 | + . |
| 74 | + . |
| 75 | + . |
| 76 | + - type: collectd/apache |
| 77 | + host: localhost |
| 78 | + port: 80 |
| 79 | +``` |
| 80 | + |
| 81 | +##### Example of adding a new observer |
| 82 | + |
| 83 | +To start collecting docker container metrics the first step would be to add a [docker observer](./observers/docker.md) and |
| 84 | +the next step would be to add a [docker metrics monitor](./monitors/docker-container-stats.md) to the agent.yaml file. |
| 85 | + |
| 86 | +Your observer list would now look similar to: |
| 87 | + |
| 88 | +``` |
| 89 | +observers: |
| 90 | + - type: host |
| 91 | + - type: docker |
| 92 | +``` |
| 93 | + |
| 94 | +And your type list would now include the [docker metrics monitor](./monitors/docker-container-stats.md): |
| 95 | + |
| 96 | +``` |
| 97 | +monitors: |
| 98 | + - type: collectd/cpu |
| 99 | + - type: collectd/cpufreq |
| 100 | + . |
| 101 | + . |
| 102 | + . |
| 103 | + - type: docker-container-stats |
| 104 | +``` |
| 105 | + |
| 106 | +Any changes to the configuration file will automatically get picked up by the agent and will not require a restart. |
| 107 | + |
| 108 | +For troubleshooting, you can also check the status of the agent: |
| 109 | + |
| 110 | +``` |
| 111 | +sudo signalfx-agent status |
| 112 | +``` |
| 113 | + |
| 114 | +#### Step 3: Login to [SignalFx](https://app.signalfx.com) and see your data! |
| 115 | + |
| 116 | + |
0 commit comments