The execution of the above playbook to enable the Web interface is shown below: $ ansible-playbook -i inventory/kvm/inventory playbooks/configuration/monit.yml -tags ui -K The Ansible playbook to enable the Monit’s Web interface is as follows: - name: Configure UI After making changes to the configuration file, the service needs to be restarted. The Web UI port needs to be enabled with basic login credentials. The default configuration file for Monit is located at /etc/monit/monitrc. Monit software provides a Web interface that listens on port 2812. The -K option prompts for the sudo password for the Debian user account. You can use up to four ‘v’s for a more detailed output. The -vv represents the verbosity in the Ansible output. The above playbook can be invoked using the following command: $ ansible-playbook -i inventory/kvm/inventory playbooks/configuration/monit.yml -tags install -vv -K Figure 3: Monit Web UI with SSH and Nginx name: Update the software package repository The Ansible playbook for the above tasks is provided below, for reference:. The Monit service is then started using systemd. The net-tools package is installed to provide the netstat command in the system. The Debian software package repository is first updated and then Monit is installed. You can now test connectivity from Ansible to the Debian 9 VM using the following command: $ ansible -i inventory/kvm/inventory debian -m ping You should add an entry in /etc/hosts file for the Debian VM as shown below: 192.168.122.197 debian Figure 2: Monit Web UI status The ‘debian’ user also requires sudo access: apt-get install adduser debian sudo Log in to the VM and install the sudo package. The default Debian 9 installation does not have the sudo package installed. The inventory/kvm/inventory file contains the following code: debian ansible_host=192.168.122.197 ansible_connection=ssh ansible_user=debian ansible_password=password The Ansible playbook and inventory file are created on the host system as follows: ansible/inventory/kvm/ The version of Ansible used is 2.6.0, as indicated below: $ ansible -versionĬonfigured module search path = Īnsible python module location = /usr/lib/python3.6/site-packages/ansible The host system is a Parabola GNU/Linux-libre x86_64 system and Ansible is installed using the distribution package manager. When we get a error free message like “ Control file syntax OK “, then we proceed ahead.Īs the part of Odoo server maintaining, it is very easy to handle the server in the case of any odoo server failure.A Debian 9 (x86_64) guest virtual machine (VM) using KVM/QEMU will be set up and monitored using Monit. If there any error occurred correct them. Status of Monit Service sudo /etc/init.d/monit statusįrom this we can know about the status of the monit service and also we can see that Odoo service is monitoring in monit function. When Odoo service will down the monit function automatically detect that and restarting the Odoo service. When will be finishing all configurations finally we will start the monit service. Once configured Odoo service program for monitoring, check if there is any error in monit syntax by the following command, Stop program "/etc/init.d/odoo-server stop"Īnd change The control file '/etc/monit/monitrc' permission to 0700. Start program "/etc/init.d/odoo-server start" sudo vim /etc/monit/monitrc check process odoo-server with pidfile /var/run/odoo-server.pid Install monit package in our odoo server by terminal sudo apt-get install monitĪdding Odoo Service in Monit Configuration FileĪfter the installation completed, adding the Odoo service program to monitor into the /etc/nf under RedhHat/CentOS/Fedora and /etc/monit/monitrc file for Ubuntu/Debian/Linux Mint at the services section. Few easy steps to create a script that will automatically start your odoo server when Ubuntu reboots. Additionally monit comes with a basic web interface through which all of the processes can be set up. It is a helpful program that automatically monitors and manages server programs. Instead of this autostart Odoo server, when down by using Monit service. When Odoo server is down we have to manually restart the Odoo service.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |