GitHub user nickwallen opened a pull request: https://github.com/apache/incubator-metron/pull/118
METRON-132 Monit Integration #### Changes ##### METRON-85 Addressed bug that caused Amazon EC2 deployment to always wait a fixed 5 minutes instead of continuing when the hosts are actually ready ##### METRON-132 Decouple Install and Start of System Components - Decouples the installation of components from the starting of them. A component can be installed, but not started. - Define which services need started as a property. - Enables different deployments to start more or fewer services. A development platform can start no services by default, while an Amazon EC2 cluster can start all services. - For example, to start only component related to YAF ingestion ``` services_to_start: - mysql - elasticsearch - enrichment - yaf-parser - yaf ``` ##### METRON-132 Monit Integration - Leverages Monit as a process watchdog to manage sensors, topologies, and core services. - Monit web interface exposed at http://hostname:2812 which can be used to start, stop, check status of any of the sensors or topologies. - When monitoring is enabled (on by default) if a process dies, it will be restarted. - Will not monitor a service that is not installed. - Monit command line tools simplify the process of managing Metron components For example, tired of the noise from your laptop fan when running Metron's 'single node vagrant'? This will quiet her down. Finally, peace and quiet! ``` monit stop all ``` Need to work on a single ingest feed? ``` monit start bro monit start bro-parser ``` Getting cold and need some heat? Start everything. ``` monit start all ``` Groups have also been defined to make things simpler. For example, start all parser topologies. ``` monit -g parsers start ``` Start all components required to consume and enrich Bro data. ``` monit -g bro start ``` What is running? ``` monit summary ``` - The post-deployment report for Amazon-EC2 provides links to Monit's web interface. ``` ok: [localhost] => { "Success": [ "Apache Metron deployed successfully", " Metron @ http://ec2-52-39-143-62.us-west-2.compute.amazonaws.com:5000", " Ambari @ http://ec2-52-39-4-93.us-west-2.compute.amazonaws.com:8080", " Sensor Status @ http://ec2-52-39-4-93.us-west-2.compute.amazonaws.com:2812", " Topology Status @ http://ec2-52-39-130-62.us-west-2.compute.amazonaws.com:2812", "For additional information, see https://metron.incubator.apache.org/'" ] } ``` #### Validation ##### Quick Dev Platform - Deploy - Open http://node1:2812 - Ensure that all of the following services are running and visible in the Monit web interface. - mysql, elasticsearch, pcap-service, metron-ui - yaf, snort, snort-logs, bro, pcap-replay - yaf-parser, bro-parser, snort-parser, enrichment - Login to node1 and validate the previous step by running `monit summary` - Run `monit stop all` - Ensure all services stopped on the host ##### Amazon EC2 - Deploy - Open http://ec2-host:2812 across each of the 10 nodes. - Ensure that all of the following services are running somewhere on the cluster. - mysql, elasticsearch, pcap-service, metron-ui - yaf, snort, snort-logs, bro, pcap-replay - yaf-parser, bro-parser, snort-parser, enrichment - Login to a host and validate the previous step by running `monit summary` - Run `monit stop all` on the same host - Ensure all services stopped on the host You can merge this pull request into a Git repository by running: $ git pull https://github.com/nickwallen/incubator-metron METRON-132 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-metron/pull/118.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #118 ---- commit f02229de7acee960ba4d932da0cfd8e0e8049cc2 Author: Nick Allen <n...@nickallen.org> Date: 2016-04-29T16:44:27Z METRON-132 Leverages Monit as a process watchdog to manage sensors, topologies, and core services. METRON-132 Decouples the installation of components from the starting of them. A component can be installed, but not started. METRON-85 Addressed bug that caused Amazon EC2 deployment to always wait a fixed 5 minutes instead of continuing when the hosts are actually ready ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---