Skip to content

feat(synthetics): add synthetics monitor and private location API support to go-kibana-rest #692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions libs/go-kibana-rest/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '2.3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.14.1
image: docker.elastic.co/elasticsearch/elasticsearch:8.14.3
environment:
cluster.name: test
discovery.type: single-node
Expand All @@ -12,7 +12,7 @@ services:
ports:
- "9200:9200/tcp"
set-kibana-password:
image: docker.elastic.co/kibana/kibana:8.14.1
image: docker.elastic.co/kibana/kibana:8.14.3
restart: on-failure
links:
- elasticsearch
Expand All @@ -23,12 +23,14 @@ services:
elasticsearch:
condition: service_started
kibana:
image: docker.elastic.co/kibana/kibana:8.14.1
image: docker.elastic.co/kibana/kibana:8.14.3
environment:
ELASTICSEARCH_HOSTS: http://es:9200
ELASTICSEARCH_USERNAME: kibana_system
ELASTICSEARCH_PASSWORD: changeme
xpack.security.http.ssl.enabled: false
xpack.license.self_generated.type: trial
XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY: min-32-byte-long-strong-encryption-key
links:
- elasticsearch:es
ports:
Expand Down
1 change: 1 addition & 0 deletions libs/go-kibana-rest/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.19

require (
github.com/go-resty/resty/v2 v2.7.0
github.com/google/uuid v1.6.0
github.com/sirupsen/logrus v1.9.0
github.com/stretchr/testify v1.8.1
github.com/x-cray/logrus-prefixed-formatter v0.5.2
Expand Down
2 changes: 2 additions & 0 deletions libs/go-kibana-rest/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
Expand Down
19 changes: 19 additions & 0 deletions libs/go-kibana-rest/kbapi/api._.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type API struct {
KibanaStatus *KibanaStatusAPI
KibanaLogstashPipeline *KibanaLogstashPipelineAPI
KibanaShortenURL *KibanaShortenURLAPI
KibanaSynthetics *KibanaSyntheticsAPI
}

// KibanaSpacesAPI handle the spaces API
Expand Down Expand Up @@ -68,6 +69,11 @@ type KibanaShortenURLAPI struct {
Create KibanaShortenURLCreate
}

type KibanaSyntheticsAPI struct {
Monitor *KibanaSyntheticsMonitorAPI
PrivateLocation *KibanaSyntheticsPrivateLocationAPI
}

// New initialise the API implementation
func New(c *resty.Client) *API {
return &API{
Expand Down Expand Up @@ -110,5 +116,18 @@ func New(c *resty.Client) *API {
KibanaShortenURL: &KibanaShortenURLAPI{
Create: newKibanaShortenURLCreateFunc(c),
},
KibanaSynthetics: &KibanaSyntheticsAPI{
Monitor: &KibanaSyntheticsMonitorAPI{
Add: newKibanaSyntheticsMonitorAddFunc(c),
Delete: newKibanaSyntheticsMonitorDeleteFunc(c),
Get: newKibanaSyntheticsMonitorGetFunc(c),
Update: newKibanaSyntheticsMonitorUpdateFunc(c),
},
PrivateLocation: &KibanaSyntheticsPrivateLocationAPI{
Create: newKibanaSyntheticsPrivateLocationCreateFunc(c),
Delete: newKibanaSyntheticsPrivateLocationDeleteFunc(c),
Get: newKibanaSyntheticsPrivateLocationGetFunc(c),
},
},
}
}
2 changes: 1 addition & 1 deletion libs/go-kibana-rest/kbapi/api.kibana_spaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (s *KBAPITestSuite) TestKibanaSpaces() {
Objects: []KibanaSpaceObjectParameter{
{
Type: "config",
ID: "8.14.1",
ID: "8.14.3",
},
},
}
Expand Down
Loading