Giter Site home page Giter Site logo

cmdhandler's Introduction

cmdhandler is a monitoring tool that 
 - executes requested commands 
 - gets the results of it
 - produces a kafka message in JSON format

-----------------------------
    Build instructions
-----------------------------
1. call autoremake --install to create build system files
2. call ./configure to check dependencies
3. call make to build the project
4. call make install to install it

-----------------------------
    Execute instructions
-----------------------------
1. provide a config file with param -f
Ex: cmdhandler -f config.conf

-----------------------------
    Config File instructions
-----------------------------
1. uuid: uuid to be used as label in the beginning of messages
2. kafka_broker_host: kafka broker ip:port. for multiple brokers use comma (,) to seperate them
3. kafka_topic: kafka topic to produce messages
4. interval_sec: time intervals between messages in seconds
5. command[key_field]: full expression of command to be executed i.e. with parameters. 
	- key_fields can be more than 1 and corresponds to the keys of json messages. 
	- Command outputs with blank (' ') seperated will be parsed to each value of key value pairs of json messages. 
	- Command output can be more than one line, each line will be parsed accordingly.

Ex config.cong file:

uuid: <cpe_uuid>  
kafka_broker_host: localhost:9092  
kafka_topic: topic  
interval_sec: 5  
command[pwd]: pwd  
command[echo1]: echo "echo1"  
command[echo2]: echo "echo2"  
command[echo1][echo2]: echo "echo1 echo2"



cmdhandler's People

Contributors

mhkndgn avatar

Watchers

 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.