Hi again,
I'm still not completely clear how your data looks like in the index pattern. How does the single document looks like? I've used devtools to mock a simple version of your index, is it something about the lines?
DELETE ti1
POST ti1/_doc
{
"release": "15.4.001",
"server_name": "App01",
"cpu_avg": 55.56
}
POST ti1/_doc
{
"release": "15.4.001",
"server_name": "App02",
"cpu_avg": 34.12
}
POST ti1/_doc
{
"release": "16.1.003",
"server_name": "App01",
"cpu_avg": 71.04
}
POST ti1/_doc
{
"release": "16.1.003",
"server_name": "App02",
"cpu_avg": 26.82
}
How, about the difference – if you want to to only display the two bars or a line (cpu average for both releases), here's the way to go – filters aggregation:
If it's crucial to display the difference of the two, it will be a bit more complicated because derivatives are only available to use on date histogram or histogram. So, firstly we need to create some numeric indicator to represent the releases as numbers. I've assigned 0 to 15.4.001 and 1 to 16.1.003 and created a scripted field release_sequence_number
:
Here's the script to copy, just modify the name:
if (doc['release.keyword'].value == "15.4.001"){
return 0;
}
if (doc['release.keyword'].value == "16.1.003" ){
return 1;
}
Then, In my visualization I've created the following visualization that checks change value for both App1 and App2:
Config:
Preview:
Let me know if there's anything else I can help with.