#[non_exhaustive]pub struct EventAttributes {Show 20 fields
pub aggregation_key: Option<String>,
pub date_happened: Option<i64>,
pub device_name: Option<String>,
pub duration: Option<i64>,
pub event_object: Option<String>,
pub evt: Option<Event>,
pub hostname: Option<String>,
pub monitor: Option<Option<MonitorType>>,
pub monitor_groups: Option<Option<Vec<String>>>,
pub monitor_id: Option<Option<i64>>,
pub priority: Option<Option<EventPriority>>,
pub related_event_id: Option<i64>,
pub service: Option<String>,
pub source_type_name: Option<String>,
pub sourcecategory: Option<String>,
pub status: Option<EventStatusType>,
pub tags: Option<Vec<String>>,
pub timestamp: Option<i64>,
pub title: Option<String>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}Expand description
Object description of attributes from your event.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.aggregation_key: Option<String>Aggregation key of the event.
date_happened: Option<i64>POSIX timestamp of the event. Must be sent as an integer (no quotation marks). Limited to events no older than 18 hours.
device_name: Option<String>A device name.
duration: Option<i64>The duration between the triggering of the event and its recovery in nanoseconds.
event_object: Option<String>The event title.
evt: Option<Event>The metadata associated with a request.
hostname: Option<String>Host name to associate with the event. Any tags associated with the host are also applied to this event.
monitor: Option<Option<MonitorType>>Attributes from the monitor that triggered the event.
monitor_groups: Option<Option<Vec<String>>>List of groups referred to in the event.
monitor_id: Option<Option<i64>>ID of the monitor that triggered the event. When an event isn’t related to a monitor, this field is empty.
priority: Option<Option<EventPriority>>The priority of the event’s monitor. For example, normal or low.
Related event ID.
service: Option<String>Service that triggered the event.
source_type_name: Option<String>The type of event being posted.
For example, nagios, hudson, jenkins, my_apps, chef, puppet, git or bitbucket.
The list of standard source attribute values is available here.
sourcecategory: Option<String>Identifier for the source of the event, such as a monitor alert, an externally-submitted event, or an integration.
status: Option<EventStatusType>If an alert event is enabled, its status is one of the following:
failure, error, warning, info, success, user_update,
recommendation, or snapshot.
A list of tags to apply to the event.
timestamp: Option<i64>POSIX timestamp of your event in milliseconds.
title: Option<String>The event title.
additional_properties: BTreeMap<String, Value>Implementations§
source§impl EventAttributes
impl EventAttributes
pub fn new() -> EventAttributes
pub fn aggregation_key(self, value: String) -> Self
pub fn date_happened(self, value: i64) -> Self
pub fn device_name(self, value: String) -> Self
pub fn duration(self, value: i64) -> Self
pub fn event_object(self, value: String) -> Self
pub fn evt(self, value: Event) -> Self
pub fn hostname(self, value: String) -> Self
pub fn monitor(self, value: Option<MonitorType>) -> Self
pub fn monitor_groups(self, value: Option<Vec<String>>) -> Self
pub fn monitor_id(self, value: Option<i64>) -> Self
pub fn priority(self, value: Option<EventPriority>) -> Self
pub fn service(self, value: String) -> Self
pub fn source_type_name(self, value: String) -> Self
pub fn sourcecategory(self, value: String) -> Self
pub fn status(self, value: EventStatusType) -> Self
pub fn timestamp(self, value: i64) -> Self
pub fn title(self, value: String) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
source§impl Clone for EventAttributes
impl Clone for EventAttributes
source§fn clone(&self) -> EventAttributes
fn clone(&self) -> EventAttributes
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for EventAttributes
impl Debug for EventAttributes
source§impl Default for EventAttributes
impl Default for EventAttributes
source§impl<'de> Deserialize<'de> for EventAttributes
impl<'de> Deserialize<'de> for EventAttributes
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
source§impl PartialEq for EventAttributes
impl PartialEq for EventAttributes
source§impl Serialize for EventAttributes
impl Serialize for EventAttributes
impl StructuralPartialEq for EventAttributes
Auto Trait Implementations§
impl Freeze for EventAttributes
impl RefUnwindSafe for EventAttributes
impl Send for EventAttributes
impl Sync for EventAttributes
impl Unpin for EventAttributes
impl UnwindSafe for EventAttributes
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)