Monsta Service Management via Command Line (Linux)
This article describes the standard procedures to start, stop, and check the status of Monsta services on Linux operating systems using the systemd (systemctl) utility.
1. Starting Services (Start)
Section titled “1. Starting Services (Start)”Starting Monsta services must follow a specific order of dependencies to ensure the underlying infrastructure is ready before the routing and update modules are activated.
Run the commands below sequentially in the terminal with superuser privileges (sudo):
# 1. Start the databasesudo systemctl start monsta-com.monstadb.service
# 2. Start monagent, responsible for collectionssudo systemctl start monsta-com.monagent.service
# 3. Start the system core, responsible for logs and the interface between other services and the databasesudo systemctl start monsta-com.monkernel.service
# 4. Start the HTTP server responsible for providing the HTTP interface to the usersudo systemctl start monsta-com.monrouter.service
# 5. Start the subsystem that periodically checks for new updatessudo systemctl start monsta-com.monstaupd.service2. Stopping Services (Stop)
Section titled “2. Stopping Services (Stop)”To stop the services, you can choose to stop them individually or all at once.
Stopping Individually
Section titled “Stopping Individually”Replace <nome-do-servico> with the corresponding identifier (for example, monstaupd, monrouter, etc.):
sudo systemctl stop monsta-com.<nome-do-servico>.serviceComplete Stop (All Services)
Section titled “Complete Stop (All Services)”To stop all Monsta ecosystem services at once quickly, use the wildcard (*):
sudo systemctl stop monsta-com.*3. Checking Status
Section titled “3. Checking Status”To check whether a specific service is running, active, and if there are recent log messages related to its state, use the status command:
sudo systemctl status monsta-com.<nome-do-servico>.serviceExample to check the database status:
sudo systemctl status monsta-com.monstadb.service