1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-20 05:48:42 +00:00
This commit is contained in:
kev 2021-11-29 15:23:49 +08:00
parent d33a7d4379
commit be138ae446
7 changed files with 60 additions and 22 deletions

@ -3,4 +3,6 @@ prometheus
[Prometheus][1] is an open-source systems monitoring and alerting toolkit originally built at SoundCloud. [Prometheus][1] is an open-source systems monitoring and alerting toolkit originally built at SoundCloud.
![](http://www.robustperception.io/wp-content/uploads/2015/11/Replacing-Graphite-with-Prometheus.png)
[1]: https://prometheus.io/docs/introduction/overview/ [1]: https://prometheus.io/docs/introduction/overview/

@ -0,0 +1,20 @@
mappings:
- match: test.dispatcher.*.*.*
name: dispatcher_events_total
labels:
action: $2
job: test_dispatcher
outcome: $3
processor: $1
- match: '*.signup.*.*'
name: signup_events_total
labels:
job: ${1}_server
outcome: $3
provider: $2
- match: 'servers\.(.*)\.networking\.subnetworks\.transmissions\.([a-z0-9-]+)\.(.*)'
match_type: regex
name: 'servers_networking_transmissions_${3}'
labels:
hostname: ${1}
device: ${2}

@ -1,19 +1,16 @@
global: global:
scrape_interval: 15s # By default, scrape targets every 15 seconds. scrape_interval: 15s
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels: external_labels:
monitor: 'codelab-monitor' monitor: 'codelab-monitor'
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs: scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus' - job_name: 'prometheus'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5s scrape_interval: 5s
static_configs: static_configs:
- targets: ['localhost:9090'] - targets: ['localhost:9090']
- job_name: 'graphite'
honor_labels: true
static_configs:
- targets:
- graphite:9108

@ -1,15 +1,32 @@
version: "3.8" version: "3.8"
services: services:
prometheus: prometheus:
image: prom/prometheus:v2.31.1 image: prom/prometheus:v2.31.1
command: command:
- '--config.file=/etc/prometheus/prometheus.yml' - "--config.file=/etc/prometheus/prometheus.yml"
- '--storage.tsdb.path=/var/lib/prometheus' - "--storage.tsdb.path=/var/lib/prometheus"
- '--web.console.libraries=/usr/share/prometheus/console_libraries' - "--web.console.libraries=/usr/share/prometheus/console_libraries"
- '--web.console.templates=/usr/share/prometheus/consoles' - "--web.console.templates=/usr/share/prometheus/consoles"
- "--web.external-url=http://127.0.0.1:9090"
- "--storage.tsdb.retention.time=1y"
ports: ports:
- "9090:9090" - "9090:9090"
volumes: volumes:
- ./data/etc:/etc/prometheus - ./data/etc:/etc/prometheus
- ./data/var:/var/lib/prometheus - ./data/var:/var/lib/prometheus
restart: unless-stopped restart: unless-stopped
graphite:
image: prom/graphite-exporter
command:
- "--graphite.mapping-config=/etc/prometheus/graphite-mapping.yaml"
- "--graphite.mapping-strict-match"
ports:
- "9108:9108"
- "9109:9109"
- "9109:9109/udp"
volumes:
- ./data/etc:/etc/prometheus
restart: unless-stopped

@ -5,13 +5,14 @@ trino
distributed over one or more heterogeneous data sources. distributed over one or more heterogeneous data sources.
```bash ```bash
$ mkdir -m 777 data $ mkdir data/{etc,data}
$ chown -R 1000:1000 data
$ docker-compose up -d $ docker-compose up -d
$ docker-compose exec trino trino $ docker-compose exec trino trino
>>> show catalogs; >>> show catalogs;
>>> show schemas from jmx; >>> show schemas from system;
>>> show tables from jmx.current; >>> show tables from system.runtime;
>>> select * from jmx.current."java.lang:type=operatingsystem"; >>> select * from system.runtime.queries;
>>> quit >>> quit
``` ```

@ -1,3 +1,3 @@
node.environment=docker node.environment=docker
node.data-dir=/var/lib/trino node.data-dir=/usr/lib/trino/data
node.id=master node.id=master

@ -2,10 +2,11 @@ version: "3.8"
services: services:
trino: trino:
image: trinodb/trino image: trinodb/trino
command: ["/usr/lib/trino/bin/launcher", "run", "--etc-dir", "etc", "--data-dir", "data"] command: ["bin/launcher", "run", "--etc-dir", "etc", "--data-dir", "data"]
ports: ports:
- "8080:8080" - "8080:8080"
volumes: volumes:
- ./data:/opt/trino - ./data/etc:/usr/lib/trino/etc
working_dir: /opt/trino - ./data/data:/usr/lib/trino/data
working_dir: /usr/lib/trino
restart: unless-stopped restart: unless-stopped