python工程,kafka消息对接转换成配置文件并完成类似看门狗监控linux系统进程,定期清理日志
wangrong
2025-04-04 9fa450e81ee48a012abbff44ce4094ecf19265ff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
[KAFKA]
server = 192.168.0.78:9092
topics = vp_ba_jam, vp_ba_stop, vp_ba_crossline, vp_tracking
public_topic = vp_ba_result
 
[OUTPUT]
file = kafka_messages.txt
 
[TRANSFER]
access_topic = cameralist
# Maximum number of video channels per process
channel_size = 12
# Detection algorithm types
actions = JAM,STOP,WRONG_WAY,BARRIER_GATE,CROWD_GATHERING,PERSON_FALLDOWN,FIRE
# Path and filename for the generated configuration file
outfile = /home/pc1/Public/message_kafka/focus_monitor.json 
full_actions = JAM,STOP,WRONG_WAY,CROWD_GATHERING,PERSON_FALLDOWN,FIRE,JUNK_STACK,SMOCKING,BARRIER_GATE
# Whether to separately process video channels with actions specified in independent_action
need_independent = yes 
# Channels with action BARRIER_GATE need separate detection, only detect BARRIER_GATE,JAM
independent_action = BARRIER_GATE,JAM 
# Maximum number of channels in threads for separate detection
independent_channel_size = 1 
# Default frame skip interval for stream pulling
default_skip_interval = 3 
# Default frame skip interval for separately processed video channels
default_gate_interval = 1 
# Default video resize ratio
video_resize_ratio = 0.5 
# Default video source type
source_type = ffmpeg_rtsp 
 
[PROCESSES]
process_file = /home/pc1/Public/message_kafka/process_list.json
 
[clean]
log_dir = /home/pc1/Public/videopipes/log
# Time to clean logs, in days
log_expiry_days = 30 
file_dir = /home/pc1/Public/videopipes/record
# Time to clean files, in days
file_expiry_days = 60  
# Set cleanup time in HH:MM:SS format
cleanup_time = 00:10:50  
 
[SEND_MSG]
run_send = true
send_topics = cameralist
send_interval = 300
json_file = /home/pc1/Public/message_kafka/cameralist.json