-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Monitoring adding openstack metrics exporter
- Loading branch information
Showing
12 changed files
with
115 additions
and
96 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...orkflows/helm-openstack-api-exporter.yaml → ...lm-prometheus-openstack-api-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
50 changes: 50 additions & 0 deletions
50
.github/workflows/helm-prometheus-openstack-metrics-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,50 @@ | ||
name: Helm GitHub Actions for openstack-metrics-exporter | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- helm-configs/monitoring/openstack-metrics-exporter/** | ||
- kustomize/monitoring/openstack-metrics-exporter/** | ||
- .github/workflows/helm-openstack-metrics-exporter.yaml | ||
jobs: | ||
helm: | ||
strategy: | ||
matrix: | ||
overlays: | ||
- base | ||
- aio | ||
name: Helm | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- uses: azure/setup-helm@v3 | ||
with: | ||
version: latest | ||
token: "${{ secrets.GITHUB_TOKEN }}" | ||
id: helm | ||
- name: Kubectl Install | ||
working-directory: /usr/local/bin/ | ||
run: | | ||
if [ ! -f /usr/local/bin/kubectl ]; then | ||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | ||
chmod +x ./kubectl | ||
fi | ||
- name: Pull Openstack Exporter submodules | ||
run: | | ||
git submodule update --init submodules/openstack-exporter | ||
- name: Run Helm Template | ||
run: | | ||
cd submodules/openstack-helm-infra | ||
${{ steps.helm.outputs.helm-path }} template os-metrics ./prometheus-openstack-exporter \ | ||
--namespace=openstack \ | ||
--wait \ | ||
--timeout 120m \ | ||
-f ${{ github.workspace }}/helm-configs/monitoring/openstack-metrics-exporter/openstack-metrics-exporter-helm-overrides.yaml \ | ||
--post-renderer ${{ github.workspace }}/kustomize/kustomize.sh \ | ||
--post-renderer-args monitoring/openstack-metrics-exporter/${{ matrix.overlays }} > /tmp/rendered.yaml | ||
- name: Return helm Build | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: helm-openstack-exporter-artifact-${{ matrix.overlays }} | ||
path: /tmp/rendered.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,24 @@ | ||
##Openstack Exporter | ||
|
||
We are using Prometheus for monitoring and metrics collection backend along with the openstack exporter to gather openstack resource metrics | ||
For more information see: https://prometheus.io and https://github.com/openstack-exporter/openstack-exporter | ||
|
||
## Deploy the Prometheus Openstack Exporter | ||
|
||
### Create clouds-yaml secret | ||
Modify genestack/helm-configs/monitoring/openstack-metrics-exporter/clouds-yaml with the appropriate settings and create the secret. | ||
|
||
```shell | ||
kubectl create secret generic clouds-yaml-secret --from-file /opt/genestack/helm-configs/monitoring/openstack-metrics-exporter/clouds-yaml | ||
``` | ||
|
||
### Install openstack-metrics-exporter helm chart | ||
```shell | ||
cd /opt/genestack/submodules/openstack-exporter/helm-charts/charts | ||
|
||
helm upgrade --install os-metrics ./prometheus-openstack-exporter \ | ||
--namespace=openstack \ | ||
--timeout 15m \ | ||
-f /opt/genestack/helm-configs/monitoring/openstack-metrics-exporter/openstack-metrics-exporter-helm-overrides.yaml \ | ||
--set clouds_yaml_config="$(kubectl get secret clouds-yaml-secret -o jsonpath='{.data.clouds-yaml}' | base64 -d)" | ||
``` |
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ image: | |
pullPolicy: Always | ||
|
||
serviceMonitor: | ||
interval: 1m | ||
interval: 3m | ||
scrapeTimeout: 30s | ||
|
||
multicloud: | ||
|
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
14 changes: 14 additions & 0 deletions
14
kustomize/monitoring/openstack-metrics-exporter/aio/kustomization.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,14 @@ | ||
bases: | ||
- ../base | ||
|
||
patches: | ||
- target: | ||
kind: HorizontalPodAutoscaler | ||
name: os-metrics-prometheus-openstack-exporter | ||
patch: |- | ||
- op: replace | ||
path: /spec/minReplicas | ||
value: 1 | ||
- op: replace | ||
path: /spec/maxReplicas | ||
value: 1 |
19 changes: 19 additions & 0 deletions
19
kustomize/monitoring/openstack-metrics-exporter/base/hpa-openstack-metrics-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,19 @@ | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: os-metrics-prometheus-openstack-exporter | ||
namespace: openstack | ||
spec: | ||
maxReplicas: 3 | ||
minReplicas: 1 | ||
metrics: | ||
- resource: | ||
name: cpu | ||
target: | ||
averageUtilization: 50 | ||
type: Utilization | ||
type: Resource | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: os-metrics-prometheus-openstack-exporter |
3 changes: 3 additions & 0 deletions
3
kustomize/monitoring/openstack-metrics-exporter/base/kustomization.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,3 @@ | ||
resources: | ||
- hpa-openstack-metrics-exporter.yaml | ||
- all.yaml |
11 changes: 0 additions & 11 deletions
11
kustomize/monitoring/openstack-metrics-exporter/clouds-yaml
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
kustomize/monitoring/openstack-metrics-exporter/kustomization.yaml
This file was deleted.
Oops, something went wrong.
71 changes: 0 additions & 71 deletions
71
kustomize/monitoring/openstack-metrics-exporter/values.yaml
This file was deleted.
Oops, something went wrong.