Compare commits

..

No commits in common. "a8ac06189dfeabd8c77932dff3848bc9e2cc81d4" and "ae72627756469e06d7756b9b331156b367d4e3af" have entirely different histories.

3 changed files with 0 additions and 31 deletions

View File

@ -1,19 +0,0 @@
version: "3.3"
services:
exporter:
build: .
ports:
- 8888:8888
command: python3 -u /usr/src/process.py rtsp://ubnt:ubnt@10.8.0.124:554/live/ch00_0
restart: always
prometheus:
image: prom/prometheus:v2.17.1
volumes:
- ./prometheus.yml:/prometheus/prometheus.yml
command:
- '--config.file=/prometheus/prometheus.yml'
ports:
- 9090:9090
restart: always

View File

@ -8,7 +8,6 @@ from prometheus_client import start_http_server, Counter, Gauge
cut_count = Counter('cut_count', 'Total number of jebnięcie') cut_count = Counter('cut_count', 'Total number of jebnięcie')
machine_on = Gauge('machine_on', 'Current machine engine status') machine_on = Gauge('machine_on', 'Current machine engine status')
stream_on = Gauge('stream_on', 'Current camera stream status')
start_http_server(8888) start_http_server(8888)
@ -21,7 +20,6 @@ def dist(pos1, pos2):
def run(path): def run(path):
gui = 'DISPLAY' in os.environ gui = 'DISPLAY' in os.environ
stream_on.set(0)
machine_on.set(0) machine_on.set(0)
# Create a VideoCapture object and read from input file # Create a VideoCapture object and read from input file
@ -33,7 +31,6 @@ def run(path):
raise Exception('VideoCapture not opened') raise Exception('VideoCapture not opened')
print('Opened') print('Opened')
stream_on.set(1)
spots = [] spots = []
@ -123,5 +120,4 @@ while True:
run(sys.argv[1]) run(sys.argv[1])
except Exception as exc: except Exception as exc:
print(exc) print(exc)
stream_on.set(0)
time.sleep(5.0) time.sleep(5.0)

View File

@ -1,8 +0,0 @@
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: sztancarka
static_configs:
- targets: ["exporter:8888"]