change project structure

rc
SavelyG 2025-02-05 13:12:42 +00:00
parent 4896fb6385
commit f836ae401b
6 changed files with 0 additions and 42 deletions

View File

@ -1,7 +0,0 @@
root = "."
tmp_dir = "tmp"
[build]
cmd = "go build -o ./tmp/app ."
bin = "./tmp/app"
include_ext = ["go"]

View File

@ -1,16 +0,0 @@
services:
exporter:
image: cosmtrek/air:v1.61.7
volumes:
- .:/app
working_dir: /app
ports:
- "9101:9101"
command: ["air", "-c", ".air.toml"]
prometheus:
image: prom/prometheus:v3.1.0
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"

View File

@ -1,7 +0,0 @@
global:
scrape_interval: 1s # Интервал сбора метрик
scrape_configs:
- job_name: "exporter"
static_configs:
- targets: ["exporter:9101"] # Сервис экспортёра

View File

@ -1,12 +0,0 @@
curl -X POST -H "Content-Type: application/json" -d '{
"id": "gauge_test",
"name": "Gauge Metric",
"url": "http://127.0.0.1:8081/gauge",
"method": "GET",
"type": "gauge",
"metrics": {
"temperature": 36.6
}
}' "http://localhost:9101/update"
curl http://localhost:9101/metrics