pub struct Agent { /* private fields */ }Expand description
The agent fields contain the data about the software entity, if any, that collects, detects, or observes events on a host, or takes measurements on a host.
Examples include Beats. Agents may also run on observers. ECS agent.* fields shall be populated with details of the agent running on the host or observer where the event happened or the measurement was taken.
Implementations§
Source§impl Agent
impl Agent
Sourcepub fn get_version(&self) -> Option<&String>
pub fn get_version(&self) -> Option<&String>
Version of the agent.
Sourcepub fn set_version(&mut self, version_arg: String)
pub fn set_version(&mut self, version_arg: String)
Sourcepub fn get_build_original(&self) -> Option<&String>
pub fn get_build_original(&self) -> Option<&String>
Extended build information for the agent.
This field is intended to contain any build information that a data source may provide, no specific formatting is required.
Sourcepub fn set_build_original(&mut self, build_original_arg: String)
pub fn set_build_original(&mut self, build_original_arg: String)
Extended build information for the agent.
This field is intended to contain any build information that a data source may provide, no specific formatting is required.
§Example
metricbeat version 7.6.0 (amd64), libbeat 7.6.0 [6a23e8f8f30f5001ba344e4e54d8d9cb82cb107c built 2020-02-05 23:10:10 +0000 UTC]
Sourcepub fn get_name(&self) -> Option<&String>
pub fn get_name(&self) -> Option<&String>
Custom name of the agent.
This is a name that can be given to an agent. This can be helpful if for example two Filebeat instances are running on the same host but a human readable separation is needed on which Filebeat instance data is coming from.
Sourcepub fn set_name(&mut self, name_arg: String)
pub fn set_name(&mut self, name_arg: String)
Custom name of the agent.
This is a name that can be given to an agent. This can be helpful if for example two Filebeat instances are running on the same host but a human readable separation is needed on which Filebeat instance data is coming from.
§Example
foo
Sourcepub fn get_type(&self) -> Option<&String>
pub fn get_type(&self) -> Option<&String>
Type of the agent.
The agent type always stays the same and should be given by the agent used. In case of Filebeat the agent would always be Filebeat also if two Filebeat instances are run on the same machine.
Sourcepub fn set_type(&mut self, type_arg: String)
pub fn set_type(&mut self, type_arg: String)
Type of the agent.
The agent type always stays the same and should be given by the agent used. In case of Filebeat the agent would always be Filebeat also if two Filebeat instances are run on the same machine.
§Example
filebeat
Sourcepub fn get_id(&self) -> Option<&String>
pub fn get_id(&self) -> Option<&String>
Unique identifier of this agent (if one exists).
Example: For Beats this would be beat.id.
Sourcepub fn set_id(&mut self, id_arg: String)
pub fn set_id(&mut self, id_arg: String)
Unique identifier of this agent (if one exists).
Example: For Beats this would be beat.id.
§Example
8a4f500d
Sourcepub fn get_ephemeral_id(&self) -> Option<&String>
pub fn get_ephemeral_id(&self) -> Option<&String>
Ephemeral identifier of this agent (if one exists).
This id normally changes across restarts, but agent.id does not.
Sourcepub fn set_ephemeral_id(&mut self, ephemeral_id_arg: String)
pub fn set_ephemeral_id(&mut self, ephemeral_id_arg: String)
Ephemeral identifier of this agent (if one exists).
This id normally changes across restarts, but agent.id does not.
§Example
8a4f500f