[openstack-dev] [ceilometer] Pipeline for notifications does not seem to work - SOLVED

Tim Bell Tim.Bell at cern.ch
Sun Mar 22 09:28:35 UTC 2015


I found a way to do it using the documentation at http://docs.openstack.org/admin-guide-cloud/content/section_telemetry-pipeline-transformers.html#d6e11759.

The trick was to use arithmetic and the $(cpu).resource_metadata.vcpus.

    - name: hs06_sink
      transformers:
          - name: "arithmetic"
            parameters:
                target:
                    name: "hs06"
                    unit: "HS06"
                    type: "gauge"
                    expr: "$(cpu).resource_metadata.vcpus*500*0.98"
      publishers:
          - notifier://

Thanks for the various suggestions,

Tim

> -----Original Message-----
> From: Igor Degtiarov [mailto:idegtiarov at mirantis.com]
> Sent: 21 March 2015 16:30
> To: OpenStack Development Mailing List (not for usage questions)
> Subject: Re: [openstack-dev] [ceilometer] Pipeline for notifications does not
> seem to work
> 
> I am just curious have you restarted ceilometer services after pipeline.yaml has
> been changed?
> Igor Degtiarov
> Software Engineer
> Mirantis Inc
> www.mirantis.com
> 
> 
> On Sat, Mar 21, 2015 at 1:21 PM, Tim Bell <Tim.Bell at cern.ch> wrote:
> > No errors in the notification logs.
> >
> >
> >
> > Should this work with the default ceilometer.conf file or do I need to
> > enable anything ?
> >
> >
> >
> > I’ve also tried using arithmetic. When I have a meter like “cpu” for
> > the source, this fires the expression evaluation without problems.
> > However, I can’t find a good way of doing the appropriate calculations
> > using the number of cores. Sample calculation is below
> >
> >
> >
> > expr: $(cpu)*0.98+$(vcpus)*10.0
> >
> >
> >
> > I have tried $(cpu.resource_metdata.vcpus) and
> > $(cpu.resource_metdata.cpu_number) also. Any suggestions on an
> > alternative approach that could work ?
> >
> >
> >
> > Any suggestions for the variable name to get at the number of cores
> > when I’m evaluating an expression fired by the cpu time ?
> >
> >
> >
> > Tim
> >
> >
> >
> > From: gordon chung [mailto:gord at live.ca]
> > Sent: 20 March 2015 20:55
> > To: OpenStack Development Mailing List not for usage questions
> >
> >
> > Subject: Re: [openstack-dev] [ceilometer] Pipeline for notifications
> > does not seem to work
> >
> >
> >
> > i can confirm it works for me as well... are there any noticeable
> > errors in the ceilometer-agent-notifications log? the snippet below
> > looks sane to me though.
> >
> > cheers,
> > gord
> >
> >> From: idegtiarov at mirantis.com
> >> Date: Fri, 20 Mar 2015 18:35:56 +0200
> >> To: openstack-dev at lists.openstack.org
> >> Subject: Re: [openstack-dev] [ceilometer] Pipeline for notifications
> >> does not seem to work
> >>
> >> Hi Tim
> >>
> >> I've check your case on my devstack. And I've received new hs06 meter
> >> in my meter list.
> >>
> >> So something wrong with your local env.
> >>
> >>
> >> Cheers,
> >> Igor D.
> >> Igor Degtiarov
> >> Software Engineer
> >> Mirantis Inc
> >> www.mirantis.com
> >>
> >>
> >> On Fri, Mar 20, 2015 at 5:40 PM, Tim Bell <Tim.Bell at cern.ch> wrote:
> >> >
> >> >
> >> > I’m running Juno with ceilometer and trying to produce a new meter
> >> > which is based on vcpus * F (where F is a constant that is
> >> > different for each hypervisor).
> >> >
> >> >
> >> >
> >> > When I create a VM, I get a new sample for vcpus.
> >> >
> >> >
> >> >
> >> > However, it does not appear to fire the transformer.
> >> >
> >> >
> >> >
> >> > The same approach using “cpu” works OK but this one is polling on a
> >> > regular interval rather than a one off notification when the VM is
> >> > created.
> >> >
> >> >
> >> >
> >> > Any suggestions or alternative approaches for how to get a sample
> >> > based the number of cores scaled by a fixed constant?
> >> >
> >> >
> >> >
> >> > Tim
> >> >
> >> >
> >> >
> >> > In my pipeline.yaml sources,
> >> >
> >> >
> >> >
> >> > - name: vcpu_source
> >> >
> >> > interval: 180
> >> >
> >> > meters:
> >> >
> >> > - "vcpus"
> >> >
> >> > sinks:
> >> >
> >> > - hs06_sink
> >> >
> >> >
> >> >
> >> > In my transformers, I have
> >> >
> >> >
> >> >
> >> > - name: hs06_sink
> >> >
> >> > transformers:
> >> >
> >> > - name: "unit_conversion"
> >> >
> >> > parameters:
> >> >
> >> > target:
> >> >
> >> > name: "hs06"
> >> >
> >> > unit: "HS06"
> >> >
> >> > type: "gauge"
> >> >
> >> > scale: "47.0"
> >> >
> >> > publishers:
> >> >
> >> > - notifier://
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> _________________________________________________________________
> __
> >> > _______ OpenStack Development Mailing List (not for usage
> >> > questions)
> >> > Unsubscribe:
> >> > OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> >> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >> >
> >>
> >>
> _________________________________________________________________
> ____
> >> _____ OpenStack Development Mailing List (not for usage questions)
> >> Unsubscribe:
> >> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >
> >
> >
> _________________________________________________________________
> _____
> > ____ OpenStack Development Mailing List (not for usage questions)
> > Unsubscribe:
> > OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >
> 
> _________________________________________________________________
> _________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


More information about the OpenStack-dev mailing list