Learn about the Wavefront FreeBSD Host Integration.

FreeBSD Host Integration

FreeBSD is a free and open-source Unix-like operating system. Monitoring FreeBSD hosts is easy with Wavefront. This integration steps you through installing and configuring the Wavefront proxy and the Telegraf. Telegraf is a light-weight server process capable of collecting, processing, aggregating, and sending metrics to a Wavefront proxy.

In addition to setting up the metrics flow, this integration also installs a dashboard. Here are the Summary and CPU sections of a dashboard displaying FreeBSD host metrics.

images/db_freebsd_cpu.png

FreeBSD Host Setup

Step 1: Install and Configure the Wavefront Proxy Manually

  1. Create a directory wavefront-proxy and change the directory:
    mkdir wavefront-proxy
    cd wavefront-proxy
    
  2. Download the Wavefront proxy jar:
    curl -o proxy-uber.jar https://wavefront-cdn.s3-us-west-2.amazonaws.com/bsd/proxy-uber.jar
    
  3. Create a directory conf and download the wavefront.conf, log4j2.xml and preprocessor_rules.yaml files into the conf directory:
    mkdir conf
    curl -o ./conf/wavefront.conf https://wavefront-cdn.s3-us-west-2.amazonaws.com/bsd/wavefront.conf
    curl -o ./conf/log4j2.xml https://raw.githubusercontent.com/wavefrontHQ/wavefront-proxy/master/pkg/etc/wavefront/wavefront-proxy/log4j2.xml.default
    curl -o ./conf/preprocessor_rules.yaml https://raw.githubusercontent.com/wavefrontHQ/wavefront-proxy/master/pkg/etc/wavefront/wavefront-proxy/preprocessor_rules.yaml.default
    
  4. Open the conf/wavefront.conf file for edit, update the following proxy properties:
    server = https://YOUR_CLUSTER.wavefront.com/api/
    token = YOUR_API_TOKEN
    hostname = "HOSTNAME"
    
  5. Start the Wavefront proxy service:
    java -XX:OnOutOfMemoryError="kill -1 %p" \
    -Dlog4j.configurationFile=./conf/log4j2.xml -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager \
    -Djavax.net.debug=summary -jar ./proxy-uber.jar \
    -f conf/wavefront.conf \
    --preprocessorConfigFile ./conf/preprocessor_rules.yaml &
    

    NOTE:

    • If Java is not installed, run pkg install openjdk8 to install jdk and set the path`.
    • If the proxy fails to start with an Error requesting exclusive access to the buffer lock file, execute the below command and start the proxy (Step 5)
       mkdir -p /var/spool/wavefront-proxy
      
  6. Verify that the proxy has registered with the Wavefront server.

Step 2: Install and Configure the Telegraf Agent Manually

  1. Download the Telegraf binary for FreeBSD from https://github.com/influxdata/telegraf/releases.
  2. Extract the telegraf-*.tar.gz file and change the working directory to the extracted directory:
    tar xf telegraf-*.tar.gz
    cd telegraf
    
  3. Open the ./etc/telegraf/telegraf.conf file for edit, and

    a. Comment the influxdb output plugin:

       #[[outputs.influxdb]]
    

    b. Enable the wavefront output plugin by adding below snippet:

       [[outputs.wavefront]]
       ## Url for Wavefront Direct Ingestion or using HTTP with Wavefront Proxy
       ## If using Wavefront Proxy, also specify port. example: http://proxyserver:2878
       # url = "https://<CLUSTER>.wavefront.com"
       #
       ## Authentication Token for Wavefront. Only required if using Direct Ingestion
       # token = "API_TOKEN"
       #
       ## DNS name of the wavefront proxy server. Do not use if url is specified
       host = "WAVEFRONT_PROXY_ADDRESS"
       #
       ## Port that the Wavefront proxy server listens on. Do not use if url is specified
       port = 2878
       prefix = "bsd."
       metric_separator = "."
       source_override = ["hostname", "agent_host", "node_host"]
       convert_paths = true
    

    c. Uncomment the net input plugin, if commented.

       # Enable net plugin
       [[inputs.net]]
    
  4. Start the Telegraf agent
    ./usr/bin/telegraf --config ./etc/telegraf/telegraf.conf