How to monitor Invoice Ninja white label license expiration

Written by - 0 comments

Published on April 26th 2021 - Listed in Monitoring


At Infiniroot we've been using Invoice Ninja for the last couple of years for automated invoicing, including Swiss Payments Code (SPC) and Swiss QR-Bill (QR Code) implementation. For all this we use Invoice Ninja with a so-called "White Label License", which removes the Invoice Ninja watermark from PDFs.

Infiniroot loves Invoice Ninja

This white label license is usually valid for one year.  In the user interface the remaining license period is showing up at the bottom, right next to the version:

However checking this manually is prone to errors and we needed to find a way to get automatically informed (alerted) when the licenses are about to expire.

Introducing check_invoiceninja

One of our own strong suits is system and application monitoring using open source tools. So why not use this knowledge and create a dedicated monitoring plugin for Invoice Ninja? Well, that's what we did.

check_invoiceninja is a monitoring plugin which (as of now) checks the validity of an installed white label license in Invoice Ninja. It uses the information of the installed license from Invoice Ninja's database (table companies) and allows to set a warning threshold in days. This means that, integrated into your existing monitoring solution, the plugin will inform you about a license soon to be expired.

Invoice Ninja white label license monitoring Icinga 2

Running the plugin now shows the exact remaining time of the license. If the license is about to expire within 24 hours, the plugin will show the remaining valid hours:

$ /usr/lib/nagios/plugins/check_invoiceninja.sh -H localhost -u monitoring -d invoiceninja -p secret
INVOICENINJA WARNING - white_label license will expire in 12 hours

Otherwise the plugin shows the remaining days:

$ /usr/lib/nagios/plugins/check_invoiceninja.sh -H localhost -u monitoring -d invoiceninja -p secret
INVOICENINJA OK - white_label license will expire in 221 days

With the -w parameter, a warning threshold in days (here 230 days) can be defined:

$ /usr/lib/nagios/plugins/check_invoiceninja.sh -H localhost -u irmonitoring -d invoiceninja -p secret -w 230
INVOICENINJA WARNING - white_label license will expire in 221 days

You can download and use the monitoring plugin for free from the public check_invoiceninja code repository on GitHub.

Your own Invoice Ninja server - data hosted in Switzerland

Since July 2020 Infiniroot offers dedicated Invoice Ninja servers in Switzerland. This allows you to run your own secure invoicing application using Invoice Ninja in a secure server environment and data in Switzerland, even with a low budget!


Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.