-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Metricbeat] Migrate Ceph monitor_health to use ReporterV2 interface #11012
[Metricbeat] Migrate Ceph monitor_health to use ReporterV2 interface #11012
Conversation
2bab5b0
to
22500a7
Compare
d16c47d
to
d173fee
Compare
@@ -32,6 +32,7 @@ import ( | |||
|
|||
func TestFetchEventContents(t *testing.T) { | |||
absPath, err := filepath.Abs("../_meta/testdata/") | |||
assert.NoError(t, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Set to |
d173fee
to
dbe9a2b
Compare
I've added new testing framework in the last commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except the data.json part.
@@ -1,51 +0,0 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need / want this. To have one generated again you need to have a docs.json
in the testdata directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recovered data.json
original file with v2 events but I'm not fully understand how to work with docs.json
in testdata
. Do you mean to create an empty file there and the run with -generate
? At least I tried this and nothing happened 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs.json must contain an even and will generate the data.json
out of it when you run -generate
.
eba5443
to
da61c26
Compare
@@ -0,0 +1 @@ | |||
{"status": "OK", "output": {"detail": [], "timechecks": {"round_status": "finished", "epoch": 3, "round": 0}, "health": {"health_services": [{"mons": [{"last_updated": "2019-03-13 11:21:24.667025", "name": "26c372192772", "avail_percent": 82, "kb_total": 936145620, "kb_avail": 773013080, "health": "HEALTH_OK", "kb_used": 115509168, "store_stats": {"bytes_total": 4195407, "bytes_log": 4128768, "last_updated": "0.000000", "bytes_misc": 65552, "bytes_sst": 1087}}]}]}, "overall_status": "HEALTH_OK", "summary": []}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the suffix of this .plain
? Looks like json to me.
If you rename this to docs.json
and remove the suffix
config in config.yml
and then run -generate
, this should directly als update the data.json
file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sayden I see you went now with input.json
instead of docs.json
as recommended above to have the data.json
generated. Could you elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that you mean docs.json
like foo.json
and that name didn't matter 😅 In any case, input
or doc
, it won't generate a data.json
named file but a docs.json-expected.json
, right? Now I'm not sure if I'm missing something else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! Now I understand, I misunderstood completely at the beginning. Thanks for the clarification :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
jenkins, test this |
Error seems unrelated, merging |
Refer to #10774 for more info