pfSense: SARG Reports not showing

Image: Error: Could not find report index file. Check and save sarg settings and try to force sarg schedule.
Error: Could not find report index file.
Check and save sarg settings and try to force sarg schedule.

This appears to be a somewhat common problem with the more recent pfSense installations, when SARG reports are accessed ({Status} > {Sarg Reports} > [View Report] Tab) the UI responds with:

Error: Could not find report index file.
Check and save sarg settings and try to force sarg schedule.

Edit: 02/01/2016 – After an update to v2.2.6-RELEASE I had re-inherited the same error, this time however, it was caused by symbolic link weirdness – See the fix here.

Some users have reported that changing options in the [General] tab, saving, then forcing a schedule has resolved this issue, I have not been so lucky, so the following is what I needed to do to fix things.

SSH to your pfSense box and enter the command shell

pfSense SSH to Command Shell
pfSense SSH to Command Shell

Now we need to confirm that your reports are actually being stored in /usr/pbi/sarg-amd64/local/sarg-reports/ For those running the x86 variant of pfSense, your path will be: /usr/pbi/sarg-i386/local/sarg-reports/ 

ls /usr/pbi/sarg-amd64/local/sarg-reports/

You should see a directory for the year(s), an images directory, and an index.html file.

Now, let’s get rid of anything which might be sitting in the location where the sarg GUI is expecting to find it’s index file.

Caution! rm -rf is one of those awesome commands which can REALLY bork your system if you get it wrong. Be *sure* you have typed everything correctly before executing the command

rm -rf /usr/local/sarg-reports/

We now create a symbolic link from the ACTUAL location of the files, to the location that the SARG GUI expects to find them.

[Edit: note that the below is one line, there is only a space between “..sarge-reports” and “/usr/local..” – Thanks for pointing out the clarification improvement Garf!]

ln -s /usr/pbi/sarg-amd64/local/sarg-reports /usr/local/sarg-reports
Image: Squid User Access Report
Squid User Access Report

Now, refresh the page at Status > Sarg Reports > [View Report] and you should see the Squid User Access Report which you can now drill down into to explore your logs.



20 responses to “pfSense: SARG Reports not showing”

  1. Dave Avatar

    I have been trying to get Sarg to generate a report for 2 weeks your blog got me going in 5 minutes thank you. Dave

    1. Rob the Geek Avatar

      Great to hear Dave, glad it helped! 🙂

  2. Resh Avatar

    hey buddy but under ls /usr/pbi/sarg-amd64/local/sarg-reports/ the index.html is missing. what can i do ? please help

    1. Rob the Geek Avatar

      I would suggest going to [Status] > [Sarg Reports] and, on the ‘General’ tab, ensure you have ‘Generate the main index.html file’ selected. Save the changes and you may need to try forcing an update by going to the ‘Schedule’ tab, editing a report, then clicking ‘Force update now’ from with in the schedule page.

      For interests sake, these are the options I have selected:
      Sarg Report Options

      Good luck!

      1. Resh Avatar

        Hi Buddy. thanks for the information and i was able to get it running on one gateway. My Other concern is when i was trying to configure this in the other gate way and check the ls /usr/pbi/sarg-amd64/local/sarg-reports/ location the following is missing.
        “pbi/sarg-amd64/local/sarg-reports/”. Please help me

        1. Rob the Geek Avatar

          Could it be that your other machine is not running the 64-bit version? It could be found in /usr/pbi/sarg-i386/local/sarg-reports (if it’s the x86 version)

  3. Hamdy Avatar

    Awesome ! Been trying to resolve this issue for days and now it’s fixed 😀

    Thank you very much Rob ! ;D

  4. Jav Avatar

    thanks bro i was really frustrating and time consuming with no luck but with your instruction it took only 2 minutes to back it normal.

    thanks again

    1. Rob the Geek Avatar

      Hey – great to hear it’s worked out for you 🙂

  5. Garf Avatar

    Thank you so much ….solves weeks of trying. Only comment is, could you make it clear that there is just a space between the two lines in the link command and option.

    1. Rob the Geek Avatar

      Hopefully that’s made it a bit clearer, thanks for the heads-up Garf

  6. Gilson Avatar

    Thanks for sharing the solution!

  7. Victor Cheng Avatar

    Hello, I am using pfSense 2.2.2 and Sarg 0.6.4. I want to display Sarg reports in MB instead of just BYTES. I can’t find that option. Anyone has done this?

  8. diego Avatar

    thank you very much !! it works perfectly !

  9. Miguel Avatar

    Thank you! You also saved my day… Running sarg-reports -x for debugging I saw that the reports were being placed in /usr/local/sarg-reports but after that, listing that directory nothing was showing up… Your solution did the trick.
    Let me “hijack” your help to get a one word answer if you dont mind: Do you know if it is possibile to have the “Voucher” associated in the reports?
    I am using squid as a transparent proxy and right know I’m just getting the IP address of the client in the reports which is not enough for what I would like to have…

  10. Marco Avatar

    I’m able to view the index.html file. the sarg-report folder contains all data subfolder, there is images folder. but not index.html.
    I have launch “rm” and “ln” command.
    I remove and reinstall all packages but no solutions…

  11. Symon Avatar

    ooooh great. Spent over 2 days trying to figure out but it took only 2 minutes using your guide. Thanks so much

  12. mrbgoch Avatar

    works perfectly – thank you very much

  13. eizo Avatar

    Hello ppl, i have question about sarg reports. Is it possible to sort(generate report) users’ accessed sites by time (not elapsed time on website) but chronologically access time?

  14. Renato Avatar

    Great Solution, I had the same issue, but now all is running.
    Thanks for this explanation. 😉