Skip to content

Commit 4624a65

Browse files
authored
Show service specific metrics in dashboard. Fix aggregator metrics. (#1198)
Signed-off-by: sami <sami@appscode.com>
1 parent 06af1bf commit 4624a65

File tree

18 files changed

+305
-193
lines changed

18 files changed

+305
-193
lines changed

apis/installer/v1alpha1/ace_marketplace_api_types.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@ type MarketplaceApiSpec struct {
7474
// If specified, the pod's scheduling constraints
7575
// +optional
7676
Affinity *core.Affinity `json:"affinity"`
77-
Infra AceInfra `json:"infra"`
78-
Settings AcaasSettings `json:"settings"`
77+
//+optional
78+
Monitoring Monitoring `json:"monitoring"`
79+
Infra AceInfra `json:"infra"`
80+
Settings AcaasSettings `json:"settings"`
7981
// List of sources to populate environment variables in the container.
8082
// The keys defined within a source must be a C_IDENTIFIER. All invalid keys
8183
// will be reported as an event when the container is starting. When a key exists in multiple

apis/installer/v1alpha1/zz_generated.deepcopy.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/accounts-ui/templates/servicemonitor.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ spec:
1919
{{- include "accounts-ui.selectorLabels" . | nindent 6 }}
2020
endpoints:
2121
- path: /metrics
22-
port: metrics
22+
port: http
2323
scheme: http
2424
{{- end }}

charts/billing/templates/aggregator/servicemonitor.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ spec:
2121
{{- include "billing.selectorLabels" . | nindent 6 }}
2222
endpoints:
2323
- path: /metrics
24-
port: metrics
24+
port: http
2525
scheme: http
2626
{{- end }}

charts/billing/templates/aggregator/statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ spec:
5353
- aggregator
5454
ports:
5555
- name: http
56-
containerPort: 3000
56+
containerPort: 3003
5757
protocol: TCP
5858
resources:
5959
{{- toYaml .Values.resources | nindent 12 }}

charts/billing/templates/processor/servicemonitor.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ spec:
2121
{{- include "billing.selectorLabels" . | nindent 6 }}
2222
endpoints:
2323
- path: /metrics
24-
port: metrics
24+
port: http
2525
scheme: http
2626
{{- end }}

charts/billing/templates/processor/statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ spec:
5353
- monitor
5454
ports:
5555
- name: http
56-
containerPort: 3000
56+
containerPort: 3003
5757
protocol: TCP
5858
resources:
5959
{{- toYaml .Values.resources | nindent 12 }}

charts/marketplace-api/README.md

Lines changed: 45 additions & 43 deletions
Large diffs are not rendered by default.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{{- if eq "prometheus.io/operator" ( include "monitoring.agent" . ) }}
2+
apiVersion: monitoring.coreos.com/v1
3+
kind: ServiceMonitor
4+
metadata:
5+
name: {{ include "marketplace-api.fullname" . }}
6+
namespace: {{ .Release.Namespace }}
7+
labels:
8+
{{- if eq "true" ( include "monitoring.apply-servicemonitor-label" . ) }}
9+
{{- include "monitoring.servicemonitor-label" . | nindent 4 }}
10+
{{- else }}
11+
{{- include "marketplace-api.selectorLabels" . | nindent 4 }}
12+
{{- end }}
13+
spec:
14+
namespaceSelector:
15+
matchNames:
16+
- {{ .Release.Namespace }}
17+
selector:
18+
matchLabels:
19+
{{- include "marketplace-api.selectorLabels" . | nindent 6 }}
20+
endpoints:
21+
- path: /metrics
22+
port: http
23+
scheme: http
24+
{{- end }}

charts/marketplace-api/values.openapiv3_schema.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,25 @@ properties:
644644
- objstore
645645
- storageClass
646646
type: object
647+
monitoring:
648+
properties:
649+
agent:
650+
enum:
651+
- prometheus.io
652+
- prometheus.io/operator
653+
- prometheus.io/builtin
654+
type: string
655+
serviceMonitor:
656+
properties:
657+
labels:
658+
additionalProperties:
659+
type: string
660+
type: object
661+
type: object
662+
required:
663+
- agent
664+
- serviceMonitor
665+
type: object
647666
nameOverride:
648667
type: string
649668
nodeSelector:

0 commit comments

Comments
 (0)