-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ceph osd tree infomation to metricbeat (#5498)
Add osd_tree metricset
- Loading branch information
Showing
16 changed files
with
584 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//// | ||
This file is generated! See scripts/docs_collector.py | ||
//// | ||
|
||
[[metricbeat-metricset-ceph-osd_tree]] | ||
include::../../../module/ceph/osd_tree/_meta/docs.asciidoc[] | ||
|
||
|
||
==== Fields | ||
|
||
For a description of each field in the metricset, see the | ||
<<exported-fields-ceph,exported fields>> section. | ||
|
||
Here is an example document generated by this metricset: | ||
|
||
[source,json] | ||
---- | ||
include::../../../module/ceph/osd_tree/_meta/data.json[] | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
- module: ceph | ||
metricsets: ["cluster_disk", "cluster_health", "monitor_health", "pool_disk"] | ||
metricsets: ["cluster_disk", "cluster_health", "monitor_health", "pool_disk", "osd_tree"] | ||
period: 10s | ||
hosts: ["localhost:5000"] |
56 changes: 56 additions & 0 deletions
56
metricbeat/module/ceph/_meta/testdata/osd_tree_sample_response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"output": { | ||
"nodes": [ | ||
{ | ||
"children": [ | ||
-3 | ||
], | ||
"id": -1, | ||
"name": "default", | ||
"type": "root", | ||
"type_id": 10 | ||
}, | ||
{ | ||
"children": [ | ||
1, | ||
0 | ||
], | ||
"id": -3, | ||
"name": "ceph-mon1", | ||
"pool_weights": {}, | ||
"type": "host", | ||
"type_id": 1 | ||
}, | ||
{ | ||
"crush_weight": 0.048691, | ||
"depth": 2, | ||
"device_class": "hdd", | ||
"exists": 1, | ||
"id": 0, | ||
"name": "osd.0", | ||
"pool_weights": {}, | ||
"primary_affinity": 1.0, | ||
"reweight": 1.0, | ||
"status": "up", | ||
"type": "osd", | ||
"type_id": 0 | ||
}, | ||
{ | ||
"crush_weight": 0.048691, | ||
"depth": 2, | ||
"device_class": "hdd", | ||
"exists": 1, | ||
"id": 1, | ||
"name": "osd.1", | ||
"pool_weights": {}, | ||
"primary_affinity": 1.0, | ||
"reweight": 1.0, | ||
"status": "up", | ||
"type": "osd", | ||
"type_id": 0 | ||
} | ||
], | ||
"stray": [] | ||
}, | ||
"status": "OK" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"@timestamp": "2017-11-01T07:26:34.876Z", | ||
"@metadata": { | ||
"beat": "metricbeat", | ||
"type": "doc", | ||
"version": "7.0.0-alpha1" | ||
}, | ||
"ceph": { | ||
"osd_tree": { | ||
"status": "up", | ||
"name": "osd.0", | ||
"type": "osd", | ||
"primary_affinity": 1, | ||
"exists": true, | ||
"id": 0, | ||
"type_id": 0, | ||
"crush_weight": 0.048691, | ||
"device_class": "hdd", | ||
"reweight": 1, | ||
"father": "ceph-mon1", | ||
"depth": 2 | ||
} | ||
}, | ||
"metricset": { | ||
"rtt": 1331122, | ||
"module": "ceph", | ||
"name": "osd_tree", | ||
"host": "192.168.56.131:5000" | ||
}, | ||
"beat": { | ||
"hostname": "centos7gui", | ||
"version": "7.0.0-alpha1", | ||
"name": "centos7gui" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
=== Ceph cluster_health metricset | ||
|
||
This is the `osd_tree` metricset of the Ceph module. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
- name: osd_tree | ||
type: group | ||
description: > | ||
ceph osd tree info | ||
fields: | ||
- name: id | ||
type: long | ||
description: > | ||
osd or bucket node id | ||
- name: name | ||
type: text | ||
description: > | ||
osd or bucket node name | ||
- name: type | ||
type: keyword | ||
description: > | ||
osd or bucket node type, illegal type include osd, host, root etc. | ||
- name: type_id | ||
type: long | ||
description: > | ||
osd or bucket node typeID | ||
- name: children | ||
type: text | ||
description: > | ||
bucket children list, seperate by comma. | ||
- name: crush_weight | ||
type: float | ||
description: > | ||
osd node crush weight | ||
- name: depth | ||
type: long | ||
description: > | ||
node depth | ||
- name: exists | ||
type: boolean | ||
description: > | ||
is node still exist or not(1-yes, 0-no) | ||
- name: primary_affinity | ||
type: float | ||
description: > | ||
the weight of reading data from primary osd | ||
- name: reweight | ||
type: long | ||
description: > | ||
the reweight of osd | ||
- name: status | ||
type: keyword | ||
description: > | ||
status of osd, it should be up or down | ||
- name: device_class | ||
type: keyword | ||
description: > | ||
the device class of osd, like hdd, ssd etc. | ||
- name: father | ||
type: keyword | ||
description: > | ||
the parent node of this osd or bucket node |
Oops, something went wrong.