Configuring your platform

Gnocchi configuration

2431 views 1

Configuring gnocchi metrics.

Overview

Atomia uses gnocchi for billing OpenStack usage. This article explains how to configure gnocchi 4.3+ correctly.

Defining archive policy

You need to configure archive policy with exactly one granularity equal to 60 seconds and mean aggregation method. For example, you can create an archive policy like this:

gnocchi archive-policy create vdc -d granularity:60s,points:86400 -b 3 -m mean

The command creates archive policy with name vdc, granularity equal to 60 seconds and mean aggregation method. It has timespan of 2 months and backwindow set to 3. You can use different values for timespan and backwindow. Atomia currently works only with the mean aggregation method.

Assigning archive policy to metrics

After configuring archive policy, you need to apply it on used metrics. One way to configure it is to edit /etc/ceilometer/gnocchi_resources.yaml file. You can set it as the default policy archive_policy_default: vdc for metrics. Also, you can set it for individual metrics archive_policy_name: ceilometer-low-rate.

Keep in mind

You need to configure network.incoming.bytes, network.outgoing.bytes, memory.usage and cpu metrics. Other metrics are optional.

Configuring custom metrics type

The metric type should be configured for custom metrics. The list below shows already configured metrics. If you use a metric that is not in the list, you will need to set a metric type for it. Valid metric type values are gauge, cumulative and delta. You can configure new metrics by defining a transformation file inside the directory C:\Program Files (x86)\Atomia\AutomationServer\Common\Modules\Transformation Files. An example of a transformation file Atomia.Provisioning.Modules.OpenStack.dll.GnocchiMetrics.config that defines three new metrics and sets their type:

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <cloudData>
    <gnocchiMetrics>
      <metric name="atomia.volume.size.hdd" type="gauge" xdt:Transform="Insert"/>
      <metric name="atomia.volume.size.ssd" type="gauge" xdt:Transform="Insert"/>
      <metric name="atomia.network.incoming.bytes" type="cumulative" xdt:Transform="Insert"/>
    </gnocchiMetrics>
 </cloudData>
</configuration>

List with preconfigured metrics type:

memory
memory.usage
memory.resident
cpu
cpu.delta
cpu_util
vcpus
disk.read.requests
disk.read.requests.rate
disk.write.requests
disk.write.requests.rate
disk.read.bytes
disk.read.bytes.rate
disk.write.bytes
disk.write.bytes.rate
disk.device.read.requests
disk.device.read.requests.rate
disk.device.write.requests
disk.device.write.requests.rate
disk.device.read.bytes
disk.device.read.bytes .rate
disk.device.write.bytes
disk.device.write.bytes .rate
disk.root.size
disk.ephemeral.size
disk.latency
disk.iops
disk.device.latency
disk.device.iops
disk.capacity
disk.allocation
disk.usage
disk.device.capacity
disk.device.allocation
disk.device.usage
network.incoming.bytes
network.incoming.bytes.rate
network.outgoing.bytes
network.outgoing.bytes.rate
network.incoming.packets
network.incoming.packets.rate
network.outgoing.packets
network.outgoing.packets.rate
cpu_l3_cache
memory.bandwidth.total
memory.bandwidth.local
perf.cpu.cycles
perf.instructions
perf.cache.references
perf.cache.misses
network.incoming.packets.drop
network.outgoing.packets.drop
network.incoming.packets.error
network.outgoing.packets.error
memory.swap.in
memory.swap.out
disk.device.read.latency
disk.device.write.latency
image.size
image.download
image.serve
storage.objects
storage.objects.size
storage.objects.containers
storage.objects.incoming.bytes
storage.objects.outgoing.bytes
storage.containers.objects
storage.containers.objects.size
volume.size
snapshot.size
volume.provider.capacity.total
volume.provider.capacity.free
volume.provider.capacity.allocated
volume.provider.capacity.provisioned
volume.provider.capacity.virtual_free
volume.provider.pool.capacity.total
volume.provider.pool.capacity.free
volume.provider.pool.capacity.allocated
volume.provider.pool.capacity.provisioned
volume.provider.pool.capacity.virtual_free

Gnocchi can be used together with generic billing for VPS described here.

Additional resources

Gnocchi documentation

OpenStack Telemetry documentation

Was this helpful?