cloudfoundry/bosh-hm-forwarder

Name: bosh-hm-forwarder

Owner: Cloud Foundry

Description: null

Created: 2017-01-09 17:13:32.0

Updated: 2017-09-20 07:14:51.0

Pushed: 2017-03-22 17:52:33.0

Homepage: null

Size: 22

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Bosh HM metrics Forwarder

Purpose

The purpose of the Bosh HM Forwarder is to forward bosh health metrics into Loggregator thus making them available in the firehose.

Bosh Health Metrics are currently emitted as bosh.healthmonitor.system.*

Architecture

Currently the Bosh Director is capable of emitting metrics via its plugin architecture. The Bosh HM Forwarder acts as an OpenTSDB listener which reads off the metrics forwarded by the Bosh Health Monitor.

The Bosh HM Forwarder must be colocated with a fully functioning Metron Agent. It then forwards the metrics to Dopplers via the Metron Agent as ValueMetric type.

Setup with Bosh Lite
Start local Metron Agent
  1. cd ~/workspace/loggregator/src/metron

  2. Use router_z1 on the cf_warden deployment to get the metron_agent configuration copy that information to /tmp/metron_config.json For Example:

    
    ex": 0,
    ": "router_z1",
    e": "z1",
    loyment": "cf-warden",
    
    dUrls": ["http://10.244.0.42:4001"],
    dMaxConcurrentRequests": 10,
    
    redSecret": "loggregator-secret",
    
    acyIncomingMessagesPort": 3456,
    psondeIncomingMessagesPort": 3457,
    
    dQueryIntervalMilliseconds": 5000,
    
    gregatorDropsondePort": 3457,
    log": "vcap.metron_agent"
    
    
  3. go run main.go -config /tmp/metron_config.json

Start local Bosh-Hm-Forwarder
  1. cd ~/workspace/loggregator/src/boshhmforwarder
  2. Create the /tmp/bosh-forwarder.json file
    
    ncomingPort":4001,
    etronPort": 3457
    
    
  3. go run main.go --configPath /tmp/bosh-forwarder.json
Enable Bosh Health Monitor
  1. cd ~/workspace/bosh-lite

  2. vagrant ssh

  3. sudo -i

  4. vi /var/vcap/jobs/health_monitor/config/health_monitor.yml

  5. add the following under 'plugins:' (line 32ish)

    ins:
    ]
    ame: tsdb
    vents:
     - alert
     - heartbeat
    ptions:
     host: <your HostIP>
     port: 4001
    

    or (in case of JSON config)

    gins": [{
    "name": "tsdb",
    "events": ["alert", "heartbeat"],
    "options": {
        "host": "10.244.5.35",
        "port": 4000
    }
    
    "name": "logger",
    "events": ["alert"]
     ... }
    
    

    to find use ifconfig and look for:

     flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    
     10.35.33.57 netmask 0xffffff00 broadcast 10.35.33.255
    
    us: active
    

    is the inet entry above like 10.35.33.57

  6. monit restart health_monitor

Setup With Loggregator as a Separate Release
  1. Add the loggregator release to the manifest

  2. name: loggregator release: latest

  3. Add the boshhmforwarder to the instance group/job

  4. name: boshhmforwarder release: loggregator

    : Ideally, the Bosh HM Forwarder should be located on a **single** instance
     has a Metron Agent on it. As such, it can be deployed on a separate vm
     the Metron Agent colocated on it.
    

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.