Skip to content

Commit

Permalink
monitoring: apisonator dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
eguzki committed Apr 1, 2020
1 parent 55964e8 commit d8008a9
Show file tree
Hide file tree
Showing 5 changed files with 1,606 additions and 180 deletions.
8 changes: 4 additions & 4 deletions pkg/3scale/amp/component/backend_monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,22 +134,22 @@ func BackendWorkerServiceMonitor() *monitoringv1.ServiceMonitor {
}
}

func BackendWorkerGrafanaDashboard(ns string) *grafanav1alpha1.GrafanaDashboard {
func BackendGrafanaDashboard(ns string) *grafanav1alpha1.GrafanaDashboard {
data := &struct {
Namespace string
}{
ns,
}
return &grafanav1alpha1.GrafanaDashboard{
ObjectMeta: metav1.ObjectMeta{
Name: "backend-worker",
Name: "backend",
Labels: map[string]string{
"monitoring-key": common.MonitoringKey,
},
},
Spec: grafanav1alpha1.GrafanaDashboardSpec{
Json: assets.TemplateAsset("monitoring/backend-worker-grafana-dashboard-1.json.tpl", data),
Name: fmt.Sprintf("%s/backend-worker-grafana-dashboard-1.json", ns),
Json: assets.TemplateAsset("monitoring/backend-grafana-dashboard-1.json.tpl", data),
Name: fmt.Sprintf("%s/backend-grafana-dashboard-1.json", ns),
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/3scale/amp/operator/backend_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (r *BackendReconciler) Reconcile() (reconcile.Result, error) {
return reconcile.Result{}, err
}

err = r.reconcileGrafanaDashboard(component.BackendWorkerGrafanaDashboard(r.apiManager.Namespace))
err = r.reconcileGrafanaDashboard(component.BackendGrafanaDashboard(r.apiManager.Namespace))
if err != nil {
return reconcile.Result{}, err
}
Expand Down
Loading

0 comments on commit d8008a9

Please sign in to comment.