Deploying and fixing LibreNMS for ESXi Host

LibreNMS is a free and great monitoring tool, but is quite challenging to deploy without having a good knowledge in Linux. The images provided by LibreNMS.org is suppose to help, but unfortunately appear to be improper configured, making deployment using their images quite difficult as well.

In my first attempt, I download their Virtualbox OVA image and attempt to convert it into OVF image using the guide here.

Unfortunately it doesn't work, because there are just too many incompatible hardware components between the two virtualisation platforms.

In my next attempt, I download their VMDK image and create a new Virtual Machine with similar specification after reviewing the VM specification found in their VirtualBox OVA image:

  • 1 vCPU
  • 2 GB RAM (I upgrade 1 to 2GB RAM)
  • 10GB Storage (after creating the VM, I upload the vmdk image from librenms.org, removing existing harddisk and add a new harddisk using the new vmdk image)

Next I install the vmtools by mounting it from vSphere webclient and enter the following commands:

  • mkdir /mnt/cdrom
  • mkdir /tmp/vmtools
  • mount /dev/cdrom /mnt/cdrom
  • cp /mnt/cdrom/VMwareTools... /tmp/vmtools/ (... = use Tab to let system auto fill the filename)
  • cd /tmp/vmtools/
  • tar -xvf VMware... (... = use Tab to let system auto fill the filename)
  • cd /tmp/vmtools/vmware-tools-distrib
  • ./vmware-install.pl

As the image default to UK keyboard, I have to change it to US keyboard:

  • localectl set-keymap us

Next is setting up a static address for it, as it is default to dynamic IP. However, I notice that there are two ethernet configuration files: ifcfg-enp0s3 and ifcfg-wired_connection_1. ifcfg-wired_connection_1 is the correct file to amend in order to assign a static IP address. You can edit the file using vi command or use the UI:

  • nmtui edit (enter all the required information such as IP address, Gateway and DNS etc)

However, I notice that the UI does not have a subnet mask field, resulting in the prefix remaining at 32. So I still have to use the vi command to correct it:

  • sudo vi /etc/sysconfig/network-scripts/ifcfg-wired_connection_1 (amend PREFIX=32 to PREFIX=24 if you are using Class C IP address)
  • :wq! (write and quit)

Everything appears to be working but one day later, the Web UI failed with this error:

Error: Missing dependencies! Run the following command to fix:

./scripts/composer_wrapper.php install --no-dev

When I attempt to execute the suggested command, I got these:

Problem 1

- The requested PHP extension ext-mysqlnd * is missing from your system. Install or enable PHP’s mysqlnd extension.

Problem 2

- The requested PHP extension ext-mbstring * is missing from your system. Install or enable PHP’s mbstring extension.

Problem 3

- Installation request for erusev/parsedown 1.7.1 -> satisfiable by erusev/parsedown[1.7.1].

- erusev/parsedown 1.7.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.

Problem 4

- Installation request for laravel/framework v5.4.36 -> satisfiable by laravel/framework[v5.4.36].

- laravel/framework v5.4.36 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.

Problem 5

- laravel/framework v5.4.36 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.

- wpb/string-blade-compiler 3.4.x-dev requires laravel/framework 5.4.* -> satisfiable by laravel/framework[v5.4.36].

- Installation request for wpb/string-blade-compiler 3.4.x-dev -> satisfiable by wpb/string-blade-compiler[3.4.x-dev].

I try to redeploy the vmdk image again and got it to work again. But the next day, the same error reappear. I finally resolve it using the following commands:

  • sudo su
  • yum update
  • yum install php70w-mbstring
  • yum remove php70w-mysql
  • yum install php70w-mysqlnd
  • yum swap php70w-mysql php70w-mysqlnd
  • ./scripts/composer_wrapper.php install --no-dev
  • ./validate.php
  • ./daily.sh
  • chown -R librenms:librenms /opt/librenms
  • chmod 755 /opt/librenms/.pki/nssdb

restart the apache/nginx service or reboot the VM

To add ESXi hosts into LibreNMS for monitoring, I found this website.

btw, for security reason, do remember to change the default passwords provided by the images. Remember to change the root password too! Their documentation missed this, but I found out that it's the same as librenms default password.

António Latibo

Network Administrator at BCI - Banco Comercial e de Investimentos

3 年

Hello Boon Hong Wong, I’ve just downloaded the new ova file " librenms-ubuntu-20.04-amd64.ova" and gone to deploy it in my ESXi server, but get the following error. How solve it?

  • 该图片无替代文字
回复
Anthony W.

Bachelor's degree at American InterContinental University

5 年

Great work! I can't login though. What is the default login?

回复

It looks like the image provided by librenms.org has many outdated components with many improper or incomplete configuration as well. The instruction guide on the website given is incomplete too. Time zone has to be configured not just at the OS level, but also at both the php and database level. rrdcached.service is configured wrongly as well, pointing to /usr/bin/rrdcached instead of /bin/rrdcached. Root password has to be changed and this is not even mentioned on the guide too. But the first thing to do is to change the default UK keyboard to US keyboard or else if you change the password first and happen use any symbol such as # and end up with £, it would be fatal once you change keyboard! lol Fortunately the root password is the same as the librenms account and I manage to use root login to change librenms password.?(Using copy and paste doesn’t work.)

要查看或添加评论,请登录

Boon Hong Wong的更多文章

  • Reset Android Phones

    Reset Android Phones

    In the past, you can perform a factory reset and wipe off your login pin simply by powering up your Android phone while…

  • How to remove the battery from Creative iRoar. And why we need to put a stop to Planned Obsolescence to save our environment.

    How to remove the battery from Creative iRoar. And why we need to put a stop to Planned Obsolescence to save our environment.

    Recently, my Creative iRoar battery went dead. While it can no longer be used as a portable speaker, it can still work…

    4 条评论
  • The Next Frontier - Virtual Reality

    The Next Frontier - Virtual Reality

    Space is unlikely to be our next frontier, for it is simply far too hostile to sustain life, and the distance between…

  • Using Group Policy to block malwares and ransomwares

    Using Group Policy to block malwares and ransomwares

    Like Evolution, attackers are able to keep adapting to changing environment to create smarter viruses, malwares and…

  • The danger of using the latest versions

    The danger of using the latest versions

    There is a saying, never use version x.0 of any software, because any major upgrade will always comes with major new…

  • Fix Windows 11 right-click bug

    Fix Windows 11 right-click bug

    For those old enough to experience upgrading countless software, will know that all major software releases are always…

    1 条评论
  • Modern Technologies are build NOT TO LAST.

    Modern Technologies are build NOT TO LAST.

    Most of the apps are no longer available for Gear VR anyway. (https://support.

    1 条评论
  • NAS: QNAP vs Synology

    NAS: QNAP vs Synology

    Two of the most popular Network Attached Storage (NAS) brands are QNAP and Synology, both from Taiwan. NAS do not just…

  • Best Free VPN

    Best Free VPN

    Two most popular free VPN providers are ProtoVPN - with 3 countries to pick from (US, Japan and Netherlands), and…

  • The Fallibility of Technology

    The Fallibility of Technology

    I loved technologies, because they have empowered us to perform many things that our ancestors could only dream of. But…

社区洞察

其他会员也浏览了