0
0
IOT Protocolsdevops~10 mins

MQTT broker role in IOT Protocols - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to start an MQTT broker using the popular Mosquitto service.

IOT Protocols
sudo systemctl [1] mosquitto
Drag options to blanks, or click blank then click option'
Astop
Bstatus
Cstart
Drestart
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'stop' instead of 'start' stops the service.
Using 'status' only shows the service status but does not start it.
2fill in blank
medium

Complete the command to check if the MQTT broker is running.

IOT Protocols
sudo systemctl [1] mosquitto
Drag options to blanks, or click blank then click option'
Adisable
Benable
Cstart
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'start' will try to launch the service instead of checking it.
Using 'enable' or 'disable' changes startup behavior but does not show running status.
3fill in blank
hard

Fix the error in the command to restart the MQTT broker.

IOT Protocols
sudo systemctl [1] mosquitto
Drag options to blanks, or click blank then click option'
Astop
Brestart
Creload
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'reload' may not fully restart the service.
Using 'stop' only stops the service without starting it again.
4fill in blank
hard

Fill both blanks to create a command that enables the MQTT broker to start automatically on boot and then start it now.

IOT Protocols
sudo systemctl [1] mosquitto && sudo systemctl [2] mosquitto
Drag options to blanks, or click blank then click option'
Aenable
Bstart
Cstop
Ddisable
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'stop' or 'disable' will prevent the broker from running.
Reversing the order may start the service but not enable it on boot.
5fill in blank
hard

Fill all three blanks to create a command that shows the MQTT broker logs, filters for errors, and limits output to the last 10 lines.

IOT Protocols
sudo journalctl -u mosquitto | grep [1] | tail -n [2]
Drag options to blanks, or click blank then click option'
Awarning
Berror
C10
Dinfo
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'warning' or 'info' filters different log levels.
Not limiting lines may show too much output.