{"action":"created","issue":{"url":"https://api.github.com/repos/ceph/ceph/issues/22502","repository_url":"https://api.github.com/repos/ceph/ceph","labels_url":"https://api.github.com/repos/ceph/ceph/issues/22502/labels{/name}","comments_url":"https://api.github.com/repos/ceph/ceph/issues/22502/comments","events_url":"https://api.github.com/repos/ceph/ceph/issues/22502/events","html_url":"https://github.com/ceph/ceph/pull/22502","id":331110555,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzOTIxODM0","number":22502,"title":"mgr/prometheus: health_status provide detail health info","user":{"login":"kungf","id":24663329,"node_id":"MDQ6VXNlcjI0NjYzMzI5","avatar_url":"https://avatars0.githubusercontent.com/u/24663329?v=4","gravatar_id":"","url":"https://api.github.com/users/kungf","html_url":"https://github.com/kungf","followers_url":"https://api.github.com/users/kungf/followers","following_url":"https://api.github.com/users/kungf/following{/other_user}","gists_url":"https://api.github.com/users/kungf/gists{/gist_id}","starred_url":"https://api.github.com/users/kungf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kungf/subscriptions","organizations_url":"https://api.github.com/users/kungf/orgs","repos_url":"https://api.github.com/users/kungf/repos","events_url":"https://api.github.com/users/kungf/events{/privacy}","received_events_url":"https://api.github.com/users/kungf/received_events","type":"User","site_admin":false},"labels":[{"id":454906768,"node_id":"MDU6TGFiZWw0NTQ5MDY3Njg=","url":"https://api.github.com/repos/ceph/ceph/labels/mgr","name":"mgr","color":"c2e0c6","default":false},{"id":340048817,"node_id":"MDU6TGFiZWwzNDAwNDg4MTc=","url":"https://api.github.com/repos/ceph/ceph/labels/needs-review","name":"needs-review","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-11T09:26:48Z","updated_at":"2018-06-15T09:53:57Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ceph/ceph/pulls/22502","html_url":"https://github.com/ceph/ceph/pull/22502","diff_url":"https://github.com/ceph/ceph/pull/22502.diff","patch_url":"https://github.com/ceph/ceph/pull/22502.patch"},"body":"now health_status only offer ceph HEALTH_* status, like:\r\n0:HEALTH_OK\r\n1:HEALTH_WARN\r\n2:HEALTH_ERR\r\n\r\nthat's may not enough, people always want to know why ceph warn in the grafana dashboard or in the mail which monitoring platform  sent.\r\n\r\nif one osd down without this patch, ceph_health_status metrics is:\r\n`ceph_health_status 1.0`\r\nbut after this patch, it is :\r\n`ceph_health_status{checks=\"{u'OSD_DOWN': {u'detail': [{u'message': u'osd.1 (root=default,host=wybld) is down'}], u'severity': u'HEALTH_WARN', u'summary': {u'message': u'1 osds down'}}, u'PG_DEGRADED': {u'detail': [{u'message': u'pg 2.0 is active+undersized+degraded, acting [2,0]'}, {u'message': u'pg 2.3 is active+undersized+degraded, acting [2,0]'}], u'severity': u'HEALTH_WARN', u'summary': {u'message': u'Degraded data redundancy: 7/63 objects degraded (11.111%), 2 pgs degraded'}}}\"} 1.0`\r\n\r\nSigned-off-by: kungf <yang.wang@easystack.cn>"},"comment":{"url":"https://api.github.com/repos/ceph/ceph/issues/comments/397572874","html_url":"https://github.com/ceph/ceph/pull/22502#issuecomment-397572874","issue_url":"https://api.github.com/repos/ceph/ceph/issues/22502","id":397572874,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzU3Mjg3NA==","user":{"login":"jcsp","id":944640,"node_id":"MDQ6VXNlcjk0NDY0MA==","avatar_url":"https://avatars3.githubusercontent.com/u/944640?v=4","gravatar_id":"","url":"https://api.github.com/users/jcsp","html_url":"https://github.com/jcsp","followers_url":"https://api.github.com/users/jcsp/followers","following_url":"https://api.github.com/users/jcsp/following{/other_user}","gists_url":"https://api.github.com/users/jcsp/gists{/gist_id}","starred_url":"https://api.github.com/users/jcsp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcsp/subscriptions","organizations_url":"https://api.github.com/users/jcsp/orgs","repos_url":"https://api.github.com/users/jcsp/repos","events_url":"https://api.github.com/users/jcsp/events{/privacy}","received_events_url":"https://api.github.com/users/jcsp/received_events","type":"User","site_admin":false},"created_at":"2018-06-15T09:53:57Z","updated_at":"2018-06-15T09:53:57Z","author_association":"CONTRIBUTOR","body":"I agree with @jan--f that labels are not the right place for extra detail like this.\r\n\r\nEach health check has a unique identifier (OSD_FULL, SLOW_OPS, etc): see http://docs.ceph.com/docs/mimic/rados/operations/health-checks/ .  The natural way to expose more detail about which health checks are failing would be to add a 0/1 prometheus metric for each of those health checks.  \r\n\r\nAs for adding string detail, I think prometheus just isn't the right place for that -- it does not have a string metric type, and afaik there is no right/efficient way to put strings in there."}}
{"actor":{"display_login":"jcsp"}}