How to install system monitoring tool monitorix in CentOS

Time:2021-4-18

Monitorix is a free system monitoring tool, which is used in Linux / unix system. You need to use Yum to install monitorix under CentOS. The following editor will introduce the method of installing monitorix under CentOS. Interested friends can learn about it.

 CentOS如何安装Monitorix工具

Installation:

1. Set an installation source under CentOS to facilitate the use of Yum command

  #vi /etc/yum.repos.d/CentOS-Base.repo

#Add the following at the end of the file

  [dag]

  name=Dag RPM Repository for Red Hat Enterprise Linux

  baseurl=http://apt.sw.be/RedHat/el$releasever/en/$basearch/dag

  gpgcheck=1

  gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

  enabled=1

2. Use Yum to install the software

  yum install rrdtool rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite perl-CGI perl-DBI perl-XML-Simple perl-Config-General perl-HTTP-Server-Simple wget

3. Next, use the WGet command to download the latest version of the “monitorix” package.

For example: # WGet http://www.monitorix.org/monitorix-3.4.0-1.noarch.rpm

Once the download is successful, install it using the RPM command.

  # rpm -ivh monitorix-3.4.0-1.noarch.rpm

Once the installation is successful, check the main configuration file ‘/ etc’/ monitorix.conf ’To enable or disable graphics, add some additional settings based on your system.

Finally, add the monitorix service to the system startup item and use the following two commands to start the service.

  # chkconfig –level 35 monitorix on

  # service monitorix start

Once you turn on the service, the program will start using the ‘/ etc/ monitorix.conf ’The configuration set in the file collects system information; after a few minutes,

You will start to see the system graphics from the browser in the following locations:

  http://localhost:8080/monitorix/

If you have SELinux enabled, the graph will not be visible, and you will see it in ‘/ var / log / messages’ or’ / var / log / audit ‘/ audit.log ’There are a lot of error messages in the file,

These error messages indicate that access to the RRD database file is denied. To clear such error messages and right-hand graphics, you need to disable SELinux.

To close SELinux, just change the line “enforcing” to “disabled” in the file ‘/ etc / SELinux / config’.

  SELINUX=disabled

The above change will temporarily disable SELinux until you restart the machine. If you want the system to always turn on in disabled mode, restart the system.

To monitor multiple Linux hosts at the same time. You need to install “monitorix” on each Linux host and modify the configuration file of one of the Linux hosts monitorix.conf .

Find and modify as follows:

  《multihost》

Enabled = n / / change enable to y

  footer_url = y

  graphs_per_row = 2

  remotehost_list = server 1

  《remotehost_desc》

1= http://172.16.0.102 : 8080, /, / / / change here to the IP address of the host to be monitored:

  《/remotehost_desc》

  groups = n

  remotegroup_list = My Group

  《remotegroup_desc》

  0 = server 2, server 3

  《/remotegroup_desc》

  《/multihost》

The above is the method of installing monitorix in CentOS. Before installing monitorix, you need to set an installation source, and then use WGet command and RPM command to download and install.

Recommended Today

Envoy announced alpha version of native support for windows

Author: sunjay Bhatia Since 2016, porting envoy to the windows platform has been an important part of the projectOne of the goalsToday, we are excited to announce the alpha version of envoy’s windows native support. The contributor community has been working hard to bring the rich features of envoy to windows, which is another step […]