10.0 Viewpoint Reporting Overview

Viewpoint has extended the BIRT Reporting Framework for report viewing and there are several standard reports that are available when Moab is configured to use the MySQL database.

Note

Due to the memory intensive nature of reporting, Tomcat's permanent generation (PermGen) memory and heap space should be increased. Add the following configuration setting to your other JAVA_OPTS settings. For Ubuntu server this can be done in the /usr/share/tomcat6/bin/setenv.sh file with the following:

export JAVA_OPTS="-Djava.awt.headless=true -Xmx1G -XX:MaxPermSize=256M"

Check your specific tomcat platform documentation for other Unix/Linux systems.

Note Moab must use an ODBC-compliant database to report statistics with Viewpoint reports.

10.0.1 Configuring Viewpoint for Reporting

Once Moab is configured to use MySQL for statistics, configure Viewpoint to view standard reports by following these steps:

  1. To allow users to access the Viewpoint Reporting page, add the report.read permission to the core.xml file located in the Viewpoint home directory.
  2. <permission name="report.read" />
    
  3. Add permission to view individual reports to the user's permission in the core.xml file.
    <permission name="report.[category].[report_name]" />
    
    
    NoteThe permission may have any name; however, organizing them according to the [category].[report_name] format is a best practice. Doing so makes managing user permissions easier. For example, when permissions are named this way, you can easily grant a user access all reports in a single category by replacing the report name with an asterisk (*) as in the following example:
    <permission name="report.[category].*" />
    

  4. Add the Reporting page to the navigation links by adding the following to the core.xml file in the navigation section:
  5. <menu label="Reporting">
      <link href="page://Local;page=gsp/reporting/reporting.gsp" label="Reporting">
       <permission name="report.read" />
      </link>
    </menu>
  6. Configure the reporting.xml file. The reporting.xml file should be located in the Viewpoint home directory. The file contains information for all standard reports and configuration information for the MySQL database connection. The following is an example reporting.xml file:
  7. <reporting xsi:schemaLocation="http://www.adaptivecomputing.com reporting.xsd">
      <reports>
        <report>
          <display-name>Jobs Submitted</display-name>
          <report-design>jobs_submitted.rptdesign</report-design>
          <display-category>Adaptive</display-category>
          <category>adaptive</category>
          <description>Report for viewing submitted jobs by user, group, qos and account</description>
    	  <permission name="adaptive.jobs_submitted"></permission>
        </report>
      </reports>
      <database-connection type="mysql-jdbc">
        <url>jdbc:mysql://localhost/Moab</url>
        <username>root</username>
        <password>root</password>
        <driver>com.mysql.jdbc.Driver</driver>
      </database-connection>
    </reporting>
  8. Configure the MySQL database connection in Moab. Use the following example as a guide:
  9. <database-connection type="mysql-jdbc">
      <url>jdbc:mysql://localhost/Moab</url>
      <username>root</username>
      <password>root</password>
      <driver>com.mysql.jdbc.Driver</driver>
    </database-connection>

10.0.2 Installing the Event Schema Conversion Script

The VM Lifecycle and Events reports require a script to convert data from the Moab event files. To install the script, do the following:

  1. Run the script:
    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:
      # cd /usr/moab-dist/contrib/events
    3. Make the script executable.
      # chmod u+x events2db.pl
    4. Run the script with the -m (manual) argument for the full documentation.
      # ./events2db.pl -m
      NoteRead the entire document. There is information in the manual not included here.
    5. Run the script with the correct arguments.
      # ./events2db.pl --dbname=Moab --dbuser=bob --dbpassword=p@ssw0rd --create-schema /opt/moab/stats 

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

  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.
      # crontab -e
    2. Create a new entry for the script. 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
      

      NoteThis runs without the --create-schema option.

  3. Note For more information on crontab, see the crontab man page.
    # man crontab

  4. Add the reports to Viewpoint by removing the comment tags from the desired reports in the reporting.xml file. For more information, see step 4 of Configuring Viewpoint for Reporting.