GithubHelp home page GithubHelp logo

fitzy101 / streammon Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 0.0 14.94 MB

A stream monitoring program that can execute arbitrary commands when defined matches are found. Supports multiple streams and configuration file specification. Useful for monitoring several log sources and notifying relevant parties when patterns are found.

License: MIT License

Go 98.51% Makefile 1.49%

streammon's People

Contributors

fitzy101 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

streammon's Issues

UNIX/TCP socket support

As well as watching files for streams, I'd like support to be added for watching UNIX or TCP sockets for
data coming through. The type of data supported could be restricted to UTF-8 encoded text at this stage.

Support for reloading config

Now that a configuration file can be supplied, it would be nice to be able to reload the configuration for streammon by sending it a HUP signal without stopping execution.

Restructure codebase.

Due to the structure of the packages it's difficult to gain acceptable test coverage for some of the logic. This issue is for restructuring the code to make it more easily integration and unit tested. I think that the bulk of the logic will need to be moved into the stream package which can then expose the stream data somehow.

The benefit of this is the package should be generally useful outside of the command line tool itself, and could be adopted into a wider variety of scenarios. I'd expect this is related to #6.

Improve test code coverage

Current coverage is a low 44%. This needs to improve drastically. It will probably require some refactoring, so it would be best to write some integration tests prior to doing this.

Arguments don't support spaces.

When defining arguments for the command, the arguments are automatically split into an array, for passing into the Exec function. This will then call the command with the args separately in the shell. I want the ability to quote an argument, so it can be executed as a whole argument instead of being split up. e.g.

cmd -a 'my argument for the flag'

instead of
cmd -a my argument for the flag

Configuration file support

I'd like to be able to give streammon a configuration file that lists several different 'streams' to monitor, with the same set of configuration that is available when running the program. This should be in a simple format.

The idea is to be able to run streammon as a daemon and have it listen across multiple specified streams and run the appropriate commands.

Design thoughts to follow.

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.