Created
May 8, 2024 07:45
-
-
Save arsalanses/f37ffb17d99937dd74a4bee7f6ed2b80 to your computer and use it in GitHub Desktop.
krakend
This file contains hidden or 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
| services: | |
| krakend: | |
| image: "devopsfaith/krakend:2.6.2" | |
| restart: unless-stopped | |
| container_name: krakend | |
| ports: | |
| - "8080:8080" | |
| volumes: | |
| - "./krakend.json:/etc/krakend/krakend.json:ro" | |
| prometheus: | |
| image: prom/prometheus:latest | |
| ports: | |
| - "9090:9090" | |
| volumes: | |
| - "./prometheus.yml:/etc/prometheus/prometheus.yml" | |
| grafana: | |
| image: grafana/grafana:latest | |
| ports: | |
| - "3000:3000" | |
| environment: | |
| GF_SECURITY_ADMIN_USER: krakend | |
| GF_SECURITY_ADMIN_PASSWORD: krakend | |
| GF_AUT_ANONYMOUS_ENABLED: "true" | |
| # volumes: | |
| # - "./conf/provisioning/datasources:/etc/grafana/provisioning/datasources" | |
| # - "./conf/provisioning/dashboards:/etc/grafana/provisioning/dashboards" | |
| # - "./conf/data/dashboards:/var/lib/grafana/dashboards" | |
| # https://grafana.com/orgs/krakendio/dashboards |
This file contains hidden or 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
| { | |
| "version": 3, | |
| "endpoints": [ | |
| { | |
| "endpoint": "/v1/foo-bar/{anything}", | |
| "method": "GET", | |
| "input_query_strings": [ | |
| "items" | |
| ], | |
| "input_headers": [], | |
| "extra_config": { | |
| "qos/ratelimit/router": { | |
| "max_rate": 1, | |
| "capacity": 1 | |
| } | |
| }, | |
| "backend": [ | |
| { | |
| "url_pattern": "/anything/{anything}", | |
| "method": "GET", | |
| "host": [ | |
| "https://httpbin.org" | |
| ] | |
| } | |
| ] | |
| } | |
| ], | |
| "extra_config": { | |
| "telemetry/opentelemetry": { | |
| "service_name": "krakend_prometheus_service", | |
| "metric_reporting_period": 1, | |
| "exporters": { | |
| "prometheus": [ | |
| { | |
| "name": "local_prometheus", | |
| "port": 9090, | |
| "process_metrics": true, | |
| "go_metrics": true | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } |
This file contains hidden or 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
| global: | |
| scrape_interval: 60s | |
| # rule_files: | |
| # - "first.rules" | |
| # - "second.rules" | |
| scrape_configs: | |
| - job_name: krakend_otel | |
| scrape_interval: 60s | |
| metrics_path: '/metrics' | |
| static_configs: | |
| - targets: | |
| - 'krakend:9091' | |
| labels: | |
| app: kotel_example |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment