Open r0bj opened 2 years ago
Hi @r0bj, thanks for filing this issue! Would you please be able to run yace with the -debug
flag so that it logs AWS requests and responses? It'd be good to compare those with the aws-cli output.
@cristiangreco I've used --debug
parameter and I think I have a hypothesis why values reported by yet-another-cloudwatch-exporter
are usually lower than what Cloudwatch returns.
There are couple of measurement iteration examples with --debug
enabled below.
Measurement 1:
<member>
<Timestamps>
<member>2022-07-11T22:00:00Z</member>
<member>2022-07-11T21:59:00Z</member>
<member>2022-07-11T21:58:00Z</member>
<member>2022-07-11T21:57:00Z</member>
<member>2022-07-11T21:56:00Z</member>
</Timestamps>
<Values>
<member>2198.0</member>
<member>4118.0</member>
<member>4591.0</member>
<member>4487.0</member>
<member>4443.0</member>
</Values>
<Label>Z080388425YHH2ESICLAB</Label>
<Id>id_8757155226067830732</Id>
<StatusCode>Complete</StatusCode>
</member>
Measurement 2:
<member>
<Timestamps>
<member>2022-07-11T22:02:00Z</member>
<member>2022-07-11T22:01:00Z</member>
<member>2022-07-11T22:00:00Z</member>
<member>2022-07-11T21:59:00Z</member>
<member>2022-07-11T21:58:00Z</member>
</Timestamps>
<Values>
<member>2450.0</member>
<member>4300.0</member>
<member>4821.0</member>
<member>4118.0</member>
<member>4591.0</member>
</Values>
<Id>id_942516886148531175</Id>
<Label>Z080388425YHH2ESICLAB</Label>
<StatusCode>Complete</StatusCode>
</member>
Measurement 3:
<member>
<Timestamps>
<member>2022-07-11T22:04:00Z</member>
<member>2022-07-11T22:03:00Z</member>
<member>2022-07-11T22:02:00Z</member>
<member>2022-07-11T22:01:00Z</member>
<member>2022-07-11T22:00:00Z</member>
</Timestamps>
<Values>
<member>2717.0</member>
<member>4513.0</member>
<member>4603.0</member>
<member>4325.0</member>
<member>4821.0</member>
</Values>
<Label>Z080388425YHH2ESICLAB</Label>
<Id>id_267650114760936840</Id>
<StatusCode>Complete</StatusCode>
</member>
It seems that yet-another-cloudwatch-exporter
just takes values from last available time period from every measurement, so:
Measurement 1 - 2198.0
Measurement 2 - 2450.0
Measurement 3 - 2717.0
Unfortunately, this is not accurate because values from the last available time period are always lower (at least for Sum). This is because the time period boundaries of CloudWatch and the exporter are not in sync. In practice, this means that the value reported by the exporter is almost always smaller than what CloudWatch is reporting.
In this case, yet-another-cloudwatch-exporter should probably use values from the previous (last - 1) available time period.
Is there an existing issue for this?
Current Behavior
DNSQueries metric returns different values than Cloudwatch. Let's test metric DNSQueries for particular "HostedZoneId".
config.yml:
Values are between 1k and 2.75k:
Let's check Cloudwatch. metric.json:
Values in Cloudwatch are more or less 40% higher.
Expected Behavior
DNSQueries metric returns the same values as Cloudwatch.
Steps To Reproduce
No response
Anything else?
No response