2
This commit is contained in:
parent
c8e9cc2cc9
commit
6a00cf0fa6
@ -5,7 +5,7 @@ require "json"
|
||||
|
||||
target_type = ARGV[0]
|
||||
|
||||
client = Mysql2::Client.new(:host => "localhost", :username => "prom", :password => "prom", :database => "registry")
|
||||
client = Mysql2::Client.new(:host => "db", :username => "prom", :password => "prom", :database => "registry")
|
||||
query = "SELECT t.target_id , t.target, tl.label_key,tl.label_value FROM targets t
|
||||
JOIN targets_lables tl ON t.target_id = tl.target_id
|
||||
WHERE t.y = 1 AND tl.target_id IN (SELECT t.target_id FROM targets t
|
||||
|
@ -1,6 +1,7 @@
|
||||
services:
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
container_name: prometheus
|
||||
restart: always
|
||||
ports:
|
||||
- 9090:9090
|
||||
@ -11,6 +12,7 @@ services:
|
||||
|
||||
web:
|
||||
image: nginx:latest
|
||||
container_name: web
|
||||
ports:
|
||||
- 8080:80
|
||||
volumes:
|
||||
@ -18,6 +20,7 @@ services:
|
||||
|
||||
blackbox:
|
||||
image: prom/blackbox-exporter:latest
|
||||
container_name: blackbox
|
||||
restart: always
|
||||
ports:
|
||||
- 9115:9115
|
||||
@ -26,6 +29,7 @@ services:
|
||||
|
||||
db:
|
||||
image: mariadb:lts
|
||||
container_name: db
|
||||
restart: always
|
||||
environment:
|
||||
MARIADB_ROOT_PASSWORD: example
|
||||
@ -40,6 +44,7 @@ services:
|
||||
|
||||
cron:
|
||||
image: mycron
|
||||
container_name: cron
|
||||
build:
|
||||
context: ./cron
|
||||
dockerfile: Dockerfile
|
||||
|
Loading…
Reference in New Issue
Block a user