graphite_exporter icon indicating copy to clipboard operation
graphite_exporter copied to clipboard

getool: whisper import mapping not working?

Open robvalca opened this issue 2 years ago • 1 comments

Hi, I'm using graphite_exporter 0.15.0 successfully with the following simple mapping file:

mappings:
- match: cback.*.summary.*.*
  name: cback_summary_$3
  labels:
    group: $1
    role: $2
- match: cback.*.*.*.*
  name: cback_job_$4
  labels:
    group: $1
    role: $2
    hostname: $3

I'm testing to import some old Whisper data (generated by the same producer that is now sending to graphite_exporter). I'm trying to use getool create-blocks but pointing to the same mapping file seems that is not doing the thing (i use --graphite.mapping-strict-match) and nothing gets converted. If I remove the strict mapping, it converts the metrics in a direct translation mode (no labels).

Can I get some advice about how to configure the mapping file for the whisper import (I would expect the same file to work, but it seems that is not the case)

Thanks in advance,

robvalca avatar Feb 26 '24 15:02 robvalca

Hmm, mysterious, this looks to me like it should work. To convince myself, I added a few tests that exercise this functionality, and they pass 🤔

Can you share what the relevant part of your whisper directories looks like? The directory/file structure should be enough, since the metric values don't matter. Of course, if you could construct a full repro case with a source directory, mapping file, and the full command to run the conversion, that would be ideal.

@roidelapluie do you have an idea what may be going on here?

matthiasr avatar Mar 03 '24 12:03 matthiasr

Hi, @matthiasr,

Nevermind. I was wrongly pointing the conversion tool source to the node1 path, which is wrong, it should be pointing to one level up, e.g:

/var/tmp/metrics/node1/node2

./getool create-blocks --human-readable  --block-duration=8h --graphite.mapping-config=/etc/graphite_exporter/graphite_mapping.conf --graphite.mapping-strict-match /var/tmp/metrics/ /var/tmp/prometheus_export/

Thanks and sorry for the noise! Best,

robvalca avatar Mar 04 '24 11:03 robvalca