Skip to content
Rajiv edited this page Feb 7, 2018 · 11 revisions

Pre-requisites

  • An apptuit.ai account
  • Access token for your account

Installing from the repo

XCollector is available via debian & yum repositories on bintray. For convenience, an installation script is available that can setup the repo, install the package and update configuration in /etc/xcollector/xcollector.yml.

The installation script is also open-source and available at https://git.io/get-xcollector. We deeply appreciate contributions from our community! Feel free to send us pull requests and/or file issues.

To install using the installation script and wget, run (replace PASTE_ACCESS_TOKEN_HERE with your Apptuit API access token):

XC_ACCESS_TOKEN=PASTE_ACCESS_TOKEN_HERE bash -c "$(wget -qO- https://git.io/get-xcollector)"

Alternately, to install using the installation script and curl, run (replace PASTE_ACCESS_TOKEN_HERE with your Apptuit API access token):

XC_ACCESS_TOKEN=PASTE_ACCESS_TOKEN_HERE bash -c "$(curl -Ls  https://git.io/get-xcollector)"

Note: In case of issues, the installation log is available in the current working directory with the name xcollector-install.log

Supported environment variables
  • XC_ACCESS_TOKEN: Sets the access_token configuration option
  • XC_GLOBAL_TAGS: Sets the tags configuration option. Format for this variable is XC_GLOBAL_TAGS=env:prod,data_center=SFO,micro_service=accounts (ie use colon to separate key from value and use comma to separate key-value pairs.
  • XC_INSTALL_ONLY: Set the variable to true (or any non null value) if the installation script should install and configure the package, but not start it
Post install configuration
  1. If you are running NGINX, verify log file format: NGiNXAccessLog
  2. If you are running Tomcat, change your log configuration as described in: TomcatAccessLog
  3. restart the collector: service xcollector restart
Debugging issues

In case of trouble with XCollector on startup look at:
service xcollector status
/var/log/xcollector/xcollector.log

(Deprecated) Installing using a rpm file

This is no longer the recommended method. Please use the installation script instead

  1. Download and install latest version
    • Get the download link to latest .rpm package from the Releases Page
    • Download the package using the copied link
      wget https://github.com/ApptuitAI/xcollector/releases/download/apptuit-v0.8.0/xcollector-0.8.0-1.x86_64.rpm
    • Install the collector
      yum --nogpgcheck localinstall xcollector-0.8.0-1.x86_64.rpm
  2. Update token in the config
    • vi /etc/xcollector/xcollector.yml
    • Change access_token: "PASTE_ACCESS_TOKEN_HERE" to access_token: "<TOKEN>"
  3. XCollector adds a default "host" tag to all the metrics. You can add additional global tags (like environment="production" or data_center="us-east-1a" etc) to all the metrics generated on this instance. To add global tags:
    • vi /etc/xcollector/xcollector.yml
    • Un-comment the tags section and enable the tags relevant to your environment
  4. If you are running NGINX, verify log file format: NGiNXAccessLog
  5. If you are running Tomcat, change your log configuration as described in: TomcatAccessLog
  6. Start the collector:
    service xcollector start
  7. In case of trouble with XCollector on startup look at:
    service xcollector status
    /var/log/boot.log

(Deprecated) Installing using a deb file

This is no longer the recommended method. Please use the installation script instead

  1. Download and install latest version
    • Get the download link to latest .deb package from the Releases Page
    • Download the package using the copied link
      wget https://github.com/ApptuitAI/xcollector/releases/download/apptuit-v0.8.0/xcollector_0.8.0-1_amd64.deb
    • Install the collector
      sudo apt update
      sudo apt install ./xcollector_0.8.0-1_amd64.deb
      In older versions of Ubuntu, where apt does not support local install, use the following sequence of commands instead
      sudo apt update
      sudo dpkg -i ./xcollector_0.8.0-1_amd64.deb
      sudo apt install -f
  2. Update token in the config
    • vi /etc/xcollector/xcollector.yml
    • Change access_token: "PASTE_ACCESS_TOKEN_HERE" to access_token: "<TOKEN>"
  3. XCollector adds a default "host" tag to all the metrics. You can add additional global tags (like environment="production" or data_center="us-east-1a" etc) to all the metrics generated on this instance. To add global tags:
    • vi /etc/xcollector/xcollector.yml
    • Un-comment the tags section and enable the tags relevant to your environment
  4. If you are running NGINX, verify log file format: NGiNXAccessLog
  5. If you are running Tomcat, change your log configuration as described in: TomcatAccessLog
  6. Start the collector:
    sudo service xcollector start
  7. In case of trouble with XCollector on startup look at:
    service xcollector status
    /var/log/boot.log