pub struct Related { /* private fields */ }Expand description
This field set is meant to facilitate pivoting around a piece of data.
Some pieces of information can be seen in many places in an ECS event. To facilitate searching for them, store an array of all seen values to their corresponding field in related..
A concrete example is IP addresses, which can be under host, observer, source, destination, client, server, and network.forwarded_ip. If you append all IPs to related.ip, you can then search for a given IP trivially, no matter where it appeared, by querying related.ip:192.0.2.15.
Implementations§
Source§impl Related
impl Related
Sourcepub fn get_user(&self) -> &Vec<String>
pub fn get_user(&self) -> &Vec<String>
All the user names or other user identifiers seen on the event.
Sourcepub fn add_user(&mut self, user_arg: String)
pub fn add_user(&mut self, user_arg: String)
All the user names or other user identifiers seen on the event.
Sourcepub fn get_hash(&self) -> &Vec<String>
pub fn get_hash(&self) -> &Vec<String>
All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you’re unsure what the hash algorithm is (and therefore which key name to search).
Sourcepub fn add_hash(&mut self, hash_arg: String)
pub fn add_hash(&mut self, hash_arg: String)
All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you’re unsure what the hash algorithm is (and therefore which key name to search).