Skip to content

Issue in Adding Monitor to Status Page for Uptime Robot #352

Open
@kahootali

Description

@kahootali

I have created a Status Page on Uptime Robot and got the id of it by running curl -d "api_key=MY_API_KEY" -X POST https://api.uptimerobot.com/v2/getPSPs and used that ID in my EndpointMonitor

apiVersion: endpointmonitor.stakater.com/v1alpha1
kind: EndpointMonitor
metadata:
  name: test
spec:
  forceHttps: true
  url: https://test.DOMAIN
  uptimeRobotConfig:
    interval: 300
    monitorType: http
    statusPages: "ID_FROM_ABOVE"

But it isn't working and gives an error in the logs as below

2021-06-22T09:09:24.563Z	INFO	uptime-monitor-test	Monitor Updated: test
2021-06-22T09:09:25.365Z	ERROR	uptime-monitor-test	Unable to unmarshal JSON	{"error": "json: cannot unmarshal number into Go struct field UptimePublicStatusPage.psps.monitors of type []int"}
github.com/go-logr/zapr.(*zapLogger).Error
	/go/pkg/mod/github.com/go-logr/[email protected]/zapr.go:132
sigs.k8s.io/controller-runtime/pkg/log.(*DelegatingLogger).Error
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/log/deleg.go:144
github.com/stakater/IngressMonitorController/pkg/monitors/uptimerobot.(*UpTimeStatusPageService).Get
	/workspace/pkg/monitors/uptimerobot/uptime-status-page.go:209
github.com/stakater/IngressMonitorController/pkg/monitors/uptimerobot.(*UpTimeStatusPageService).AddMonitorToStatusPage
	/workspace/pkg/monitors/uptimerobot/uptime-status-page.go:101
github.com/stakater/IngressMonitorController/pkg/monitors/uptimerobot.(*UpTimeMonitorService).updateStatusPages
	/workspace/pkg/monitors/uptimerobot/uptime-monitor.go:280
github.com/stakater/IngressMonitorController/pkg/monitors/uptimerobot.(*UpTimeMonitorService).handleStatusPagesConfig
	/workspace/pkg/monitors/uptimerobot/uptime-monitor.go:273
github.com/stakater/IngressMonitorController/pkg/monitors/uptimerobot.(*UpTimeMonitorService).Update
	/workspace/pkg/monitors/uptimerobot/uptime-monitor.go:169
github.com/stakater/IngressMonitorController/pkg/monitors.(*MonitorServiceProxy).Update
	/workspace/pkg/monitors/monitor-proxy.go:96
github.com/stakater/IngressMonitorController/pkg/controllers.(*EndpointMonitorReconciler).handleUpdate
	/workspace/pkg/controllers/endpointmonitor_updated.go:26
github.com/stakater/IngressMonitorController/pkg/controllers.(*EndpointMonitorReconciler).Reconcile
	/workspace/pkg/controllers/endpointmonitor_controller.go:95
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:298
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:253
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1.2
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:216
k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext.func1
	/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:185
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1
	/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:155
k8s.io/apimachinery/pkg/util/wait.BackoffUntil
	/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:156
k8s.io/apimachinery/pkg/util/wait.JitterUntil
	/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:133
k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext
	/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:185
k8s.io/apimachinery/pkg/util/wait.UntilWithContext
	/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:99
2021-06-22T09:09:26.193Z	INFO	uptime-monitor-test	Updated Page Request failed. Status Code: 500
2021-06-22T09:09:26.193Z	INFO	uptime-monitor-test	Monitor couldn't be added to status page: Updated Page Request failed. Status Code: 500

Not sure if I am missing something

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions