aerogear / aerogear-digger-installer

Ansible role for installing AeroGear Digger on OpenShift
https://aerogear.org/
Apache License 2.0
4 stars 17 forks source link

Nagios check ignore unknown #93

Closed laurafitzgerald closed 7 years ago

laurafitzgerald commented 7 years ago

What Update the nagios image to a v1.0 Change check on cluster up to ignore unknown

Why On MAC(and possibly Windows) using oc cluster up the cgroups checks are not working which means that the installer is failing. Ignore cases where unknown are returned

@PhilipGough

laurafitzgerald commented 7 years ago

@aliok wdyt about getting this one merged? Did it resolve the issue you saw earlier with the nagios checks failing?

aliok commented 7 years ago

@laurafitzgerald I haven't tried yet. the day was over :) gonna check today

aliok commented 7 years ago

@laurafitzgerald ok, gave it an initial try. I think there's a reverse if condition.

Other than that, in my examples with oc cluster up, I see there are warnings related to disk space :


Current Status: | WARNING   (for 0d 0h 10m 31s)
-- | --
Status Information: | Checked 21 volumes (0 critical, 6 warning)
WARN: android-sdk-1-dqth5:android-sdk:/ - bytes used: 82%, inodes used: 32%
WARN: android-sdk-1-dqth5:android-sdk:/etc/hosts - bytes used: 82%, inodes used: 32%
WARN: jenkins-1-hr7nc:jenkins:/ - bytes used: 82%, inodes used: 32%
WARN: jenkins-1-hr7nc:jenkins:/etc/hosts - bytes used: 82%, inodes used: 32%
WARN: nagios-1-8vwxt:nagios:/ - bytes used: 82%, inodes used: 32%
WARN: nagios-1-8vwxt:nagios:/etc/hosts - bytes used: 82%, inodes used: 32%

I think none of these makes sense as I am in an experimenting environment. So, I think we should also ignore "warning" when target==cluster_up.

What do you think?

aliok commented 7 years ago

@laurafitzgerald I think the code block should be like this:

-
  name: "Verify Nagios dashboard is green, fail otherwise"
  shell: echo {{ item }}
  register: nagios_dashboard
  with_items: "{{ nagios_result.stdout_lines }}"
  failed_when:
    - "'critical' in nagios_dashboard.stdout or 'warning' in nagios_dashboard.stdout or 'unknown' in nagios_dashboard.stdout "
  changed_when: False
  when: "target is undefined or (target is defined and 'cluster' not in target)"

-
  name: "Verify Nagios dashboard is green, fail otherwise"
  shell: echo {{ item }}
  register: nagios_dashboard
  with_items: "{{ nagios_result.stdout_lines }}"
  failed_when:
    - "'critical' in nagios_dashboard.stdout"
  changed_when: False
  when: "target is defined and 'cluster' in target"
laurafitzgerald commented 7 years ago

@aliok made the changes you suggested. Can you verify this new change is working for you.

aliok commented 7 years ago

@laurafitzgerald merging it...