alerts

package
v3.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AffectedDevicesResponse

type AffectedDevicesResponse struct {
	Devices    []Device `json:"devices"`
	NextOffset string   `json:"next_offset"`
}

func GetAffectedDevices

func GetAffectedDevices(ctx context.Context, service *services.Service, alertID string, filters common.GetFromToFilters) (*AffectedDevicesResponse, *http.Response, error)

GetAffectedDevices retrieves the affected devices for a specific alert by ID

type Alert

type Alert struct {
	ID              int           `json:"id"`
	RuleName        string        `json:"rule_name,omitempty"`
	Severity        string        `json:"severity,omitempty"`
	AlertType       string        `json:"alert_type,omitempty"`
	AlertStatus     string        `json:"alert_status,omitempty"`
	NumGeolocations int           `json:"num_geolocations,omitempty"`
	NumDevices      int           `json:"num_devices,omitempty"`
	StartedOn       int           `json:"started_on,omitempty"`
	EndedOn         int           `json:"ended_on,omitempty"`
	Application     Application   `json:"application,omitempty"`
	Departments     []Department  `json:"departments,omitempty"`
	Locations       []Location    `json:"locations,omitempty"`
	Geolocations    []Geolocation `json:"geolocations,omitempty"`
}

func GetAlert

func GetAlert(ctx context.Context, service *services.Service, alertID string) (*Alert, *http.Response, error)

GetAlert retrieves a specific alert by ID

type AlertsResponse

type AlertsResponse struct {
	Alerts     []Alert `json:"alerts"`
	NextOffset string  `json:"next_offset"`
}

func GetHistoricalAlerts

func GetHistoricalAlerts(ctx context.Context, service *services.Service, filters common.GetFromToFilters) (*AlertsResponse, *http.Response, error)

GetHistoricalAlerts retrieves historical alerts Gets the list of alert history rules defined across an organization. All alert history rules are returned if the search filter is not specified. The default is set to the previous 2 hours. Alert history rules have an Ended On date. The Ended On date is used to pull alerts in conjunction with the provided filters. Cannot exceed the 14-day time range limit for alert rules.

func GetOngoingAlerts

func GetOngoingAlerts(ctx context.Context, service *services.Service, filters common.GetFromToFilters) (*AlertsResponse, *http.Response, error)

GetOngoingAlerts retrieves ongoing alerts with optional filters

type Application

type Application struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

type Department

type Department struct {
	ID         int    `json:"id"`
	Name       string `json:"name"`
	NumDevices int    `json:"num_devices"`
}

type Device

type Device struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	UserID    int    `json:"userid"`
	UserName  string `json:"userName"`
	UserEmail string `json:"userEmail"`
}

type Geolocation

type Geolocation struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	NumDevices int    `json:"num_devices"`
}

type Group

type Group struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

type Location

type Location struct {
	ID         int     `json:"id"`
	Name       string  `json:"name"`
	NumDevices int     `json:"num_devices"`
	Groups     []Group `json:"groups"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL