Configuring reports > Configuring Viewpoint to run the Events report

7.4 Configuring Viewpoint to run the Events report

The Events report (including the data for the Event Logs page) requires a script to convert data from the Moab event files.

The Event Logs page will not work until you follow these instructions for installing the script.

To install the script required to run the Events report

  1. Run the script. To do so:
    1. Log in to the Moab server as the root user or a user with appropriate permissions.
    2. Navigate to the unzipped Moab distribution and locate the contrib directory. For example:
    3. # cd /usr/moab-dist/contrib/events

    4. Make the script executable.
    5. # chmod u+x events2db.pl

    6. Run the script with the -m (manual) argument for the full documentation.
    7. # ./events2db.pl -m

      Read the entire document. There is information in the manual not included here.

    8. Run the script with the correct arguments.
    9. # ./events2db.pl --dbname=Moab --dbuser=bob --dbpassword=p@ssw0rd --create-schema /opt/moab/stats

      Running the script could take a good deal of time depending on how many events you have, but the script must complete successfully before you set up the crontab schedule.

  2. Set up the script as a cron job:
    1. Still working as the root user or a user with appropriate permissions, edit the crontab.
    2. Create a new entry for the script.
  3. The syntax can be customized based on how often you want the script to run. For real-time reports, 1-5 minutes is the ideal setting. For less overhead on the server, every few hours or even once daily is a better option. The following runs hourly:

    0 * * * * /usr/moab-dist/contrib/events/events2db.pl --dbname=Moab --dbuser=bob --dbpassword=p@ssw0rd /opt/moab/stats

    This runs without the --create-schema option.

  4. See the contab man page for more information on crontab.
  5. # man crontab

  6. Add the reports to Viewpoint by removing the comment tags from the desired report(s) in the reporting.xml file, located in the Viewpoint home directory. For more information, see Specifying Available Reports.

Related topics