My problem stems from how the last value functions, where it pulls the last value from the previous event. While I want it to do that, I also want to have the events filtered by another value (ex: multiple hosts have events in the system, I want the last value that each event pulls for calculation to be from the same host).
To explain how I've gotten to this point:
I'm looking at a series of data which indicates whether or not a drive is encrypted on a specific machine. The data comes in as the following:
Time;client1;volume1;Y (encryption status yes or no)
I use the transaction command so that all the events are grouped by client, however, it is spanned since these checks are run as a batch job at a set interval and I wish to know if the encryption status has changed since the last check.
I then insert a surrogate variable which says whether or not all drives on the system are encrypted (So I do not need to work with a multi value field).
At the end of the day I can get something like:
Time1;client1;volume1,volume2;Y,Y;1 (1 for full encryption, 0 if not)
I'm unable to figure out a successful way to use the last function so that I can grab the last value from a specific client at a different time instead of just the value of the client which was listed just before it at the same time.
I attempted sorting by client then using it with no success.
Would you all recommend I try doing another transaction (this where the span length is much larger or even infinite)?
Is there a special way to use the event stats command do perform this kind of action?
After doing some research, it seems like a lot of the solutions revolve around filtering out all the data apart from a specific client and doing it, however, my end goal involves creating a chart which can show the trend of the number of machines becoming fully encrypted or the number of machines where the drives are being unencrypted, so I'm trying to include all machines in this dataset.