Menu

Create Savbed Reports via command line

2013-07-18
2013-09-17
  • Mike Donnelly

    Mike Donnelly - 2013-07-18

    I would like to run several reports overnight and have them available in the "Saved Reports" section the following day.

    For example, I would like to run a "Source/Destination IP" report with my "http_and_httpd" filter against my "webrouter" for 08:00:00 through 17:00:00 hrs. I would execute the report command-script via cron at 23:00:00 hrs.

    I currently run report scripts with flow-tools commands piped to sendmail via cron , but having them available in the UI would be much cleaner.

    Whats the best way to pull this off?

    Thanks,
    MikeD

     
  • Joe Loiacono

    Joe Loiacono - 2013-09-17

    Sorry Mike ... just saw this.

    The FlowViewer scripts are not really set up to be run from CLI. However, they are not far off.

    In your case you could copy FlowViewer_Main.cgi to something like ... FlowViewer_Night and then modify the input to come from a pre-specified file (basically your input filter criteria) instead of the HTTP $ENV variable where it currently comes from. The new script will generate a FlowViewer_save file into your $work_directory (e.g., FlowViewer_save_185225YE).

    Then, from another script (or at the bottom of FlowViewer_Night) simply copy this file to $save_directory. That should do it.

    Then ... contribute the script to the distribution :-)

     

    Last edit: Joe Loiacono 2013-09-18

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.