added hostname and ipaddress to stats

This commit is contained in:
Scott Hanson 2022-02-27 17:00:36 -05:00 committed by GitHub
parent 08f573aaa5
commit 123cef3b55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,7 @@ import time
import psutil import psutil
import shutil import shutil
import os import os
import socket
from frigate.config import FrigateConfig from frigate.config import FrigateConfig
from frigate.const import RECORD_DIR, CLIPS_DIR, CACHE_DIR from frigate.const import RECORD_DIR, CLIPS_DIR, CACHE_DIR
@ -85,6 +86,8 @@ def stats_snapshot(stats_tracking):
"version": VERSION, "version": VERSION,
"storage": {}, "storage": {},
"temperatures": get_temperatures(), "temperatures": get_temperatures(),
"hostname": socket.gethostname(),
"ipaddress": socket.gethostbyname(socket.gethostname()),
} }
for path in [RECORD_DIR, CLIPS_DIR, CACHE_DIR, "/dev/shm"]: for path in [RECORD_DIR, CLIPS_DIR, CACHE_DIR, "/dev/shm"]: