Quick graph on traffic bill crash when there is only one port

Hi,

I may have found a bug on traffic bill.

My validate.php :

Component | Version
--------- | -------
LibreNMS  | 1.55-12-g1c48da68e
DB Schema | 2019_07_09_150217_update_users_widgets_settings (140)
PHP       | 7.3.9-1+0~20190902.44+debian9~1.gbpf8534c
MySQL     | 10.1.38-MariaDB-0+deb9u1
RRDTool   | 1.6.0
SNMP      | NET-SNMP 5.7.3

Symptom:

  • The quick graph on the billing page display a “Error Drawing Graph” error when there is only 1 port in the traffic bill.

How to reproduce:

  • Create a new traffic bill
  • Let only 1 port in the bill
  • Display the traffic bill

Workaround:

  • Add another equipment port in the traffic bill

Others:

  • Rrdtool return “ERROR: RPN stack underflow”.
  • After some ajustement of the rrdtool command line, I found that it’s the ADDNAN parameters that made it crash (it explain why adding another port is a workaround).

Best regards,