Hello everyone, first time poster here. Please make me aware of any mishaps I might have done.
I'll use a specific usecase to illustrate my question, but I would love a more general answer as I just got into Kibana.
Elastic's version is 7.17.7 (rip Timelions).
Context
I work on a Spark monitoring library. During a job's life time, this library sends message to Elasticsearch containing some useful variables, and are then displayed in a Kibana Dashboard.
Below is an example of a message concerning a spark executors sent when it dies :
{
"timestamp" : 1650966972460, // mapped as date
"sourceAppName" : "RandomTestApp", // keyword
"sourceAppId" : "local-1650966959680", // keyword
"sourceAppLabel" : "RandomTestApp#2022-04-26_11:55:34",
"dataClass" : "ExecutorEntry", // keyword
"executorEntry" : {
"executorId" : "local-1650966959680:driver",
"executorHost" : "localhost", // keyword
"totalCores" : 8, // int
"executorStartTime" : 1650966959724, // mapped as date
"executorEndTime" : 1650966972460, // mapped as date
"removedReason" : "Application ended.", // str
"totalExecutorRunTime" : 14394, // ms
"totalExecutorCpuTime" : 4888, // ms
"totalExecutorBytesRead" : 37608, // B
"totalExecutorBytesWritten" : 0, // B
"executorPeakMemory" : 1310720, // B
"executorAverageMemory" : 818152, // B
"executorNetAllocatedMemory" : 2000000000, // B
"executorGrossAllocatedMemory" : 3000000000, // B
"executorStatus" : -1 // 1 for ACTIVE, -1 for INACTIVE
}
}
Questions
Now for the Kibana question :
Let's say I want to see the number of equivalent cores per application on a date histogram.
In my mind, the best result would answer to the following procedure :
For every timestamp t_n, most likely one per 15min :
- Query every executorEntry where executorEntry.executorStartTime <= t_n and executorEntry.executorEndTime >= t_n
- Get executorEntry/totalCores from them
- Break down (aggregate) per sourceAppLabel
- Show the date histogram as bars stacked.
Could this be done via the Lens function ? How so ? Is there something like the Expression Editor in Canvas that could be included in a Dashboard environment ?
I though of timelions that could provide a language to do just that, but I heard they have been deprecated. What would replace them ? I think Vega might be overkill, but perhaps I am just scared of the barrier of entry. Would love some pointers.
I know the question is quite open ended as I am pretty new with the technology, so I'll be happy to answer anything that might be of use. Feel free to recommend good practices too !