Skip to content

Commit 465ef08

Browse files
committed
fix(monitors): added missing fields that exist in the API
1 parent 2e52464 commit 465ef08

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

axiom/monitors.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ type Monitor struct {
7272
ID string `json:"id,omitempty"`
7373
// AlertOnNoData indicates whether to alert on no data.
7474
AlertOnNoData bool `json:"alertOnNoData"`
75+
// NotifyByGroup tracks each none-time group independently
76+
NotifyByGroup bool `json:"notifyByGroup"`
7577
// APLQuery is the APL query to use for the monitor.
7678
APLQuery string `json:"aplQuery"`
7779
// Description of the monitor.

axiom/notifiers.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"net/http"
66
"net/url"
7+
"time"
78

89
"go.opentelemetry.io/otel/attribute"
910
"go.opentelemetry.io/otel/trace"
@@ -14,6 +15,8 @@ type Notifier struct {
1415
ID string `json:"id"`
1516
// Name is the name of the notifier.
1617
Name string `json:"name"`
18+
// DisabledUntil sets the notifier's disabled until property.
19+
DisabledUntil time.Time `json:"disabledUntil"`
1720
// Properties of the notifier.
1821
Properties NotifierProperties `json:"properties"`
1922
}
@@ -33,6 +36,8 @@ type NotifierProperties struct {
3336
Slack *SlackConfig `json:"slack,omitempty"`
3437
// Webhook configuration.
3538
Webhook *WebhookConfig `json:"webhook,omitempty"`
39+
// MicrosoftTeams configuration.
40+
MicrosoftTeams *MicrosoftTeams `json:"microsoftTeams,omitempty"`
3641
}
3742

3843
type DiscordConfig struct {
@@ -76,6 +81,11 @@ type WebhookConfig struct {
7681
URL string `json:"url,omitempty"`
7782
}
7883

84+
type MicrosoftTeams struct {
85+
// URL is the URL to send the message to.
86+
URL string `json:"microsoftTeamsUrl,omitempty"`
87+
}
88+
7989
// Axiom API Reference: /v2/notifiers
8090
type NotifiersService service
8191

0 commit comments

Comments
 (0)