jmpsec / osctrl

Fast and efficient osquery management
https://osctrl.net
MIT License
387 stars 51 forks source link

Inconsistency for active nodes in API & UI #471

Open peterbogdan opened 3 months ago

peterbogdan commented 3 months ago

Hello

I see there are some inconsistency in Active nodes when getting them using the API:

{api}/api/v1//nodes/{env}/active/

Looking at the code it is querying for the field updated_at: https://github.com/jmpsec/osctrl/blob/main/nodes/nodes.go#L241

Maybe we can use the helper function from here to have better results: https://github.com/jmpsec/osctrl/blob/main/nodes/utils.go#L9