"Report not found" error when exporting to CSV

I’m trying to export a list of ports to a CSV file. No matter how I configure the search criteria, when I click the “Export CSV” link, I get a page that is blank other than the text “Report not found.”

I don’t even know how to go about troubleshooting this one. Any help?

Does Alert -> Alert History -> Export to PDF work ?

Try a different web browser, or one with no extensions.

then try directly in the URL

https://URL/csv.php/report=ports/state=down

and

https://URL/csv.php?report=ports&state=down

Output here ?
ls -l /opt/librenms/includes/html/reports/

You could try turn on APP_DEBUG too in .env

Other browsers give the same error.

This is the URL I get when I click the “Export CSV” link:

https://URL/csv.php/report=https://URL/ports/

The two URLs you suggested both prompted to download a report.

The contents of the /opt/librenms/includes/html/reports/ directory was unchanged from before and after using the direct URLs you suggested.

-rw-rw-r-- 1 librenms librenms 2975 Jun 24 00:15 alert-log.pdf.inc.php
-rw-rw-r-- 1 librenms librenms 92 Apr 12 00:15 example.pdf.inc.php
-rw-rw-r-- 1 librenms librenms 4839 Apr 12 00:15 ports.csv.inc.php

I can replicate this too (I’m on monthly branch)

demo.librenms.org seems to work so I think this is just a bug introduced somewhere

If you need it in the meantime, you can change the search functions, copy “Export CSV” Link and change the middle bit to “report=ports”

1 Like

https://URL/csv.php/report=ports

Is that the correct syntax for a report of ALL ports (regardless of status)? That gives me a HTTP 500 error.

EDIT: Scratch that. I wasn’t paying attention to the prompt to save the report at the bottom of the screen. I was using IE which I don’t typically use. So while it gave a 500 error for the page, it did still prompt to save the report.

Cool ! good that it downloads now.

For me i also get the same syntax e.g https://URL/csv.php/report=https://URL/ports/ifSpeed=10000000/

Then it only downloads with the following format (if using forward slashes just redirect back to home page)
https://URL/csv.php?report=ports&ifSpeed=10000000

i imagine we we set our base_url to / it will work. will test tomorrow

Hi,
is there any solution to this problem, than manually editing URL to get the CSV?

We are running multiple LibreNMSs in different versions and in 1.47 export to CSV works fine, however in 1.54 and newer it is not.

Regarding not working on 1.54 or newer, is that including the manual edit of the URL? I can get it to work on 1.58 with the manual URL edit, but i encountered a little bug if your filtering on the hostname field.

Ports WebGUI “hostname” field also searches sysName column in the DB.

However when you export to CSV (includes/html/reports/ports.csv.inc.php) matches this to the hostname column in the DB, which means you gain no results back if you are expecting this to search sysName.

Just in case anyone is filtering on that.

With manual edit of the URL it is working, however explain it to the operators.

Hi Chas,
Obviously this bug is still present. I’m in 1.62-67 version.
Do you think it will be fixed in future versions
sincerely

Was this ever addressed in a release? When manually changing the URL, the extracted CSV is empty.

$ ./validate.php

Component Version
LibreNMS 1.65-36-g0e9658987
DB Schema 2020_06_23_00522_alter_availability_perc_column (170)
PHP 7.3.11-0ubuntu0.19.10.6
Python 3.7.5
MySQL 10.3.22-MariaDB-0ubuntu0.19.10.1
RRDTool 1.7.1
SNMP NET-SNMP 5.7.3

====================================
[OK] Composer Version: 1.10.9
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct