After Thruk, an alternative monitoring user interface for Nagios, Icinga, Naemon and Shinken, was updated from 3.04 to 3.14, the automated SLA reports (using a monthly cron job) were not working anymore.
To verify this, I wanted to manually create a report. However a quick look into the Reporting section now displayed a red error message at the top:
Missing Converter!
Puppeteer is missing, no pdfs can be generated
According to the linked FAQ, Thruk has moved away from the previous (and rather old) PDF creation technologies involving wkhtml2pdf and phantomjs. The new tool is now Puppeteer, which needs to be installed on the Thruk server.
Puppeteer can't be installed as a package, at least not on Ubuntu 20.04 on which this Thruk server runs. But the FAQ describe how to install Puppeteer. The requirement is to have node (nodejs) and npm installed first.
root@thruk:~# apt-get install nodejs npm
However the node.js version (10.19) bundled with Ubuntu 20.04 is too old for Thruk. This can be seen if only nodejs was installed (without npm) and the Puppeteer install script tries to use npm to install a newer NodeJS version:
root@thruk:~# /usr/share/thruk/script/install_puppeteer.sh
ERROR: npm is required to install puppeteer
system node version v10.19.0 too old, installing 16 into /var/lib/thruk/puppeteer/node
/usr/share/thruk/script/install_puppeteer.sh: line 69: npm: command not found
With npm installed, this downloads NodeJS 16.x and installs the binary to /var/lib/thruk/puppeteer/node/bin/node:
root@thruk:~# /usr/share/thruk/script/install_puppeteer.sh
system node version v10.19.0 too old, installing 16 into /var/lib/thruk/puppeteer/node
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN puppeteer No description
npm WARN puppeteer No repository field.
npm WARN puppeteer No license field.
+ n@9.2.3
added 1 package from 2 contributors and audited 1 package in 0.495s
found 0 vulnerabilities
installing : node-v16.20.2
mkdir : /var/lib/thruk/puppeteer/node/n/versions/node/16.20.2
fetch : https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-x64.tar.xz
copying : node/16.20.2
installed : v16.20.2 to /var/lib/thruk/puppeteer/node/bin/node
active : v10.19.0 at /usr/bin/node
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated puppeteer@21.11.0: < 22.5.0 is no longer supported
added 115 packages, and audited 117 packages in 18s
9 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
npm notice
npm notice New major version of npm available! 8.19.4 -> 10.8.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
npm notice Run npm install -g npm@10.8.1 to update!
npm notice
up to date, audited 117 packages in 680ms
9 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
copying : node/16.20.2
installed : v16.20.2 (with npm 8.19.4)
puppeteer and chromium successfully installed in /var/lib/thruk/puppeteer
With NodeJS now internally used, Puppeteer (and Chromium) was now also installed as dependencies for the PDF report generator.
Shortly after installing Puppeteer, the error message on the Reporting module in the Thruk User Interface went away and reports could be created again (both PDF and JSON).
No comments yet.
AWS Android Ansible Apache Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Coding Consul Containers CouchDB DB DNS Database Databases Docker ELK Elasticsearch Filebeat FreeBSD Galera Git GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Influx Internet Java KVM Kibana Kodi Kubernetes LVM LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS Office OpenSearch PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Python Rancher Rant Redis Roundcube SSL Samba Seafile Security Shell SmartOS Solaris Surveillance Systemd TLS Tomcat Ubuntu Unix VMWare VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder