Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
I
iot-mqtt-bl
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
deploy
iot-mqtt-bl
Commits
fbc638a4
Commit
fbc638a4
authored
Apr 27, 2023
by
吴文龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
60df2149
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
haproxy.cfg
haproxy/config/haproxy.cfg
+1
-1
check_mqtt.sh
haproxy/data/check_mqtt.sh
+1
-1
No files found.
haproxy/config/haproxy.cfg
View file @
fbc638a4
...
...
@@ -45,7 +45,7 @@ listen mqtt-in
timeout server 3h
option external-check
option log-health-checks
external-check path "/usr/
local/bin:
/bin"
external-check path "/usr/
bin:/bin:/usr/local
/bin"
external-check command /usr/local/bin/check_mqtt.sh
server tbMqtt1 47.99.83.75:31883 check inter 10s rise 2 fall 3
server tbMqtt2 47.97.197.103:31883 check inter 10s rise 2 fall 3
...
...
haproxy/data/check_mqtt.sh
View file @
fbc638a4
#!/bin/
ba
sh
#!/bin/sh
echo
$@
>>
/tmp/all_arguments.txt
ip_adr
=
$(
echo
$@
|awk
'{print $3}'
)
if
mosquitto_pub
-h
$ip_adr
-p
31883
-u
123456
-t
v1/devices/me/attributes
-f
test-mqtt.json
-q
1
-d
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment