-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CTO-441 Enable ceph bucket monitoring (#362)
- Loading branch information
1 parent
b7b5759
commit c7f4384
Showing
11 changed files
with
1,263 additions
and
6 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Context | ||
The database (eg. mysql/mongo) may run inside the mojaloop cluster or may run as managed database (e.g. AWS RDS). In both cases, we want to gather database metrics for operational visibility | ||
|
||
# Problem | ||
How do we show the same metrics to ops team when the database is running as managed instance (e.g. AWS RDS). | ||
|
||
# Solution | ||
|
||
In case of self managed database, the exporter runs as a side car container with the database container in the same k8s pod. When the database runs as external managed service (eg. AWS RDS), we deploy a standalone exporter instance. This exporter instance pulls the metrics data from the database and converts them to prometheus format. | ||
|
||
![diagram](./database-metrics-architecture.svg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
113 changes: 113 additions & 0 deletions
113
gitops/applications/base/utils-post-config/rook-ceph-objectstore-exporter.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
apiVersion: ceph.rook.io/v1 | ||
kind: CephObjectStoreUser | ||
metadata: | ||
name: ceph-objectstore-exporter-user | ||
namespace: ${ARGOCD_ENV_rook_ceph_namespace} | ||
spec: | ||
store: ceph-objectstore | ||
displayName: ceph-objectstore-exporter-user | ||
clusterNamespace: ${ARGOCD_ENV_rook_ceph_namespace} | ||
capabilities: | ||
bucket: read | ||
metadata: read | ||
usage: read | ||
user: read | ||
|
||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: ceph-objectstore-exporter | ||
namespace: ${ARGOCD_ENV_rook_ceph_namespace} | ||
labels: | ||
app.kubernetes.io/name: ceph-objectstore-exporter | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: ceph-objectstore-exporter | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: ceph-objectstore-exporter | ||
spec: | ||
containers: | ||
- image: ghcr.io/pando85/radosgw_usage_exporter:latest | ||
env: | ||
- name: ACCESS_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
key: AccessKey | ||
name: rook-ceph-object-user-ceph-objectstore-ceph-objectstore-exporter-user | ||
- name: SECRET_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
key: SecretKey | ||
name: rook-ceph-object-user-ceph-objectstore-ceph-objectstore-exporter-user | ||
- name: RADOSGW_SERVER | ||
valueFrom: | ||
secretKeyRef: | ||
key: Endpoint | ||
name: rook-ceph-object-user-ceph-objectstore-ceph-objectstore-exporter-user | ||
args: | ||
- --insecure | ||
name: exporter | ||
ports: | ||
- containerPort: 9242 | ||
name: http | ||
protocol: TCP | ||
resources: | ||
limits: | ||
cpu: 400m | ||
memory: 512Mi | ||
requests: | ||
cpu: 100m | ||
memory: 64Mi | ||
livenessProbe: | ||
tcpSocket: | ||
port: http | ||
readinessProbe: | ||
tcpSocket: | ||
port: http | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
readOnlyRootFilesystem: true | ||
securityContext: | ||
runAsNonRoot: true | ||
runAsUser: 1000 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: ceph-objectstore-exporter | ||
namespace: ${ARGOCD_ENV_rook_ceph_namespace} | ||
labels: | ||
app.kubernetes.io/name: ceph-objectstore-exporter | ||
spec: | ||
selector: | ||
app.kubernetes.io/name: ceph-objectstore-exporter | ||
ports: | ||
- name: http | ||
port: 9242 | ||
protocol: TCP | ||
targetPort: http | ||
--- | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: ceph-objectstore-exporter | ||
namespace: ${ARGOCD_ENV_rook_ceph_namespace} | ||
labels: | ||
app.kubernetes.io/name: ceph-objectstore-exporter | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: ceph-objectstore-exporter | ||
endpoints: | ||
- interval: 1m | ||
port: http | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters