2015-03-04

Monitorix: System Resource Monitoring for Linux

Monitorix is a daemon that enables you to monitor your Linux server/system resources. It has built-in web server, and developed using Perl. To install the daemon on ArchLinux, use this command:

yaourt --needed --noconfirm -S --force monitorix
sudo systemctl enable monitorix
sudo systemctl start monitorix

The configuration file can be found on /etc/monitorix/monitorix.conf, for example you can enable the built-in webserver and change the port, change the network interface's to be monitored or enable and disable sensors, just find the key and change it, for example:

<httpd_builtin>
  enabled = y
  host = 127.0.0.1
  port = 8081
  user = nobody
  group = nobody
  log_file = /var/log/monitorix-httpd
  hosts_deny =
  hosts_allow =
  <auth>
    enabled = y
    msg = Monitorix: Restricted access
    htpasswd = /var/lib/monitorix/htpasswd
  </auth>
</httpd_builtin>

<graph_enable>
  system  = y
  proc    = y
  fs  = y
  net  = y
  user  = y
  netstat = y
</graph_enable>

<net>
  list = enp2s0, wlp3s0
  <desc>
  enp2s0 = Gigabit LAN, 0, 10000000000
  wlp3s0 = Wireless LAN, 0, 100000000
  </desc>
  gateway = enp2s0
</net>


After changing the configuration file, you  may want to create a password so no other user can see the web, for example to create a new user named test with password youMayNotKnow:

sudo htpasswd -bcd /var/lib/monitorix/htpasswd test youMayNotKnow

after that, don't forget to restart the service:

sudo systemctl restart monitorix

Then you can see the result by visiting http://127.0.0.1:8081/monitorix.








No comments:

Post a Comment

THINK: is it True? is it Helpful? is it Inspiring? is it Necessary? is it Kind?