SYNAXON / GraphiteReceiver

A vmware statsfeeder receiver to export the stats directly into graphite.
Apache License 2.0
20 stars 7 forks source link

Bug: MaxSamples not working #8

Closed toni-moreno closed 9 years ago

toni-moreno commented 9 years ago

When trying to get only 1 metric/minute I've configured only one metric for 1 vm.

    <receivers>
        <receiver>
            <name>graphite</name>
            <class>de.synaxon.graphitereceiver.MetricsReceiver</class>
            <properties>
                <property>
                    <name>host</name>
                    <value>localhost</value>
                </property>
                <property>
                    <name>port</name>
                    <value>2055</value>
                </property>
                <property>
                    <name>prefix</name>
                    <value>esxtest</value>
                </property>
                <property>
                    <name>use_fqdn</name>
                    <value>false</value>
                </property>
                <property>
                    <name>use_entity_type_prefix</name>
                    <value>true</value>
                </property>

            </properties>

...
 <frequency unit="second">60</frequency>
...
        <entity>
            <receivers>graphite</receivers>
            <name>APACHE_TEST</name>
            <type>VirtualMachine</type>
            <intervalId>20</intervalId>
            <maxSamples>1</maxSamples>
            <statsList>
                <stat>cpu.usage.average</stat>
            </statsList>
        </entity>
..

we get 3 metrics each minute ( one per each 20 seconds) thus with maxsamples=1.

esxtest.vm.APACHE_TEST.cpu.usage.average_percent 14 1426583560
esxtest.vm.APACHE_TEST.cpu.usage.average_percent 13 1426583580
esxtest.vm.APACHE_TEST.cpu.usage.average_percent 12 1426583600
kofrezo commented 9 years ago

I'll have a look at this soon. Do you have any further information or tips where this could come from. I inherited this repository from an colleague and aren't really in topic but I'm on my way to dive into it.

toni-moreno commented 9 years ago

I've tested the same config with

<maxSamples>1</maxSamples>
<maxSamples>2</maxSamples>
<maxSamples>20</maxSamples>

And we get always 3 metrics each minute, it seems this only depends on the frequency and period...