Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ceph health messages #31

Open
taam opened this issue Nov 21, 2021 · 2 comments
Open

Ceph health messages #31

taam opened this issue Nov 21, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@taam
Copy link
Contributor

taam commented Nov 21, 2021

For the ceph health check it would be nice to see, which checks are failing. Just as an starting idea, locally I hacked in the following lines at the end of the check_ceph_health function (but my python knowledge is rather limited):

        messages = ", ".join(v['summary']['message'] for k, v in ceph_health.get('checks', {}).items())
        if len(messages) > 0:
            self.check_message += ": " + messages

(Technically it would probably be better to put these details in separate lines.)

@nbuchwitz
Copy link
Owner

I no longer have a ceph cluster at hand to test this check. How does the output look like on your system? Maybe you can provide same example data directly from the json API, so I can test with?

@nbuchwitz nbuchwitz added the enhancement New feature or request label Jan 1, 2022
@nbuchwitz nbuchwitz self-assigned this Jan 1, 2022
@taam
Copy link
Contributor Author

taam commented Jan 3, 2022

Here are some examples (output from pvesh, Proxmox 6.4):

   "health" : {
      "checks" : {},
      "status" : "HEALTH_OK"
   },
   "health" : {
      "checks" : {
         "POOL_SCRUB_FLAGS" : {
            "detail" : [
               {
                  "message" : "Pool foo has noscrub flag"
               },
               {
                  "message" : "Pool foo has nodeep-scrub flag"
               }
            ],
            "severity" : "HEALTH_OK",
            "summary" : {
               "message" : "Some pool(s) have the noscrub, nodeep-scrub flag(s) set"
            }
         }
      },
      "status" : "HEALTH_OK"
   },
   "health" : {
      "checks" : {
         "OSDMAP_FLAGS" : {
            "detail" : [],
            "severity" : "HEALTH_WARN",
            "summary" : {
               "message" : "nobackfill,norebalance,norecover flag(s) set"
            }
         },
         "POOL_SCRUB_FLAGS" : {
            "detail" : [
               {
                  "message" : "Pool foo has noscrub flag"
               },
               {
                  "message" : "Pool foo has nodeep-scrub flag"
               }
            ],
            "severity" : "HEALTH_OK",
            "summary" : {
               "message" : "Some pool(s) have the noscrub, nodeep-scrub flag(s) set"
            }
         }
      },
      "status" : "HEALTH_WARN"
   },
   "health" : {
      "checks" : {
         "PG_DEGRADED" : {
            "detail" : [
               {
                  "message" : "pg 1.0 is stuck undersized for 123.456789, current state active+recovering+undersized+degraded+remapped, last acting [0,2]"
               },
               {
                  "message" : "pg 1.1 is stuck undersized for 123.456789, current state active+recovery_wait+undersized+degraded+remapped, last acting [1,2]"
               }
            ],
            "severity" : "HEALTH_WARN",
            "summary" : {
               "message" : "Degraded data redundancy: 12345/123456789 objects degraded (0.123%), 4 pgs degraded, 5 pgs undersized"
            }
         }
      },
      "status" : "HEALTH_WARN"
   },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants