Skip to content

Commit

Permalink
add grafana and prometheus
Browse files Browse the repository at this point in the history
  • Loading branch information
ekneg54 committed Oct 6, 2023
1 parent 37e2a4d commit 74ca331
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 0 deletions.
16 changes: 16 additions & 0 deletions quickstart/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,21 @@ services:
- logprep
- /home/logprep/quickstart/exampledata/config/pipeline.yml

grafana:
image: bitnami/grafana:latest
expose:
- 3000
network_mode: host
volumes:
- ../quickstart/exampledata/config/grafana/datasources:/opt/bitnami/grafana/conf/provisioning/datasources
- ../quickstart/exampledata/config/grafana/dashboards:/opt/bitnami/grafana/conf/provisioning/dashboards
prometheus:
image: bitnami/prometheus:latest
network_mode: host
expose:
- 9090
volumes:
- ../quickstart/exampledata/config/prometheus/prometheus.yml:/opt/bitnami/prometheus/conf/prometheus.yml

volumes:
data:
15 changes: 15 additions & 0 deletions quickstart/exampledata/config/grafana/datasources/prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: 1

datasources:
- name: Prometheus
type: prometheus
access: proxy
# Access mode - proxy (server in the UI) or direct (browser in the UI).
url: http://localhost:9090
jsonData:
httpMethod: POST
manageAlerts: true
prometheusType: Prometheus
cacheLevel: 'High'
disableRecordingRules: false
incrementalQueryOverlapWindow: 10m
3 changes: 3 additions & 0 deletions quickstart/exampledata/config/prometheus/logprep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- targets:
- '127.0.0.1:8000'
labels: []
32 changes: 32 additions & 0 deletions quickstart/exampledata/config/prometheus/prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).

# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: "prometheus"

# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.

static_configs:
- targets: ["localhost:9090"]
- job_name: "logprep"
static_configs:
- targets: ["localhost:8000"]

0 comments on commit 74ca331

Please sign in to comment.