Skip to content

Commit

Permalink
fixed yamllint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alecmerdler committed Aug 12, 2024
1 parent 362e37c commit 18b4888
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 74 deletions.
19 changes: 9 additions & 10 deletions authzed-dedicated-metrics/datadog/otel-config.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
---
receivers:
prometheus:
config:
scrape_configs:
- job_name: 'prometheus'
metrics_path: /api/v1alpha/metrics
scrape_interval: 15s
- job_name: "prometheus"
metrics_path: "/api/v1alpha/metrics"
scrape_interval: "15s"
static_configs:
- targets: ['<YOUR_AUTHZED_DEDICATED_INSTANCE>']
- targets: ["<YOUR_AUTHZED_DEDICATED_INSTANCE>"]
basic_auth:
username: '<PS_NAME>'
password: '<METRICS_TOKEN>'

username: "<PS_NAME>"
password: "<METRICS_TOKEN>"
exporters:
datadog:
api:
site: "<YOUR_DATADOG_SITE>"
key: "<YOUR_DATADOG_API_KEY>"

service:
pipelines:
metrics:
receivers: [prometheus]
receivers: ["prometheus"]
processors: []
exporters: [datadog]
exporters: ["datadog"]
10 changes: 5 additions & 5 deletions authzed-dedicated-metrics/otel-collector/env-vars.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export PROMETHEUS_USERNAME='<permission-system-name>'
export PROMETHEUS_PASSWORD='<permission-system-token>'
export OTEL_EXPORTER_OTLP_ENDPOINT="https://<metrics-service-url>:443"
export OTEL_EXPORTER_OTLP_HEADERS="your-service-key"
export OTEL_SERVICE_NAME="authzed-<permission-system-name>"
export PROMETHEUS_USERNAME='<permission-system-name>'
export PROMETHEUS_PASSWORD='<permission-system-token>'
export OTEL_EXPORTER_OTLP_ENDPOINT="https://<metrics-service-url>:443"
export OTEL_EXPORTER_OTLP_HEADERS="your-service-key"
export OTEL_SERVICE_NAME="authzed-<permission-system-name>"
23 changes: 11 additions & 12 deletions authzed-dedicated-metrics/otel-collector/otel-collector-config.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
---
receivers:
prometheus:
config:
scrape_configs:
- job_name: 'prometheus'
metrics_path: /api/v1alpha/metrics
scrape_interval: 15s
- job_name: "prometheus"
metrics_path: "/api/v1alpha/metrics"
scrape_interval: "15s"
static_configs:
- targets: ['app.admin.demo.aws.authzed.net']
- targets: ["app.admin.demo.aws.authzed.net"]
basic_auth:
username: ${PROMETHEUS_USERNAME}
password: ${PROMETHEUS_PASSWORD}

username: ${PROMETHEUS_USERNAME} # yamllint disable-line rule:quoted-strings
password: ${PROMETHEUS_PASSWORD} # yamllint disable-line rule:quoted-strings
exporters:
otlp:
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT}
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT} # yamllint disable-line rule:quoted-strings
headers:
x-honeycomb-team: ${OTEL_EXPORTER_OTLP_HEADERS}

x-honeycomb-team: ${OTEL_EXPORTER_OTLP_HEADERS} # yamllint disable-line rule:quoted-strings
service:
pipelines:
metrics:
receivers: [prometheus]
exporters: [otlp]
receivers: ["prometheus"]
exporters: ["otlp"]
9 changes: 0 additions & 9 deletions authzed-dedicated-metrics/prometheus-grafana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,11 @@ Here's an example of a filled-out configuration:
- "https://app.demo.aws.authzed.net"
```


3. Save prometheus.yml

4. Run `docker compose up`


### Ports:

Prometheus: 9090
Grafana: 3000







29 changes: 15 additions & 14 deletions authzed-dedicated-metrics/prometheus-grafana/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
---
services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
image: "prom/prometheus:latest"
container_name: "prometheus"
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- "--config.file=/etc/prometheus/prometheus.yml"
ports:
- 9090:9090
restart: unless-stopped
- "9090:9090"
restart: "unless-stopped"
volumes:
- ./prometheus:/etc/prometheus
- prom_data:/prometheus
- "./prometheus:/etc/prometheus"
- "prom_data:/prometheus"
grafana:
image: grafana/grafana:latest
container_name: grafana
image: "grafana/grafana:latest"
container_name: "grafana"
ports:
- 3000:3000
restart: unless-stopped
- "3000:3000"
restart: "unless-stopped"
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=grafana
- "GF_SECURITY_ADMIN_USER=admin"
- "GF_SECURITY_ADMIN_PASSWORD=grafana"
volumes:
- ./grafana:/etc/grafana/provisioning/datasources
- "./grafana:/etc/grafana/provisioning/datasources"
volumes:
prom_data:
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: 1

---
apiVersion: "1"
datasources:
- name: Prometheus
type: prometheus
url: http://prometheus:9090
isDefault: true
access: proxy
editable: true
- name: "Prometheus"
type: "prometheus"
url: "http://prometheus:9090"
isDefault: true
access: "proxy"
editable: true
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
---
global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 15s

scrape_interval: "15s"
scrape_timeout: "10s"
evaluation_interval: "15s"
alerting:
alertmanagers:
- static_configs:
- targets: []

scrape_configs:
- job_name: prometheus
- job_name: "prometheus"
honor_timestamps: true
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
scrape_interval: "15s"
scrape_timeout: "10s"
metrics_path: "/metrics"
scheme: "http"
static_configs:
- targets:
- localhost:9090
- "localhost:9090"
- job_name: "exported-metrics-from-[permission-system]"
metrics_path: /api/v1alpha/metrics
metrics_path: "/api/v1alpha/metrics"
basic_auth:
username: "[permission-system]"
password: "[token]"
static_configs:
- targets:
- "[authzed-dashboard-url]"



- "[authzed-dashboard-url]"

0 comments on commit 18b4888

Please sign in to comment.