how to Rocky ceilometer memory mteric add memory_util

asked 2019-03-28 03:47:51 -0500

shingoon gravatar image

updated 2019-03-28 09:36:59 -0500

novainfinite gravatar image

I want to add a memory_util entry to ceilometer mteric

Set the following in the pipline

---
sources:
    - name: memory_source
      meters:
          - "memory"
      sinks:
          - memory_sink

sinks:
    - name: memory_sink
      transformers:
          # - name: "rate_of_change"
          - name: "arithmetic"
            parameters:
              target:
                name: "memory_util"
                unit: "%"
                type: "gauge"
                expr: "100 * $ (memory.usage) / $ (memory)"
      publishers:
          - gnocchi: //? filter_project = service & archive_policy = low


# openstack metric resource show c07c4a5f-ec72-4408-adc2-65ee61e1dd66
+-----------------------+---------------------------------------------------------------------+
| Field                 | Value                                                               |
+-----------------------+---------------------------------------------------------------------+
| created_by_project_id | f3838be522bb420fa6cd67e48605596e                                    |
| created_by_user_id    | a4476a5e40444737818df68dc74dc292                                    |
| creator               | a4476a5e40444737818df68dc74dc292:f3838be522bb420fa6cd67e48605596e   |
| ended_at              | None                                                                |
| id                    | c07c4a5f-ec72-4408-adc2-65ee61e1dd66                                |
| metrics               | compute.instance.booting.time: fc5d8019-1a0f-408f-8ebe-7dc0ee3952cd |
|                       | cpu.delta: cf091598-5c9e-4d85-a68d-586ec0d328b4                     |
|                       | cpu: 2c6d6196-26a9-4899-b4f7-623377fbc66f                           |
|                       | cpu_util: 4c3d2adb-85e0-417e-b6fd-f04a18ea3507                      |
|                       | disk.ephemeral.size: e2f28415-518d-4147-b17c-0476603df295           |
|                       | disk.root.size: 2ed8f6fe-d3bc-47b5-a97b-7aa2c75273f6                |
|                       | memory.usage: 219de05b-0ce9-46a3-aace-fcddb1d0821c                  |
|                       | memory: 0426c06e-89eb-43ee-a6d5-88b73060b39b                        |
|                       | vcpus: 33d52da2-1419-4e15-a580-fcbc52562ee7                         |
| original_resource_id  | c07c4a5f-ec72-4408-adc2-65ee61e1dd66                                |
| project_id            | d65df3524a3441f5abec30759747ed1d                                    |
| revision_end          | None                                                                |
| revision_start        | 2019-03-28T08:00:18.005180+00:00                                    |
| started_at            | 2019-03-28T07:22:04.863213+00:00                                    |
| type                  | instance                                                            |
| user_id               | abb8637a7b014fe1a62d7ec5bb4ed84a                                    |
+-----------------------+---------------------------------------------------------------------+

edit to "/etc/ceilometer/gnocchi_resources.yaml"
  - resource_type: instance
    metrics:
      memory:
      memory.usage:
      memory.util:

And restart the ceilometer gnocchi service

How do I add memory pct mteric?

edit retag flag offensive close merge delete

Comments

problem solving It was my mistake When you add metrics to gnocchi_resources.yaml file, memory.util: and ceilometer pipeline.yaml file is modified to memory_util so that data can not be collected. target:                 name: "memory_util"

shingoon gravatar imageshingoon ( 2019-04-09 02:20:30 -0500 )edit