The database Example Output Plugin

Example plugin that sites can modify for sending output to a database.

The database plugin is provided as a guide for sites wanting to output RUR data to a site-supplied database. Sites will need to configure their own systems, provide an external database, create their own tables, and modify database_output.py to collect the desired data.

MySQL is the database supported by the example plugin. The following arguments are defined for connecting to a database:

  • DB_NAME='rur'
  • DB_USER='rur_user'
  • DB_PASS='rur_pass'
  • DB_HOST='rur_host'

    The database plugin collects the values: energy_used, apid, jobid, and uid, and saves this data to a table, energy. It does this by performing the following:

  • Digests RUR data into a dictionary and saves it to class DbData
  • Creates rules for saving data collected in DbData to particular tables
  • Uses the rules to scan the DbData dictionary and INSERT that data into a database

    Cray recommends that the database is not hosted on SDB or login nodes. It should also be noted that, depending on job load, interacting with an external database may cause system latency.