×


How to fix nagios error in the process of converting svg

Sometimes Nagios users face errors while trying to convert SVG files.


Here at Ibmi Media, as part of our Server Management Services, we regularly fix Nagios related issues for our Customers.


In this context we shall look in this issue and how to resolve it.


What triggers Nagios error in the process of converting SVG files?

As earlier stated, you can encounter this error when working with SVG file conversion. For example, when trying to save a performance graph as a PNG, JPEG image in Nagios XI, you can experience an error such as ;


sh: ./phantomjs: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory


This can be located in the log file "/var/log/httpd/error_log".


This issue is connected to he phantomjs libraries that are used to export the images to a file.


How to fix Nagios error in the process of converting SVG files?

To fix this issue, simply reinstall the phantomjs libraries on Nagios XI.

To do this, start by establishing a connection with the Nagios XI server via an ssh tool such as putty, Then after connection, run the following commands;


cd /tmp
rm -rf phantomjs*
uname -a


You will get an output containing either "i686" or "x86_64".


Next, run the following command to download phantomjs:


For version i686, execute;


wget phantomjs-1.9.8-linux-i686.tar https://assets.nagios.com/downloads/nagiosxi/packages/phantomjs-1.9.8-linux-i686.tar


For version x86_64, execute;


wget phantomjs-1.9.8-linux-x86_64.tar https://assets.nagios.com/downloads/nagiosxi/packages/phantomjs-1.9.8-linux-x86_64.tar


Now, reinstall the downloaded phantomjs by running the commands below;


tar xf phantomjs*.tar
mkdir -p /usr/local/nagiosxi/html/includes/components/highcharts/exporting-server/temp
/bin/cp -f phantomjs*/bin/phantomjs /usr/local/nagiosxi/html/includes/components/highcharts/exporting-server/
chown -R nagios:nagios /usr/local/nagiosxi/html/includes/components/highcharts/exporting-server
chmod 775 /usr/local/nagiosxi/html/includes/components/highcharts/exporting-server/temp


After successfully running the commands, the graph should now export successfully to images.


Need support in fixing Nagios errors? We are available to help you today.


Conclusion

This article will guide you on fixing Nagios error in the process of converting SVG files in the process of working with a performance graph as a PNG, JPEG image in Nagios XI.