Code Monkey home page Code Monkey logo

service-assurance-goclient's Introduction

Go Report Card

Note about github branch

collectd branch:

collectd branch only works for collectd as incoming data source for metrics.

master branch:

master branch code base is not tightly coupled with single incoming data source, It has the flexibility to add many different types of incoming data sources(collectd, statsd,fluentd etc ).

Service Assurance Smart Agent POC

  • Enabling Barometer with amqp1.0 plugin will write metrics to amqp1.0 dispatcher.
  • Runnng a SA-Smart Agent Service will start 3 services
    • qpid router listener, to consume all incoming collectd json
    • http server to expose metrics from collectd for Prometheus to scrape.
    • CacheServer to cach all incoming data from amqp1.0 plugin
Requirment.
  • Install barometer, amqp1.0 dispatcher and Prometheus .

alt text

Single node installation

Barometer installation

From Barometer User guide: Read barometer docker user guide barometer docker user guide

Installing barometer collectd container Without AMQP plugin

  • $ git clone https://gerrit.opnfv.org/gerrit/barometer
  • $ cd barometer/docker/barometer-collectd
  • $ sudo docker build -t opnfv/barometer-collectd --build-arg http_proxy=echo $http_proxy
    --build-arg https_proxy=echo $https_proxy -f Dockerfile .

**Applying AMQP1.0 plugin patch to build docker images ** In order to apply AMQP1.0 plugin as patch for the docker image before building. I copied the project to public github and made following changes to the project

For reference see below. You can skip this section to "Build with AMQP1.0 plugin"

  +COLLECTD_AMQP1_PATCH_URL ?= https://github.com/collectd/collectd/pull/2618.patch
  +AMQP1_PATCH ?= 2619

😱//Didn’t add qpid proton link. Instead of building the pakcage, choose to do yum install.

💭During testing qpid proton verson 0.18.1 wast not available in release repo . Hence used test repo

$(AT)sudo yum install -y qpid-proton-c-devel-0.18.1-1.el7.x86_64 --enablerepo=epel-testing

WORKDIR ${repos_dir}
RUN git clone https://github.com/aneeshkp/barometer.git
WORKDIR ${repos_dir}/barometer/systems
Build with AMQP1.0 plugin
$ git clone https://github.com/aneeshkp/barometer.git
$ cd barometer/docker/barometer-collectd
$ sudo docker build -t opnfv/barometer-collectd --build-arg http_proxy=`echo $http_proxy` \
  --build-arg https_proxy=`echo $https_proxy` -f Dockerfile .
To Deploy Barometer container
docker run -tid --net=host -v `pwd`/collect_config:/opt/collectd/etc/collectd.conf.d  -v /var/run:/var/run -v /tmp:/tmp --privileged opnfv/barometer /run_collectd.sh

Here pwd/collect_config contains all collectd configuration files. Enable and disable plugin under this directory

QPID Dispatcher installation (Read setting up standalone qpid-ansible readme file. )
- Git clone https://github.com/aneeshkp/qpid-ansible
- Cd qpid-ansible
- change under hosts standalone server name
	[standalone]
	10.19.110.23
- ansible-playbook -i hosts main.yaml --tags config-standalone,router,start,status --limit standalone
Prometheus Installation

Read Prometheus installtion Prometheus installation Set the target in prometheus yml to scrap available metrics port (see Smart Agent Usage for port).

Service Assurance Smart Agent installation
Git clone https://github.com/aneeshkp/service-assurance-goclient.git
Set go environment.
Follow error message to run "$go get dependencies"
Smart Agent Usage

For running with AMQP and Prometheus use following option.

$go run main.go -mhost=localhost -mport=8081 -amqpurl=10.19.110.5:5672/collectd/telemetry 

For running with Sample data, wihout AMQP use the following option.

Sample Data

$go run main.go -mhost=localhost -mport=8081 -usesample=true -h=10 -p=100 -t=-1 
--- Usage Details
  -amqpurl string
    	AMQP1.0 listener example 127.0.0.1:5672/collectd/telemetry
  -count int
    	Stop after receiving this many messages in total(-1 forever) (OPTIONAL) (default -1)
  -h int
    	No of hosts : Sample hosts required (deafult 1). (default 1)
  -mhost string
    	Metrics url for Prometheus to export.  (default "localhost")
  -mport int
    	Metrics port for Prometheus to export (http://localhost:<port>/metrics)  (default 8081)
  -p int
    	No of plugins: Sample plugins per host(default 100). (default 100)
  -t int
    	No of times to run sample data (default 1) -1 for ever. (default 1)
  -usesample
    	Use sample data instead of amqp.This wil not fetch any data from amqp (OPTIONAL)



service-assurance-goclient's People

Contributors

aneeshkp avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.