serial_number would have already been extracted, too. You do whatever is needed. But I do not see a chart of two values() function useful in this case. Maybe you mean to have something like _time E21 E25 2024-07-15 51A81FC 51A86FC 2024-07-16 51A81FC In other words, get serial_numbers according to error_code? All you need is something like <your search> "ErrorCode(*)"
| rex field=message "ErrorCode\((?<error_code>[^\)]+)"
| timechart span=1d values(serial_number) by error_code Here, I propose that you restrict events to those containing error code in index search rather than in another search line. Or, if you want to group error_codes on individual serial_number, like _time 51A81FC 51A86FC 2024-07-15 E21 E21 2024-07-16 E25 For this, do <your search> "ErrorCode(*)"
| rex field=message "ErrorCode\((?<error_code>[^\)]+)"
| timechart span=1d values(error_code) by serial_number Does this make sense? Here is an emulation to get the above results. Play with it and compare with real data | makeresults
| eval data = mvappend("{\"time\": \"2024-07-15\", \"message\":\"gimlet::hardware_controller: State { target: Idle, state: Idle, cavity: 42400, fuel: 0, shutdown: None, errors: ErrorCode(E21)}\", \"serial_number\": \"51A86FC\"}",
"{\"time\": \"2024-07-15\", \"message\":\"gimlet::hardware_controller: State { target: Idle, state: Idle, cavity: 42400, fuel: 0, shutdown: None, errors: ErrorCode(E21)}\", \"serial_number\": \"51A81FC\"}",
"{\"time\": \"2024-07-16\", \"message\":\"gimlet::someotherstuff: State { target: whatever, state: whaever, some other messages, errors: ErrorCode(E25)}\", \"serial_number\": \"51A81FC\"}")
| mvexpand data
| rename data as _raw
| spath
| eval _time = strptime(time, "%F")
``` the above emulates
<your search> "ErrorCode(*)"
```
... View more