Skip to content

Commit

Permalink
Merge pull request #96 from hubblo-org/uggla-feat/factorize_exporter
Browse files Browse the repository at this point in the history
WIP: feat: uggla feat/factorize exporter (fixing conflicts)
  • Loading branch information
bpetit authored Apr 9, 2021
2 parents 26d65d6 + ddcfb1d commit f88d107
Show file tree
Hide file tree
Showing 10 changed files with 739 additions and 731 deletions.
2 changes: 2 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
rustdocflags = ["--document-private-items"]
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ serde_json = "1.0"
warp10 = "1.0.0"
time = "0.2.25"
colored = "2.0.0"
chrono = "0.4.19"
38 changes: 38 additions & 0 deletions docker-compose/docker-compose-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
version: '3.2'

services:

scaphandre:
image: scaphandre-dev
ports:
- "8089:8080"
volumes:
- type: bind
source: /proc
target: /proc
- type: bind
source: /sys/class/powercap
target: /sys/class/powercap
command: ["prometheus"]
networks:
- scaphandre-network

prometheus:
build:
context: ./prom-dev
ports:
- "9099:9090"
volumes:
- promdata-scaphandre:/prometheus
networks:
- scaphandre-network

volumes:
promdata-scaphandre:

networks:
scaphandre-network:
driver: bridge
ipam:
config:
- subnet: 192.168.33.0/24
5 changes: 5 additions & 0 deletions docker-compose/prom-dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM prom/prometheus


COPY /prometheus.yml /etc/prometheus/prometheus.yml

38 changes: 38 additions & 0 deletions docker-compose/prom-dev/prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@


# my global config
global:
scrape_interval: 10s # 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).

# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'scaphandre-monitor'

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first.rules"
# - "second.rules"

# 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: 'scaphandre'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.

static_configs:
- targets: ['scaphandre:8089']


Loading

0 comments on commit f88d107

Please sign in to comment.