I'm trying to create a dashboard for a key instead of a value in my index. I might have the wrong index. I'd appreciate advice on this.
My kibana instance takes in test pass data. We use TestNG and when I set up my index, I just described a testng-results.xml file. There's a tiny bit of extra metadata so you know what testpass we're talking about, but other than that it's really just the testng-results.xml file is my whole index. It looks like so:
"results": {
"passed": {
"type": "integer"
},
"failed": {
"type": "integer",
},
"skipped": {
"type": "integer"
},
"start_time": {
"type": "date"
},
"duration_ms": {
"type": "long"
},
"test_classes": {
"name": {
"type": "string"
},
"test_methods": {
"name": {
"type": "string"
},
"status": {
"type": "string"
},
"signature": {
"type": "string"
},
"duration_ms": {
"type": "long"
},
"started_at": {
"type": "date"
}
}
}
Now when the data comes in, what I end up with is an index with all of the test names as children of "test_classes", but they're not values I can find at "test_classes", they're actually keys. So, for example, when I reference a single test, I would reference it like so:
doc['results.test_classes.com.blah.sometestclass.foo.status'].value
or:
params['_source']['results']['test_classes']['com.blah.sometestclass.foo']['status'].value
What I'd like to do is be able to create generic visualizations and a dashboard, and everything on the dashboard is unique to a single test. I can see how to do that if I could use a mustache operator in the spot where "com.blah.sometestclass.foo" is. But the test names ended up as keys in my index. And I can't figure out how I would use my index to create a generic dashboard that would display info about any test. I can see how I would make a static one, I could go one test at a time. But how would I make a generic one?