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.
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.
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.
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.
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.
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.
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.
This was broken in implementing #7. If the string had a mix of quoted and string separated arguments, the order of the arguments was is not preserved when constructing the arguments.