Safe Haskell | None |
---|---|
Language | Haskell2010 |
The alerta API allows you to query and modify
- Alerts
- Environments
- Services
- Blackouts
- Heartbeats
- API Keys
- Users
- Customers
- createAlert :: Maybe ApiKey -> Alert -> ClientM CreateAlertResp
- getAlert :: Maybe ApiKey -> UUID -> ClientM AlertResp
- deleteAlert :: Maybe ApiKey -> UUID -> ClientM Resp
- setAlertStatus :: Maybe ApiKey -> UUID -> StatusChange -> ClientM Resp
- tagAlert :: Maybe ApiKey -> UUID -> Tags -> ClientM Resp
- untagAlert :: Maybe ApiKey -> UUID -> Tags -> ClientM Resp
- updateAlertAttributes :: Maybe ApiKey -> UUID -> Attributes -> ClientM Resp
- listAlerts :: Maybe ApiKey -> Maybe QueryString -> [UUID] -> IsRepeat -> [FieldQuery] -> Maybe [AlertAttr] -> Maybe [AlertAttr] -> Maybe ShouldReverse -> [AlertAttr] -> Maybe PageNo -> Maybe Limit -> ClientM AlertsResp
- alertHistory :: Maybe ApiKey -> Maybe QueryString -> [UUID] -> IsRepeat -> [FieldQuery] -> Maybe Limit -> ClientM AlertHistoryResp
- countAlerts :: Maybe ApiKey -> Maybe QueryString -> [UUID] -> IsRepeat -> [FieldQuery] -> ClientM AlertCountResp
- top10 :: Maybe ApiKey -> Maybe QueryString -> [UUID] -> IsRepeat -> [FieldQuery] -> Maybe AlertAttr -> ClientM Top10Resp
- flappingTop10 :: Maybe ApiKey -> Maybe QueryString -> [UUID] -> IsRepeat -> [FieldQuery] -> Maybe AlertAttr -> ClientM Top10Resp
- listEnvironments :: Maybe ApiKey -> Maybe QueryString -> [UUID] -> IsRepeat -> [FieldQuery] -> Maybe Limit -> ClientM EnvironmentsResp
- listServices :: Maybe ApiKey -> Maybe QueryString -> [UUID] -> IsRepeat -> [FieldQuery] -> Maybe Limit -> ClientM ServicesResp
- createBlackout :: Maybe ApiKey -> Blackout -> ClientM BlackoutResp
- deleteBlackout :: Maybe ApiKey -> UUID -> ClientM Resp
- listBlackouts :: Maybe ApiKey -> ClientM BlackoutsResp
- createHeartbeat :: Maybe ApiKey -> Heartbeat -> ClientM CreateHeartbeatResp
- getHeartbeat :: Maybe ApiKey -> UUID -> ClientM HeartbeatResp
- deleteHeartbeat :: Maybe ApiKey -> UUID -> ClientM Resp
- listHeartbeats :: Maybe ApiKey -> ClientM HeartbeatsResp
- createApiKey :: ApiKey -> CreateApiKey -> ClientM CreateApiKeyResp
- deleteApiKey :: Maybe ApiKey -> ApiKey -> ClientM Resp
- listApiKeys :: Maybe ApiKey -> ClientM ApiKeysResp
- createUser :: Maybe ApiKey -> User -> ClientM UserResp
- deleteUser :: Maybe ApiKey -> UUID -> ClientM Resp
- updateUser :: Maybe ApiKey -> UUID -> UserAttr Nonempty -> ClientM Resp
- listUsers :: Maybe ApiKey -> Maybe CustomerName -> Maybe Email -> ClientM UsersResp
- createCustomer :: Maybe ApiKey -> Customer -> ClientM CustomerResp
- deleteCustomer :: Maybe ApiKey -> UUID -> ClientM Resp
- listCustomers :: Maybe ApiKey -> ClientM CustomersResp
- type Resource = Text
- type Event = Text
- type Service = Text
- type Environment = Text
- type Group = Text
- type Origin = Text
- type AlertType = Text
- type UserName = Text
- type CustomerName = Text
- type Tag = Text
- type Email = Text
- type Password = Text
- type Provider = Text
- type UUID = Text
- type Href = Text
- type ShouldReverse = Bool
- type Limit = Int
- type PageNo = Int
- type QueryString = Text
- type IsRepeat = Bool
- type FieldQuery = (QueryAttr, Text, MatchType, Bool)
- data MatchType
- (=.) :: QueryAttr -> Text -> FieldQuery
- (!=) :: QueryAttr -> Text -> FieldQuery
- (~.) :: QueryAttr -> Text -> FieldQuery
- (!~) :: QueryAttr -> Text -> FieldQuery
- data Resp
- = OkResp
- | ErrorResp {
- respMessage :: Text
- data Severity
- data Status
- data TrendIndication
- data Alert = Alert {
- alertResource :: Resource
- alertEvent :: Event
- alertEnvironment :: Maybe Environment
- alertSeverity :: Maybe Severity
- alertCorrelate :: Maybe [Event]
- alertStatus :: Maybe Status
- alertService :: Maybe [Service]
- alertGroup :: Maybe Group
- alertValue :: Maybe Value
- alertText :: Maybe Text
- alertTags :: Maybe [Tag]
- alertAttributes :: Maybe (Map Text Text)
- alertOrigin :: Maybe Origin
- alertType :: Maybe AlertType
- alertCreateTime :: Maybe UTCTime
- alertTimeout :: Maybe Int
- alertRawData :: Maybe Text
- alertCustomer :: Maybe CustomerName
- mkAlert :: Resource -> Event -> Service -> Alert
- data AlertInfo = AlertInfo {
- alertInfoId :: UUID
- alertInfoResource :: Resource
- alertInfoEvent :: Event
- alertInfoEnvironment :: Environment
- alertInfoSeverity :: Maybe Severity
- alertInfoCorrelate :: [Event]
- alertInfoStatus :: Maybe Status
- alertInfoService :: [Service]
- alertInfoGroup :: Group
- alertInfoValue :: Value
- alertInfoText :: Text
- alertInfoTags :: [Tag]
- alertInfoAttributes :: Map Text Text
- alertInfoOrigin :: Origin
- alertInfoType :: AlertType
- alertInfoCreateTime :: UTCTime
- alertInfoTimeout :: Int
- alertInfoRawData :: Maybe Text
- alertInfoCustomer :: Maybe CustomerName
- alertInfoDuplicateCount :: Maybe Int
- alertInfoRepeat :: Maybe Bool
- alertInfoPreviousSeverity :: Maybe Severity
- alertInfoTrendIndication :: Maybe TrendIndication
- alertInfoReceiveTime :: UTCTime
- alertInfoLastReceiveId :: Maybe UUID
- alertInfoLastReceiveTime :: UTCTime
- alertInfoHistory :: [HistoryItem]
- alertInfoHref :: Href
- data AlertAttr
- = IdAlertAttr
- | ResourceAlertAttr
- | EventAlertAttr
- | EnvironmentAlertAttr
- | SeverityAlertAttr
- | CorrelateAlertAttr
- | StatusAlertAttr
- | ServiceAlertAttr
- | GroupAlertAttr
- | ValueAlertAttr
- | TextAlertAttr
- | TagsAlertAttr
- | AttributesAlertAttr
- | OriginAlertAttr
- | TypeAlertAttr
- | CreateTimeAlertAttr
- | TimeoutAlertAttr
- | RawDataAlertAttr
- | CustomerAlertAttr
- | DuplicateCountAlertAttr
- | RepeatAlertAttr
- | PreviousSeverityAlertAttr
- | TrendIndicationAlertAttr
- | ReceiveTimeAlertAttr
- | LastReceiveIdAlertAttr
- | LastReceiveTimeAlertAttr
- | HistoryAlertAttr
- | HrefAlertAttr
- data QueryAttr
- = EventQueryAttr
- | EnvironmentQueryAttr
- | SeverityQueryAttr
- | CorrelateQueryAttr
- | StatusQueryAttr
- | ServiceQueryAttr
- | GroupQueryAttr
- | ValueQueryAttr
- | TextQueryAttr
- | TagsQueryAttr
- | AttributesQueryAttr
- | OriginQueryAttr
- | TypeQueryAttr
- | CreateTimeQueryAttr
- | TimeoutQueryAttr
- | RawDataQueryAttr
- | CustomerQueryAttr
- | RepeatQueryAttr
- | PreviousSeverityQueryAttr
- | TrendIndicationQueryAttr
- | ReceiveTimeQueryAttr
- | LastReceiveIdQueryAttr
- | LastReceiveTimeQueryAttr
- | HistoryQueryAttr
- | HrefQueryAttr
- data HistoryItem
- = StatusHistoryItem { }
- | SeverityHistoryItem {
- historyItemEvent :: Event
- historyItemSeverity :: Severity
- historyItemText :: Text
- historyItemId :: UUID
- historyItemUpdateTime :: UTCTime
- historyItemValue :: Value
- data ExtendedHistoryItem
- = StatusExtendedHistoryItem {
- statusExtendedHistoryItemId :: UUID
- statusExtendedHistoryItemResource :: Resource
- statusExtendedHistoryItemEvent :: Event
- statusExtendedHistoryItemEnvironment :: Environment
- statusExtendedHistoryItemStatus :: Status
- statusExtendedHistoryItemService :: [Service]
- statusExtendedHistoryItemGroup :: Group
- statusExtendedHistoryItemText :: Text
- statusExtendedHistoryItemTags :: [Tag]
- statusExtendedHistoryItemAttributes :: Map Text Text
- statusExtendedHistoryItemOrigin :: Origin
- statusExtendedHistoryItemUpdateTime :: UTCTime
- statusExtendedHistoryItemCustomer :: Maybe CustomerName
- | SeverityExtendedHistoryItem {
- severityExtendedHistoryItemId :: UUID
- severityExtendedHistoryItemResource :: Resource
- severityExtendedHistoryItemEvent :: Event
- severityExtendedHistoryItemEnvironment :: Environment
- severityExtendedHistoryItemSeverity :: Severity
- severityExtendedHistoryItemService :: [Service]
- severityExtendedHistoryItemGroup :: Group
- severityExtendedHistoryItemValue :: Value
- severityExtendedHistoryItemText :: Text
- severityExtendedHistoryItemTags :: [Tag]
- severityExtendedHistoryItemAttributes :: Map Text Text
- severityExtendedHistoryItemOrigin :: Origin
- severityExtendedHistoryItemUpdateTime :: UTCTime
- severityExtendedHistoryItemCustomer :: Maybe CustomerName
- = StatusExtendedHistoryItem {
- newtype Tags = Tags {}
- newtype Attributes = Attributes {
- attributes :: Map Text Text
- data StatusChange = StatusChange {
- statusChangeStatus :: Status
- statusChangeText :: Maybe Text
- data CreateAlertResp
- = OkCreateAlertResp { }
- | ErrorCreateAlertResp {
- errorCreateAlertRespMessage :: Text
- data AlertResp
- = OkAlertResp { }
- | ErrorAlertResp {
- errorAlertRespMessage :: Text
- data AlertsResp
- = OkAlertsResp {
- okAlertsRespAlerts :: [AlertInfo]
- okAlertsRespTotal :: Int
- okAlertsRespPage :: PageNo
- okAlertsRespPageSize :: Int
- okAlertsRespPages :: Int
- okAlertsRespMore :: Bool
- okAlertsRespSeverityCounts :: Maybe (Map Severity Int)
- okAlertsRespStatusCounts :: Maybe (Map Status Int)
- okAlertsRespLastTime :: UTCTime
- okAlertsRespAutoRefresh :: Bool
- okAlertsRespMessage :: Maybe Text
- | ErrorAlertsResp {
- errorAlertsRespMessage :: Text
- = OkAlertsResp {
- data AlertCountResp
- data ResourceInfo = ResourceInfo {}
- data Top10Info = Top10Info {}
- data Top10Resp
- = OkTop10Resp {
- okTop10RespTop10 :: [Top10Info]
- okTop10RespTotal :: Int
- okTop10RespMessage :: Maybe Text
- | ErrorTop10Resp {
- errorTop10RespMessage :: Text
- = OkTop10Resp {
- data AlertHistoryResp
- data EnvironmentInfo = EnvironmentInfo {}
- data EnvironmentsResp
- data ServiceInfo = ServiceInfo {}
- data ServicesResp
- = OkServicesResp { }
- | ErrorServicesResp {
- errorServicesRespMessage :: Text
- data Blackout = Blackout {}
- blackout :: Environment -> Blackout
- data BlackoutInfo = BlackoutInfo {
- blackoutInfoId :: UUID
- blackoutInfoPriority :: Int
- blackoutInfoEnvironment :: Environment
- blackoutInfoResource :: Maybe Resource
- blackoutInfoService :: Maybe [Service]
- blackoutInfoEvent :: Maybe Event
- blackoutInfoGroup :: Maybe Group
- blackoutInfoTags :: Maybe [Tag]
- blackoutInfoCustomer :: Maybe CustomerName
- blackoutInfoStartTime :: UTCTime
- blackoutInfoEndTime :: UTCTime
- blackoutInfoDuration :: Int
- data BlackoutStatus
- data ExtendedBlackoutInfo = ExtendedBlackoutInfo {
- extendedBlackoutInfoId :: UUID
- extendedBlackoutInfoPriority :: Int
- extendedBlackoutInfoEnvironment :: Environment
- extendedBlackoutInfoResource :: Maybe Resource
- extendedBlackoutInfoService :: Maybe [Service]
- extendedBlackoutInfoEvent :: Maybe Event
- extendedBlackoutInfoGroup :: Maybe Group
- extendedBlackoutInfoTags :: Maybe [Tag]
- extendedBlackoutInfoCustomer :: Maybe CustomerName
- extendedBlackoutInfoStartTime :: UTCTime
- extendedBlackoutInfoEndTime :: UTCTime
- extendedBlackoutInfoDuration :: Int
- extendedBlackoutInfoRemaining :: Int
- extendedBlackoutInfoStatus :: BlackoutStatus
- data BlackoutResp
- = OkBlackoutResp { }
- | ErrorBlackoutResp {
- errorBlackoutRespMessage :: Text
- data BlackoutsResp
- = OkBlackoutsResp { }
- | ErrorBlackoutsResp {
- errorBlackoutsRespMessage :: Text
- data Heartbeat = Heartbeat {}
- data HeartbeatInfo = HeartbeatInfo {}
- data CreateHeartbeatResp
- data HeartbeatResp
- = OkHeartbeatResp { }
- | ErrorHeartbeatResp {
- heartbeatRespMessage :: Text
- data HeartbeatsResp
- = OkHeartbeatsResp { }
- | ErrorHeartbeatsResp {
- heartbeatsRespErrorMessage :: Text
- data ApiKey = ApiKey {
- unApiKey :: !Text
- data CreateApiKey = CreateApiKey {}
- data ApiKeyType
- data ApiKeyInfo = ApiKeyInfo {}
- data CreateApiKeyResp
- data ApiKeysResp
- = OkApiKeysResp { }
- | ErrorApiKeysResp {
- errorApiKeysRespMessage :: Text
- data User = User {
- userName :: UserName
- userLogin :: Email
- userPassword :: Password
- userProvider :: Maybe Provider
- userText :: Maybe Text
- userEmailVerified :: Maybe Bool
- user :: UserName -> Email -> Password -> User
- data UserAttr (u :: IsEmpty) = UserAttr {}
- data IsEmpty
- emptyUserAttr :: UserAttr Empty
- checkNonempty :: UserAttr u -> Either (UserAttr Empty) (UserAttr Nonempty)
- withUserName :: UserAttr u -> UserName -> UserAttr Nonempty
- withUserLogin :: UserAttr u -> Email -> UserAttr Nonempty
- withUserPassword :: UserAttr u -> Password -> UserAttr Nonempty
- withUserProvider :: UserAttr u -> Provider -> UserAttr Nonempty
- withUserText :: UserAttr u -> Text -> UserAttr Nonempty
- withUserEmailVerified :: UserAttr u -> Bool -> UserAttr u
- data UserInfo = UserInfo {}
- data RoleType
- data ExtendedUserInfo = ExtendedUserInfo {}
- data UserResp
- = OkUserResp { }
- | ErrorUserResp {
- errorUserRespMessage :: Text
- data UsersResp
- = OkUsersResp {
- okUsersRespUsers :: [ExtendedUserInfo]
- okUsersRespTotal :: Int
- okUsersRespDomains :: [Text]
- okUsersRespGroups :: [Text]
- okUsersRespOrgs :: [Text]
- okUsersRespRoles :: Maybe [Text]
- okUsersRespTime :: UTCTime
- okUsersRespMessage :: Maybe Text
- | ErrorUsersResp {
- errorUsersResp :: Text
- = OkUsersResp {
- data Customer = Customer {
- customerCustomer :: CustomerName
- customerMatch :: Text
- data CustomerInfo = CustomerInfo {}
- data CustomerResp
- = OkCustomerResp { }
- | ErrorCustomerResp {
- errorCustomerRespMessage :: Text
- data CustomersResp
- = OkCustomersResp { }
- | ErrorCustomersResp {
- errorCustomersMessage :: Text
- run :: (Show a, FromJSON a, ToJSON a) => ClientM a -> IO a
- run' :: (Show a, FromJSON a, ToJSON a) => ClientM a -> IO ()
- prettyPrintEncoding :: ToJSON a => a -> IO ()
- now :: () -> UTCTime
Bindings
Alerts
createAlert :: Maybe ApiKey -> Alert -> ClientM CreateAlertResp Source #
setAlertStatus :: Maybe ApiKey -> UUID -> StatusChange -> ClientM Resp Source #
updateAlertAttributes :: Maybe ApiKey -> UUID -> Attributes -> ClientM Resp Source #
Alert history and alert queries
:: Maybe ApiKey | |
-> Maybe QueryString | this is a JSON document describing a Mongo query see http://docs.mongodb.org/manual/reference/operator/query/ |
-> [UUID] | |
-> IsRepeat | |
-> [FieldQuery] | |
-> Maybe [AlertAttr] | alert attributes to show |
-> Maybe [AlertAttr] | alert attributes to hide |
-> Maybe ShouldReverse | |
-> [AlertAttr] | |
-> Maybe PageNo | |
-> Maybe Limit | |
-> ClientM AlertsResp |
alertHistory :: Maybe ApiKey -> Maybe QueryString -> [UUID] -> IsRepeat -> [FieldQuery] -> Maybe Limit -> ClientM AlertHistoryResp Source #
countAlerts :: Maybe ApiKey -> Maybe QueryString -> [UUID] -> IsRepeat -> [FieldQuery] -> ClientM AlertCountResp Source #
top10 :: Maybe ApiKey -> Maybe QueryString -> [UUID] -> IsRepeat -> [FieldQuery] -> Maybe AlertAttr -> ClientM Top10Resp Source #
flappingTop10 :: Maybe ApiKey -> Maybe QueryString -> [UUID] -> IsRepeat -> [FieldQuery] -> Maybe AlertAttr -> ClientM Top10Resp Source #
Environments
listEnvironments :: Maybe ApiKey -> Maybe QueryString -> [UUID] -> IsRepeat -> [FieldQuery] -> Maybe Limit -> ClientM EnvironmentsResp Source #
Services
listServices :: Maybe ApiKey -> Maybe QueryString -> [UUID] -> IsRepeat -> [FieldQuery] -> Maybe Limit -> ClientM ServicesResp Source #
Blackouts
createBlackout :: Maybe ApiKey -> Blackout -> ClientM BlackoutResp Source #
listBlackouts :: Maybe ApiKey -> ClientM BlackoutsResp Source #
Heartbeats
createHeartbeat :: Maybe ApiKey -> Heartbeat -> ClientM CreateHeartbeatResp Source #
getHeartbeat :: Maybe ApiKey -> UUID -> ClientM HeartbeatResp Source #
listHeartbeats :: Maybe ApiKey -> ClientM HeartbeatsResp Source #
API keys
createApiKey :: ApiKey -> CreateApiKey -> ClientM CreateApiKeyResp Source #
listApiKeys :: Maybe ApiKey -> ClientM ApiKeysResp Source #
Users
Customers
createCustomer :: Maybe ApiKey -> Customer -> ClientM CustomerResp Source #
listCustomers :: Maybe ApiKey -> ClientM CustomersResp Source #
Types
General domain terms
type Environment = Text Source #
type CustomerName = Text Source #
Query and sorting options
type ShouldReverse Source #
= Bool | whether to reverse the order of a sort |
type QueryString = Text Source #
This is a JSON document describing a Mongo query, see http://docs.mongodb.org/manual/reference/operator/query/
true for duplicate, false if an alert is correlated (in which case alerta appends an item to the history)
Field queries
Matches can be either literal or regular expressions. n.b. regexes are case-insensitive and are not anchored, i.e. no need to write .*regex.*
(=.) :: QueryAttr -> Text -> FieldQuery Source #
Convenient syntax for the four types of field queries viz. literal, negated literal, regex, negated regex.
(!=) :: QueryAttr -> Text -> FieldQuery Source #
Convenient syntax for the four types of field queries viz. literal, negated literal, regex, negated regex.
(~.) :: QueryAttr -> Text -> FieldQuery Source #
Convenient syntax for the four types of field queries viz. literal, negated literal, regex, negated regex.
(!~) :: QueryAttr -> Text -> FieldQuery Source #
Convenient syntax for the four types of field queries viz. literal, negated literal, regex, negated regex.
Generic response
This type is used for basic responses that have no content beyond whether they succeeded or failed with an error message.
OkResp | |
ErrorResp | |
|
Alerts
Alert severity
Unknown | |
Trace | 8 (grey) |
Debug | 7 (purple) |
Informational | 6 (green) |
Ok | 5 (green) |
Normal | 5 (green) |
Cleared | 5 (green) |
Indeterminate | 5 (silver) |
Warning | 4 (blue) |
Minor | 3 (yellow) |
Major | 2 (orange) |
Critical | 1 (red) |
Security | 0 (black) |
Bounded Severity Source # | |
Enum Severity Source # | |
Eq Severity Source # | |
Ord Severity Source # | |
Read Severity Source # | |
Show Severity Source # | |
Ix Severity Source # | |
Generic Severity Source # | |
ToJSONKey Severity Source # | |
ToJSON Severity Source # | |
FromJSONKey Severity Source # | |
FromJSON Severity Source # | |
ToHttpApiData Severity Source # | |
type Rep Severity Source # | |
Status of an alert.
OpenStatus | status code 1 |
AssignStatus | status code 2 |
AckStatus | status code 3 |
ClosedStatus | status code 4 |
ExpiredStatus | status code 5 |
UnknownStatus | status code 9 |
Bounded Status Source # | |
Enum Status Source # | |
Eq Status Source # | |
Ord Status Source # | |
Read Status Source # | |
Show Status Source # | |
Ix Status Source # | |
Generic Status Source # | |
ToJSONKey Status Source # | |
ToJSON Status Source # | |
FromJSONKey Status Source # | |
FromJSON Status Source # | |
ToHttpApiData Status Source # | |
type Rep Status Source # | |
data TrendIndication Source #
Bounded TrendIndication Source # | |
Enum TrendIndication Source # | |
Eq TrendIndication Source # | |
Ord TrendIndication Source # | |
Show TrendIndication Source # | |
Ix TrendIndication Source # | |
Generic TrendIndication Source # | |
ToJSON TrendIndication Source # | |
FromJSON TrendIndication Source # | |
FromHttpApiData TrendIndication Source # | |
type Rep TrendIndication Source # | |
Data required to create (post) an alert.
Alert | |
|
mkAlert :: Resource -> Event -> Service -> Alert Source #
Create an alert with just the mandatory fields.
Data returned from the server about an alert
Alert attributes, used for sorting, grouping and for field-based queries
These are the valid keys for use in field queries.
NB no id
, repeat
or duplicateCount
as these have special handling.
data HistoryItem Source #
StatusHistoryItem | |
| |
SeverityHistoryItem | |
|
Eq HistoryItem Source # | |
Show HistoryItem Source # | |
Generic HistoryItem Source # | |
ToJSON HistoryItem Source # | |
FromJSON HistoryItem Source # | |
type Rep HistoryItem Source # | |
data ExtendedHistoryItem Source #
When performing an alert history query an enriched version of the alert history is returned with extra fields.
newtype Attributes Source #
Attributes are key-value pairs that can be attached to an alert.
Attributes | |
|
Eq Attributes Source # | |
Show Attributes Source # | |
Generic Attributes Source # | |
ToJSON Attributes Source # | |
FromJSON Attributes Source # | |
type Rep Attributes Source # | |
data StatusChange Source #
StatusChange | |
|
Eq StatusChange Source # | |
Show StatusChange Source # | |
Generic StatusChange Source # | |
ToJSON StatusChange Source # | |
FromJSON StatusChange Source # | |
type Rep StatusChange Source # | |
data CreateAlertResp Source #
OkCreateAlertResp | |
| |
ErrorCreateAlertResp | |
|
Eq CreateAlertResp Source # | |
Show CreateAlertResp Source # | |
Generic CreateAlertResp Source # | |
ToJSON CreateAlertResp Source # | |
FromJSON CreateAlertResp Source # | |
type Rep CreateAlertResp Source # | |
data AlertsResp Source #
Eq AlertsResp Source # | |
Show AlertsResp Source # | |
Generic AlertsResp Source # | |
ToJSON AlertsResp Source # | |
FromJSON AlertsResp Source # | |
type Rep AlertsResp Source # | |
data AlertCountResp Source #
Eq AlertCountResp Source # | |
Show AlertCountResp Source # | |
Generic AlertCountResp Source # | |
ToJSON AlertCountResp Source # | |
FromJSON AlertCountResp Source # | |
type Rep AlertCountResp Source # | |
data ResourceInfo Source #
Eq ResourceInfo Source # | |
Show ResourceInfo Source # | |
Generic ResourceInfo Source # | |
ToJSON ResourceInfo Source # | |
FromJSON ResourceInfo Source # | |
type Rep ResourceInfo Source # | |
This also has a field corresponding to the "group-by" query parameter used i.e. if you group by origin, then the result will have an "origin" field.
This dependently-typed feature is not currently captured in the Haskell types.
OkTop10Resp | |
| |
ErrorTop10Resp | |
|
data AlertHistoryResp Source #
Eq AlertHistoryResp Source # | |
Show AlertHistoryResp Source # | |
Generic AlertHistoryResp Source # | |
ToJSON AlertHistoryResp Source # | |
FromJSON AlertHistoryResp Source # | |
type Rep AlertHistoryResp Source # | |
Environments
data EnvironmentInfo Source #
Eq EnvironmentInfo Source # | |
Show EnvironmentInfo Source # | |
Generic EnvironmentInfo Source # | |
ToJSON EnvironmentInfo Source # | |
FromJSON EnvironmentInfo Source # | |
type Rep EnvironmentInfo Source # | |
data EnvironmentsResp Source #
Eq EnvironmentsResp Source # | |
Show EnvironmentsResp Source # | |
Generic EnvironmentsResp Source # | |
ToJSON EnvironmentsResp Source # | |
FromJSON EnvironmentsResp Source # | |
type Rep EnvironmentsResp Source # | |
Services
data ServiceInfo Source #
Eq ServiceInfo Source # | |
Show ServiceInfo Source # | |
Generic ServiceInfo Source # | |
ToJSON ServiceInfo Source # | |
FromJSON ServiceInfo Source # | |
type Rep ServiceInfo Source # | |
data ServicesResp Source #
OkServicesResp | |
| |
ErrorServicesResp | |
|
Eq ServicesResp Source # | |
Show ServicesResp Source # | |
Generic ServicesResp Source # | |
ToJSON ServicesResp Source # | |
FromJSON ServicesResp Source # | |
type Rep ServicesResp Source # | |
Blackouts
Blackout | |
|
blackout :: Environment -> Blackout Source #
Create a blackout with only the mandatory fields
data BlackoutInfo Source #
A note on blackout priorities:
Priority is
- by default
- if resource and not event present
- if service present
- if event and not resource
- if group present
- if resource and event present
- if tags present
Somewhat bizarrely, the saved blackout only includes an attribute
{resource,service,event,group,tags}
if it was used to deduce the priority, i.e. a priority 6 blackout will have resource and event attributes, but no tags attribute, even if it was supplied when it was created.
BlackoutInfo | |
|
Eq BlackoutInfo Source # | |
Show BlackoutInfo Source # | |
Generic BlackoutInfo Source # | |
ToJSON BlackoutInfo Source # | |
FromJSON BlackoutInfo Source # | |
type Rep BlackoutInfo Source # | |
data BlackoutStatus Source #
data ExtendedBlackoutInfo Source #
data BlackoutResp Source #
Eq BlackoutResp Source # | |
Show BlackoutResp Source # | |
Generic BlackoutResp Source # | |
ToJSON BlackoutResp Source # | |
FromJSON BlackoutResp Source # | |
type Rep BlackoutResp Source # | |
data BlackoutsResp Source #
Eq BlackoutsResp Source # | |
Show BlackoutsResp Source # | |
Generic BlackoutsResp Source # | |
ToJSON BlackoutsResp Source # | |
FromJSON BlackoutsResp Source # | |
type Rep BlackoutsResp Source # | |
Heartbeats
Data needed to create a heartbeat
data HeartbeatInfo Source #
Information returned from the server about a heartbeat
Eq HeartbeatInfo Source # | |
Show HeartbeatInfo Source # | |
Generic HeartbeatInfo Source # | |
ToJSON HeartbeatInfo Source # | |
FromJSON HeartbeatInfo Source # | |
type Rep HeartbeatInfo Source # | |
data CreateHeartbeatResp Source #
data HeartbeatResp Source #
Eq HeartbeatResp Source # | |
Show HeartbeatResp Source # | |
Generic HeartbeatResp Source # | |
ToJSON HeartbeatResp Source # | |
FromJSON HeartbeatResp Source # | |
type Rep HeartbeatResp Source # | |
data HeartbeatsResp Source #
Eq HeartbeatsResp Source # | |
Show HeartbeatsResp Source # | |
Generic HeartbeatsResp Source # | |
ToJSON HeartbeatsResp Source # | |
FromJSON HeartbeatsResp Source # | |
type Rep HeartbeatsResp Source # | |
API keys
40-char UTF8
data CreateApiKey Source #
Data needed to create an API key
CreateApiKey | |
|
Eq CreateApiKey Source # | |
Show CreateApiKey Source # | |
Generic CreateApiKey Source # | |
ToJSON CreateApiKey Source # | |
FromJSON CreateApiKey Source # | |
Default CreateApiKey Source # | |
type Rep CreateApiKey Source # | |
data ApiKeyType Source #
Bounded ApiKeyType Source # | |
Enum ApiKeyType Source # | |
Eq ApiKeyType Source # | |
Ord ApiKeyType Source # | |
Show ApiKeyType Source # | |
Ix ApiKeyType Source # | |
Generic ApiKeyType Source # | |
ToJSON ApiKeyType Source # | |
FromJSON ApiKeyType Source # | |
type Rep ApiKeyType Source # | |
data ApiKeyInfo Source #
Information returned from the server about an API key
Eq ApiKeyInfo Source # | |
Show ApiKeyInfo Source # | |
Generic ApiKeyInfo Source # | |
ToJSON ApiKeyInfo Source # | |
FromJSON ApiKeyInfo Source # | |
type Rep ApiKeyInfo Source # | |
data CreateApiKeyResp Source #
Eq CreateApiKeyResp Source # | |
Show CreateApiKeyResp Source # | |
Generic CreateApiKeyResp Source # | |
ToJSON CreateApiKeyResp Source # | |
FromJSON CreateApiKeyResp Source # | |
type Rep CreateApiKeyResp Source # | |
data ApiKeysResp Source #
OkApiKeysResp | |
| |
ErrorApiKeysResp | |
|
Eq ApiKeysResp Source # | |
Show ApiKeysResp Source # | |
Generic ApiKeysResp Source # | |
ToJSON ApiKeysResp Source # | |
FromJSON ApiKeysResp Source # | |
type Rep ApiKeysResp Source # | |
Users
User | |
|
data UserAttr (u :: IsEmpty) Source #
User attributes, used in updating a user. It's an error to update a user with all attributes missing.
We track whether at least one attribute has been set with a phantom type.
Alerta bugs:
- can't update password without also passing provider=basic as alerta checks the update message, not the user.
- can't set email_verified to false without providing another parameter.
The helper functions "withUserName" etc. can be used in conjunction with the default empty UserAttr to build up a nonempty UserAttr.
UserInfo | |
|
data ExtendedUserInfo Source #
Show ExtendedUserInfo Source # | |
Generic ExtendedUserInfo Source # | |
ToJSON ExtendedUserInfo Source # | |
FromJSON ExtendedUserInfo Source # | |
type Rep ExtendedUserInfo Source # | |
OkUsersResp | |
| |
ErrorUsersResp | |
|
Customers
Customer | |
|
data CustomerInfo Source #
Show CustomerInfo Source # | |
Generic CustomerInfo Source # | |
ToJSON CustomerInfo Source # | |
FromJSON CustomerInfo Source # | |
type Rep CustomerInfo Source # | |
data CustomerResp Source #
Show CustomerResp Source # | |
Generic CustomerResp Source # | |
ToJSON CustomerResp Source # | |
FromJSON CustomerResp Source # | |
type Rep CustomerResp Source # | |
data CustomersResp Source #
Show CustomersResp Source # | |
Generic CustomersResp Source # | |
ToJSON CustomersResp Source # | |
FromJSON CustomersResp Source # | |
type Rep CustomersResp Source # | |
Helpers
run :: (Show a, FromJSON a, ToJSON a) => ClientM a -> IO a Source #
Run a Servant client function, pretty-printing the JSON returned.
run' :: (Show a, FromJSON a, ToJSON a) => ClientM a -> IO () Source #
Run a Servant client function, pretty-printing the JSON returned, and discarding the return value.
prettyPrintEncoding :: ToJSON a => a -> IO () Source #
Pretty-print the JSON encoding of the supplied value.