Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    I guess I found a bug in Sarg Report

    Scheduled Pinned Locked Moved pfSense Packages
    5 Posts 2 Posters 1.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jonatas.baldin
      last edited by

      Well, I was trying to generate reports with Sarg and what I got was an error saying that there's  no index.html file in the dir.

      With ssh, I saw that the index.html was created just in the sub-directories and not in the main.

      In the /usr/local/etc/sarg/sarg.conf file, the directive 'index' was set to no, even if the 'Generate the main index.html' on the Sarg configuration was set to Yes.

      What I did was editing one line in the /usr/local/pkg/sarg.inc:
      From: $main_index=(preg_match('/main_index/',$sarg['report_options'])?"yes":"no");
      To:     $main_index=(preg_match('/main_index/',$sarg['report_options'])?"yes":"yes");

      And now the reports are generating just fine!

      PS: I'm a newbie in pfSense so I still don't know how to edit this configurations in an expert way, I just know something about PHP/XML, if someone has an tutorial/article about how pfSense works, I'll be grateful to study and help the community.

      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by

        @jonatas.baldin:

        To:     $main_index=(preg_match('/main_index/',$sarg['report_options'])?"yes":"yes");

        This fix does not make sense.

        Can you check on sarg.conf file if this option is changing from yes to no according to your config on gui?

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • J
          jonatas.baldin
          last edited by

          It stays always in No, whatever configuration in the GUI.

          And I also think that doesn't make sense… 'if it's true, yes, if not, yes' but just is this way it got working.

          1 Reply Last reply Reply Quote 0
          • marcellocM
            marcelloc
            last edited by

            Are you on latest package version? I use it here and config file changes when I change on gui.

            Treinamentos de Elite: http://sys-squad.com

            Help a community developer! ;D

            1 Reply Last reply Reply Quote 0
            • J
              jonatas.baldin
              last edited by

              Yes… that's wierd... I'll try to reinstall the package.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.