This is an automated email from the ASF dual-hosted git repository.

kwmonroe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git


The following commit(s) were added to refs/heads/master by this push:
     new 2d3e76d  BIGTOP-3268: zookeeper charm: nagios config opts
2d3e76d is described below

commit 2d3e76dafd1d71c4add40506f5c5ccbd2da14891
Author: John Losito <[email protected]>
AuthorDate: Tue Oct 29 10:19:37 2019 -0400

    BIGTOP-3268: zookeeper charm: nagios config opts
    
    Closes #556
    
    Signed-off-by: John Losito <[email protected]>
    Signed-off-by: Kevin W Monroe <[email protected]>
---
 .../charm/zookeeper/layer-zookeeper/config.yaml    | 70 ++++++++++++++++++++++
 .../layer-zookeeper/reactive/zookeeper.py          | 28 ++++-----
 2 files changed, 84 insertions(+), 14 deletions(-)

diff --git a/bigtop-packages/src/charm/zookeeper/layer-zookeeper/config.yaml 
b/bigtop-packages/src/charm/zookeeper/layer-zookeeper/config.yaml
index 63f566c..9cfabe6 100644
--- a/bigtop-packages/src/charm/zookeeper/layer-zookeeper/config.yaml
+++ b/bigtop-packages/src/charm/zookeeper/layer-zookeeper/config.yaml
@@ -39,3 +39,73 @@ options:
     description: |
       A comma-separated list of nagios servicegroups.
       If left empty, the nagios_context will be used as the servicegroup
+  open_file_descriptor_count_warn:
+    default: 500
+    type: int
+    description: |
+      The allowed open file descriptor count before a warning alert is 
triggered.
+  open_file_descriptor_count_crit:
+    default: 800
+    type: int
+    description: |
+      The allowed open file descriptor count before a critical alert is 
triggered.
+  ephemerals_count_warn:
+    default: 10000
+    type: int
+    description: |
+      The allowed ephemerals count before a warning alert is triggered.
+  ephemerals_count_crit:
+    default: 100000
+    type: int
+    description: |
+      The allowed ephemerals count before a critical alert is triggered.
+  avg_latency_warn:
+    default: 500
+    type: int
+    description: |
+      The allowed average latency before a warning alert is triggered.
+  avg_latency_crit:
+    default: 1000
+    type: int
+    description: |
+      The allowed average latency before a critical alert is triggered.
+  max_latency_warn:
+    default: 1000
+    type: int
+    description: |
+      The allowed maximum latency before a warning alert is triggered.
+  max_latency_crit:
+    default: 2000
+    type: int
+    description: |
+      The allowed maximum latency before a critical alert is triggered.
+  min_latency_warn:
+    default: 500
+    type: int
+    description: |
+      The allowed minimum latency before a warning alert is triggered.
+  min_latency_crit:
+    default: 1000
+    type: int
+    description: |
+      The allowed minimum latency before a critical alert is triggered.
+  outstanding_requests_warn:
+    default: 20
+    type: int
+    description: |
+      The allowed outstanding requests before a warning alert is triggered.
+  outstanding_requests_crit:
+    default: 50
+    type: int
+    description: |
+      The allowed outstanding requests before a critical alert is triggered.
+  watch_count_warn:
+    default: 100
+    type: int
+    description: |
+      The allowed watch count before a warning alert is triggered.
+  watch_count_crit:
+    default: 500
+    type: int
+    description: |
+      The allowed watch count before a critical alert is triggered.
diff --git 
a/bigtop-packages/src/charm/zookeeper/layer-zookeeper/reactive/zookeeper.py 
b/bigtop-packages/src/charm/zookeeper/layer-zookeeper/reactive/zookeeper.py
index 5e0741d..fe5de90 100644
--- a/bigtop-packages/src/charm/zookeeper/layer-zookeeper/reactive/zookeeper.py
+++ b/bigtop-packages/src/charm/zookeeper/layer-zookeeper/reactive/zookeeper.py
@@ -49,44 +49,44 @@ def setup_nagios(nagios):
         {
             'name': 'zk_open_file_descriptor_coun',
             'description': 'ZK_Open_File_Descriptors_Count',
-            'warn': 500,
-            'crit': 800
+            'warn': config['open_file_descriptor_count_warn'],
+            'crit': config['open_file_descriptor_count_crit']
         },
         {
             'name': 'zk_ephemerals_count',
             'description': 'ZK_Ephemerals_Count',
-            'warn': 10000,
-            'crit': 100000
+            'warn': config['ephemerals_count_warn'],
+            'crit': config['ephemerals_count_crit']
         },
         {
             'name': 'zk_avg_latency',
             'description': 'ZK_Avg_Latency',
-            'warn': 500,
-            'crit': 1000
+            'warn': config['avg_latency_warn'],
+            'crit': config['avg_latency_crit']
         },
         {
             'name': 'zk_max_latency',
             'description': 'ZK_Max_Latency',
-            'warn': 1000,
-            'crit': 2000
+            'warn': config['max_latency_warn'],
+            'crit': config['max_latency_crit']
         },
         {
             'name': 'zk_min_latency',
             'description': 'ZK_Min_Latency',
-            'warn': 500,
-            'crit': 1000
+            'warn': config['min_latency_warn'],
+            'crit': config['min_latency_crit']
         },
         {
             'name': 'zk_outstanding_requests',
             'description': 'ZK_Outstanding_Requests',
-            'warn': 20,
-            'crit': 50
+            'warn': config['outstanding_requests_warn'],
+            'crit': config['outstanding_requests_crit']
         },
         {
             'name': 'zk_watch_count',
             'description': 'ZK_Watch_Count',
-            'warn': 100,
-            'crit': 500
+            'warn': config['watch_count_warn'],
+            'crit': config['watch_count_crit']
         },
     ]
     check_cmd = ['/usr/local/lib/nagios/plugins/check_zookeeper.py',

Reply via email to