Giter Site home page Giter Site logo

dice-monitoring's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dice-monitoring's Issues

aux component deployment

Need to rewrite logstash-forwarder and collectd deployment for distributed logstash deployment

Parsing e notation values

Some values sent to logstash are in exponential notation (i.e. -1231312E2).
How to pars them and enter them into ElasticSearch.
Currently these values are defined as %{NOTSPACE}

Could use regex:

  • [-+]?[0-9]*.?[0-9]+([eE][-+]?[0-9]+)?

One button bootstrapping

Implement resource - > /dmon/v1/overlord/nodes to start/install all monitoring components on registered nodes

failed to parse

1442411738648 ugi.UgiMetrics: Context=ugi, Hostname=vm-cluster-oryx3, LoginSuccessNumOps=0, LoginSuccessAvgTime=0.0, LoginFailureNumOps=0, LoginFailureAvgTime=0.0, GetGroupsNumOps=0, GetGroupsAvgTime=0.0

Local vs Distributed

Still need a more clear differentiation between a local deployment and a fully distributed one.

fail parse

1442491770248 ugi.UgiMetrics: Context=ugi, Hostname=vm-cluster-oryx4, LoginSuccessNumOps=0, LoginSuccessAvgTime=0.0, LoginFailureNumOps=0, LoginFailureAvgTime=0.0, GetGroupsNumOps=0, GetGroupsAvgTime=0.0

D-Mon service

How to fix redeployment issue if dmon is stopped and cannot restart because attached processes (esCore and LSCore) still running.

  • If dmon fails detach esCore and LSCore

collectd template issue

collectd template generates invalid conf files.

Problem related to $end found at line 34 instead of EOL. Tried 'wb' parameter when writing files.

Editing with nano fixes issue.

Restructure code

Split code into different modules:

  • dbModule.py used instead of copying everything into pyDMON
  • create init.py

Aux component selective start/stop

Need to modify resource: /v1/overlord/aux//
to => /v1/overlord/aux/deploy//

Need to add resource: /v1/overlord/aux/start//
and /v1/overlord/aux/stop//

fix virtualenv

create a viable virtualenv for D-Mon distribution and fix dmon-start.sh

Mapping Conflict

Some values are defined as several types (string, int, float).
Check correct type and repair index.

Revise Documentation

Revise the documentation and check for missing configuration files.

  • Missing logstash.conf in Vagrant CDH Cluster setup

Upload properties file

Create resource that uploads the propertie2 file to all nodes.
Same for Spark and Storm.

Custom ElasticSearch index

Define custom ElasticSearch index for testing end deployments.
This eliminates mapping conflicts in the future.

Graceful shutdown

Create graceful closing of application avoid:

Exception KeyError: KeyError(140674196921712,) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored

String concatenation

In CPython, you may want to replace:
s = head + body + maybe + tail
with the admittedly less readable:
s = "%(head)s%(body)s%(maybe)s%(tail)s" % locals()
or even:
s = "{head}{body}{maybe}{tail}".format(**locals())

Clean hostnames in collectd and ELK

Some hostnames are set in collectd by hand (i.e. DICE CDH slave4).
Remove custom name and use FQDN (i.e. dice.cdh5.s4.internal) or hostname (i.e. 109-231-126-222)

Create grok patterns

Create custom patterns in grok for metrics2 file sink outputs.

For example:
%{EXPNOT}=[-+]?[0-9]*.?[0-9]+([eE][-+]?[0-9]+)? -> for exponential (scientific) notation

Handle no metrics in defined timeframe

Exception happened during processing of request from ('79.118.13.40', 58773)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 649, in init
self.handle()
File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 200, in handle
rv = BaseHTTPRequestHandler.handle(self)
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 235, in handle_one_request
return self.run_wsgi()
File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 177, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 167, in execute
for data in application_iter:
File "/usr/local/lib/python2.7/dist-packages/werkzeug/debug/init.py", line 88, in debug_application
app_iter = self.app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1836, in call
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "/usr/local/lib/python2.7/dist-packages/flask_restful/init.py", line 471, in wrapper
resp = resource(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/flask/views.py", line 84, in view
return self.dispatch_request(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/flask_restful/init.py", line 581, in dispatch_request
resp = meth(_args, *_kwargs)
File "/opt/IeAT-DICE-Repository/src/pyDMON.py", line 340, in post
dict2CSV(ListMetrics,request.json['DMON']['fname'])
File "/opt/IeAT-DICE-Repository/src/pyESController.py", line 171, in dict2CSV
sys.exit("listValues argument is empty. Please supply valid input!")
SystemExit: listValues argument is empty. Please supply valid input!

Metrics selection returns complete json not just metrics specific

The values assigned to the metrics list from queryES model are not take into consideration when json type file is required.

......................................
                       metrics = request.json['DMON']['metrics']
            ListMetrics, resJson = queryESCore(query, allm=False,dMetrics=metrics, debug=False)
            #repeated from before create function
            if ftype == 'csv':
                if not 'fname' in request.json['DMON']:
                    fileName = 'output'+'.csv'
                    dict2CSV(ListMetrics)
                else:
                    fileName = request.json['DMON']['fname']+'.csv'
                    dict2CSV(ListMetrics,request.json['DMON']['fname'])
                csvOut = os.path.join(outDir,fileName)
                try:
                    csvfile=open(csvOut,'r')
                except EnvironmentError:
                    response = jsonify({'EnvError':'file not found'})
                    response.status_code = 500
                    return response
                return send_file(csvfile,mimetype = 'text/csv',as_attachment = True)
            if ftype == 'json':
                response = jsonify({'DMON':resJson})
                response.status_code = 200
                return response
......................................

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.