Storage space usage accounting in APEL is based on the StAR (Storage Accounting Record) developed by EMI in conjunction with the OGF Usage Record Work Group (UR-WG). The format is documented here.
EMI delivered StAR solutions for dCache and DPM in EMI-3. In both cases the storage service queries its database at a site and extracts data to populate StAR usage records. The site then uses SSM as a transport method to send the StAR records via the EGI Messaging Service to APEL's central Accounting Repository.
Get the accounting script
Follow the link for your product:
On the command line which runs the script, add
--site="your-GOCDB-sitename" (replacing the quoted section).
Get the SSM software
The APEL SSM software can be installed from the yum repo or by downloading an RPM or tarball. See here for more information.
To authorise your host to publish storage accounting see the section on configuring GOCDB.
You need to add a new service for that host to GOCDB with the service type "eu.egi.storage.accounting" and the correct host certificate DN. The Accounting Repository takes up to an hour to update its ACL from GOCDB and the Message Brokers take up to 4 hours. If you get warnings in your SSM log about invalid user name or password you can just retry again after a period. If this persists for over 4 hours, then do open a GGUS ticket.
To configure apel-ssm for sending accounting records edit the file /etc/apel/sender.cfg, and modify some parameters:
- In the
[broker]section, you need:
- In the
[certificates]section, you need to set the host certificate to be used by the sender:
- In the
[messaging]section, you need:
For production publishing ->
For test publishing ->
As described here: https://wiki.egi.eu/wiki/APEL/SSM2Configuration.
path: set to the directory to which the StAR records are written by your storage software.
dCache and DPM should send one StAR record per VO. Please set up a cron to run once per day.
Running the Accounting Software
Create a cron job to run your accounting script followed by the SSM sender. We recommend that you send storage accounting data once per day. There will be a delay of up to 24 hours before you see the data you have sent reflected in the Accounting Portal.
# cat /etc/cron.daily/dmlite-StAR-accounting #!/bin/sh /bin/mkdir -p /var/spool/apel/outgoing/`date +%Y%m%d` && /usr/share/dmlite/StAR-accounting/star-accounting.py --reportgroups --dbhost=[hostname] --dbuser=[username] --dbpwd=[password] --nsdbname=cns_db --dpmdbname=dpm_db --site=[site name] > /var/spool/apel/outgoing/`date +%Y%m%d`/`date +%Y%m%d%H%M%S` && ssmsend
You can check that your data is being received by the Accounting Repository here: Sites publishing storage accounting records (updated daily)