Database Sensors can be started and stopped via the Instance settings screen. If you see the green shield icon next to the Database target then the sensors is running. If the status icon is red with a question mark then you can mouseover the icon to see the reason it failed to start. The most likely reasons are connectivity issues due to incorrect connection details being entered or lack of connectivity between the DBmarlin server and the taget database instance.
Host Sensors can be started and stopped via the Host settings screen. If you see the green shield icon next to the Database target then the sensors is running. If the status icon is red with a question mark then you can mouseover the icon to see the reason it failed to start. The most likely reasons are connectivity issues due to incorrect connection details being entered or lack of connectivity between the DBmarlin server and the taget host.
DBmarlin Server Processes
The DBmarlin server is made up of 3 processes: Nginx, Tomcat and PostgreSQL. See the architecture page for more deails. All 3 proceses can be started via a single command
start.sh and stopped via
stop.sh. You can, if needed, start and stop individual processes using the
-p parameters for Nginx, Tomcat and PostgreSQL respectively.
The start.sh, stop.sh and status.sh scripts must be run as a dbmarlin user account or other non-root user account with access to the DBmarlin install directory.
Start the 3 DBmarlin server processes.
Stop the 3 DBmarlin server processes.
Check the status of the 3 DBmarlin server processes.
systemd startup for Linux
Systemd is a modern SysV-style
rc replacement for Linux systems which makes use of many modern Linux kernel features. It provides a system and service manager that runs as PID 1 and starts the rest of the system. Systemd is what is responsible for controlling how services are started, stopped, restarted and otherwise managed on modern Linux distributions.
The standard Systemd Service unit files that come with the Linux system or installed by third party applications usually run as root or system user account.
Installing systemd unit files for DBmarlin
Login as the
DBmarlin comes with 3 Systemd Service unit files for each of the 3 processes and can be found in the
scripts/systemddirectory wherever you installed DBmarlin.cd scripts/systemdls -l-rw-rw-r-- 1 dbmarlin dbmarlin 796 Dec 2 01:07 dbmarlin-nginx.service-rw-r--r-- 1 dbmarlin dbmarlin 437 Dec 2 01:07 dbmarlin-postgresql.service-rw-r--r-- 1 dbmarlin dbmarlin 511 Dec 2 01:07 dbmarlin-tomcat.service
Important. You will first need to edit the file so that they contain the correct path where you have installed DBmarlin. The unit files assume the installation directory to be
/opt/dbmarlinbut if that is not the case you should replace all references to
/opt/dbmarlinwith the correct location.
Copy the 3 service unit files to
/etc/systemd/systemand then run
systemctl daemon-reloadcd scripts/systemdcp dbmarlin*.service /etc/systemd/systemsystemctl daemon-reload
systemctl list-unit-files | grep dbmarlin- you should see them listed but disabled which means they won't automatically start on a machine reboot but can be started and stopped manually via
systemctlsystemctl list-unit-files | grep dbmarlindbmarlin-nginx.service disableddbmarlin-postgresql.service disableddbmarlin-tomcat.service disabled
systemctl start- to start the servicessystemctl start dbmarlin-nginxsystemctl start dbmarlin-tomcatsystemctl start dbmarlin-postgresql
systemctl status- to get the current status of the servicessystemctl status dbmarlin-nginxsystemctl status dbmarlin-tomcatsystemctl status dbmarlin-postgresql
systemctl stop- to stop the servicessystemctl stop dbmarlin-nginxsystemctl stop dbmarlin-tomcatsystemctl stop dbmarlin-postgresql
systemctl enable dbmarlin-nginx- to make the service automatically restart on rebootsystemctl enable dbmarlin-nginxsystemctl enable dbmarlin-tomcatsystemctl enable dbmarlin-postgresql
For more on systemd see https://www.redhat.com/sysadmin/getting-started-systemctl