From f3c4ef3a7bd2dec2c1a947e10a99d3cdd26d533c Mon Sep 17 00:00:00 2001 From: Nick Allen Date: Mon, 23 Jan 2017 09:51:27 -0500 Subject: [PATCH] METRON-670 Monit Incorrectly Reports Status --- metron-deployment/roles/monit/defaults/main.yml | 1 + .../roles/monit/templates/monit/enrichment.monit | 2 +- .../monit/templates/monit/indexing-elasticsearch.monit | 2 +- .../roles/monit/templates/monit/indexing-solr.monit | 2 +- .../roles/monit/templates/monit/parsers.monit | 8 ++++---- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/metron-deployment/roles/monit/defaults/main.yml b/metron-deployment/roles/monit/defaults/main.yml index 608be3817e..8583fd4c7a 100644 --- a/metron-deployment/roles/monit/defaults/main.yml +++ b/metron-deployment/roles/monit/defaults/main.yml @@ -21,6 +21,7 @@ monit_user: admin monit_pass: monit topology_start_timeout: 120 topology_stop_timeout: 120 +topology_status_timeout: 60 bro_pid_file: /usr/local/bro/spool/bro/.pid elasticsearch_pid_file: /var/run/elasticsearch/elasticsearch.pid diff --git a/metron-deployment/roles/monit/templates/monit/enrichment.monit b/metron-deployment/roles/monit/templates/monit/enrichment.monit index c1c61d1728..420e3b3a89 100644 --- a/metron-deployment/roles/monit/templates/monit/enrichment.monit +++ b/metron-deployment/roles/monit/templates/monit/enrichment.monit @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -check program enrichment with path "{{ monit_home }}/status_enrichment_topology.sh" +check program enrichment with path "{{ monit_home }}/status_enrichment_topology.sh" with timeout {{ topology_status_timeout }} seconds start program "{{ metron_directory }}/bin/start_enrichment_topology.sh" with timeout {{ topology_start_timeout }} seconds stop program "{{ monit_home }}/stop_enrichment_topology.sh" with timeout {{ topology_stop_timeout }} seconds if status != 0 then restart diff --git a/metron-deployment/roles/monit/templates/monit/indexing-elasticsearch.monit b/metron-deployment/roles/monit/templates/monit/indexing-elasticsearch.monit index af60f44234..a9670a66e1 100644 --- a/metron-deployment/roles/monit/templates/monit/indexing-elasticsearch.monit +++ b/metron-deployment/roles/monit/templates/monit/indexing-elasticsearch.monit @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -check program indexing with path "{{ monit_home }}/status_indexing_topology.sh" +check program indexing with path "{{ monit_home }}/status_indexing_topology.sh" with timeout {{ topology_status_timeout }} seconds start program "{{ metron_directory }}/bin/start_elasticsearch_topology.sh" with timeout {{ topology_start_timeout }} seconds stop program "{{ monit_home }}/stop_indexing_topology.sh" with timeout {{ topology_stop_timeout }} seconds if status != 0 then restart diff --git a/metron-deployment/roles/monit/templates/monit/indexing-solr.monit b/metron-deployment/roles/monit/templates/monit/indexing-solr.monit index 6c7a508cc0..8990cbbe11 100644 --- a/metron-deployment/roles/monit/templates/monit/indexing-solr.monit +++ b/metron-deployment/roles/monit/templates/monit/indexing-solr.monit @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -check program indexing with path "{{ monit_home }}/status_indexing_topology.sh" +check program indexing with path "{{ monit_home }}/status_indexing_topology.sh" with timeout {{ topology_status_timeout }} seconds start program "{{ metron_directory }}/bin/start_solr_topology.sh" with timeout {{ topology_start_timeout }} seconds stop program "{{ monit_home }}/stop_indexing_topology.sh" with timeout {{ topology_stop_timeout }} seconds if status != 0 then restart diff --git a/metron-deployment/roles/monit/templates/monit/parsers.monit b/metron-deployment/roles/monit/templates/monit/parsers.monit index 1eff8b601a..b036bd7aab 100644 --- a/metron-deployment/roles/monit/templates/monit/parsers.monit +++ b/metron-deployment/roles/monit/templates/monit/parsers.monit @@ -16,7 +16,7 @@ # limitations under the License. # -check program pcap-parser with path "{{ monit_home }}/status_pcap_topology.sh" +check program pcap-parser with path "{{ monit_home }}/status_pcap_topology.sh" with timeout {{ topology_status_timeout }} seconds start program "{{ metron_directory }}/bin/start_pcap_topology.sh" with timeout {{ topology_start_timeout }} seconds stop program "{{ monit_home }}/stop_pcap_topology.sh" with timeout {{ topology_stop_timeout }} seconds if status != 0 then restart @@ -24,7 +24,7 @@ check program pcap-parser with path "{{ monit_home }}/status_pcap_topology.sh" group parsers group metron -check program yaf-parser with path "{{ monit_home }}/status_yaf_topology.sh" +check program yaf-parser with path "{{ monit_home }}/status_yaf_topology.sh" with timeout {{ topology_status_timeout }} seconds start program "{{ monit_home }}/start_yaf_topology.sh" with timeout {{ topology_start_timeout }} seconds stop program "{{ monit_home }}/stop_yaf_topology.sh" with timeout {{ topology_stop_timeout }} seconds if status != 0 then restart @@ -32,7 +32,7 @@ check program yaf-parser with path "{{ monit_home }}/status_yaf_topology.sh" group parsers group metron -check program bro-parser with path "{{ monit_home }}/status_bro_topology.sh" +check program bro-parser with path "{{ monit_home }}/status_bro_topology.sh" with timeout {{ topology_status_timeout }} seconds start program "{{ monit_home }}/start_bro_topology.sh" with timeout {{ topology_start_timeout }} seconds stop program "{{ monit_home }}/stop_bro_topology.sh" with timeout {{ topology_stop_timeout }} seconds if status != 0 then restart @@ -40,7 +40,7 @@ check program bro-parser with path "{{ monit_home }}/status_bro_topology.sh" group parsers group metron -check program snort-parser with path "{{ monit_home }}/status_snort_topology.sh" +check program snort-parser with path "{{ monit_home }}/status_snort_topology.sh" with timeout {{ topology_status_timeout }} seconds start program "{{ monit_home }}/start_snort_topology.sh" with timeout {{ topology_start_timeout }} seconds stop program "{{ monit_home }}/stop_snort_topology.sh" with timeout {{ topology_stop_timeout }} seconds if status != 0 then restart