Skip to content

Billing exports

The portal can deliver your monthly usage as CSV files, either on a schedule or as a one-off export. This lets you feed Sunet Cloud usage straight into your own finance system instead of waiting for a file to be sent to you.

Open Billing in the top bar to manage exports.

Prices are not configured here

Export jobs control when and where your usage CSVs are delivered, not what anything costs. For current, authoritative rates, see the official Sunet VDC price list.

What the export measures

Usage is collected by Ceilometer and stored in Gnocchi before the portal creates the CSV. The report currently includes metered VM flavors, block storage, and object storage, plus any applicable managed-cluster fees.

Virtual machines

A VM is billed in started flavor-hours. Every UTC hour in which monitoring receives at least one CPU sample for a VM counts as one hour for that VM's flavor. The CPU value itself is not used to calculate the charge.

For example, one started hour for b2.c1r2 represents a VM with 1 vCPU and 2 GB RAM. One started hour for b2.c16r64 represents 16 vCPUs and 64 GB RAM. The CSV contains flavor-hours priced at the flavor rate; CPU and RAM do not appear as separate charges.

  • A VM running for any part of a UTC hour is charged for that hour.
  • The hour in which a VM is shut down is charged. Later hours without samples are not charged.
  • Stopping and restarting within the same hour still counts once for that flavor.
  • If a VM is resized and both flavors occur in the same hour, one started hour can be recorded for each flavor.

Storage

Block and object storage are billed as period-normalized GB-month usage from hourly size measurements. Multiple volumes are measured separately and then totaled by project and storage type. Gnocchi records a block storage type as a Cinder ID; the portal resolves it to the active Cinder type name (fast, balanced, bulk, or the older rbd1) before applying its price.

Metering depends on telemetry

Monitoring polls every five minutes. A very short-lived resource that exists entirely between polls can be missed, and a telemetry interruption can look like stopped or absent usage. Creating or extending retention does not recreate historical measurements that were never stored. Contact support if a report looks incomplete; do not treat a successful delivery alone as proof that every expected metric was present.

Scheduled export jobs

A billing job is a saved, recurring export. The Billing page lists your active jobs (and any you have disabled). Each job covers one or more contracts and delivers on a schedule you choose.

Choose New job and fill in four sections.

Basics

  • Job name: a label for the job.
  • Enabled: whether the job runs on its schedule. Turn it off to pause a job without deleting it.

Scope

  • Include all contracts you have access to, or untick that and select specific contracts.
  • Generate one file per contract: when ticked, each contract gets its own CSV for the period. When unticked, a single CSV containing all the selected contracts is produced.

Schedule

A standard five-field cron expression, interpreted in UTC. The default 0 6 1 * * runs at 06:00 on the first day of every month, which suits a monthly billing cycle.

Delivery

Pick how the files are sent:

  • WebDAV: provide the target URL, a username, and a password. The files are uploaded there.
  • Email: provide a recipient address. The files are emailed.

You also set a filename template. These tokens are substituted at delivery time:

Token Replaced with
{contract} the contract number
{year} the period year
{month} the period month
{day} the day the export runs
{date} the export date

For example, billing-{year}-{month}.csv produces billing-2026-06.csv.

Delivering to Sunet Drive over WebDAV

Sunet Drive is a common delivery target. There are two ways to set it up, depending on whether you want to deliver into your own Drive or into a shared upload folder. In both cases the export uploads a single file with PUT and does not create folders, so the destination folder must already exist.

A share link is not a WebDAV URL

Do not paste a public share link (the https://sunet.drive.sunet.se/s/... kind from the Share dialog) straight into the WebDAV URL field. That address is the share web page, not a WebDAV endpoint, and uploads to it fail. Use one of the two methods below instead.

Option 1: your own account

Deliver into your own Drive, authenticating as yourself.

Find your WebDAV URL in Drive: open the Files app and choose Files settings in the bottom left. It has the form:

https://sunet.drive.sunet.se/remote.php/dav/files/<your-username>/

<your-username> is your Drive username, URL-encoded. The @ becomes %40, so kano@sunet.se appears as kano%40sunet.se.

To deliver into a specific folder, create that folder in Drive first, then append its path, URL-encoding any spaces or special characters:

https://sunet.drive.sunet.se/remote.php/dav/files/kano%40sunet.se/Fakturaunderlag/VDC-underlag/

In the job's delivery fields, set this as the WebDAV URL, your Drive username as the username, and an application password as the password.

Use an application password

Generate a dedicated application password for the export rather than using your account password. See Generate an API key (application password).

If you would rather not store personal credentials in the portal, deliver to a public upload link instead. The export authenticates with the link's token rather than an account, so anyone holding the link can write to the folder.

Create the link in Drive:

  1. Open the Files app and go to (or create) the destination folder.
  2. Open the folder's Share panel and create a Share link.
  3. In the link's settings, choose Allow upload and editing. A view-only link is rejected, and "File drop (upload only)" blocks the idempotent overwrite on re-runs, so pick Allow upload and editing.
  4. Copy the link, for example https://sunet.drive.sunet.se/s/aB3xKp9QmZ2rW7t. The token is the part after /s/, here aB3xKp9QmZ2rW7t.

Then set the job's delivery fields:

Field Value
WebDAV URL https://sunet.drive.sunet.se/public.php/webdav/
Username the token, for example aB3xKp9QmZ2rW7t
Password blank, or the link's password if you set one

To deliver into a subfolder of the shared folder, append that path to the URL. As with option 1, the folder must already exist.

Running, editing, and deleting a job

Open a job to see its configuration and its recent runs. From there you can:

  • Run now: run the job immediately for the current period.
  • Run for a specific period: under Manual run, set a year and month and run that period.
  • Edit the job's scope, schedule, or delivery.
  • Delete the job.

Re-runs are safe

Running the same period again is idempotent: it overwrites the previous file in place rather than creating a duplicate. Use this to re-issue a period after a delivery failed.

One-off exports

If you just need a single export and don't want a recurring job, use Run once from the Billing page. It generates and delivers a CSV one time, using a scope, period, and delivery target you specify on the spot, without saving anything.