Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Prometheus does not write tags into influxdb if retention policy is set to default #3131

Closed
varaga opened this Issue Sep 1, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@varaga
Copy link

varaga commented Sep 1, 2017

Hi There,

 I'm using Prometheus for scraping targets from a remote java process. This remote java process runs a prometheus agent (JMX Exporter).

     All metrics scrapped and are stored in influxdb. 
  1. The problem is that these metrics are stored directly as 'measurements' in the influx db store and the fields of the metrics or stored as field key/values in the influxdb

  2. I'm sensing that the problem is due to retention policy set as 'default' through prometheus config file.
    Prometheus version: 1.2.3
    InfluxDb version: 1.2.x

    I don't see tags for these metrics. Is there a mapping between the labels/configuration versus the data model in influxdb ? How to set this ?

    Request you to throw some light on this. Please be noted that I raised this as a question in the users community and there was no response.

    The influxdb integration is through the following configuration:

        /prometheus/prometheus -config.file /prometheus/{{config}}.yaml
         -storage.remote.influxdb-url http://influxdb-host:8086
         -storage.remote.influxdb.username test
        -storage.remote.influxdb.database test
        -storage.remote.influxdb.retention-policy default
        -storage.local.engine none
 and the prometheus config file as below:
scrape_configs:
- job_name: 'runner'
serverset_sd_configs:
- servers:
- 'z.internal:2181'
paths:
- '/discovery/announcer/runner'
relabel_configs:
- source_labels:
- '__meta_serverset_endpoint_host_prometheusjmxexporter'
- '__meta_serverset_endpoint_port_prometheusjmxexporter'
action: replace
target_label: __address__
regex: (..*);(..*)
replacement: $1:$2
- source_labels:
- '__meta_serverset_path'
regex: '/.*/(.*[^/])/(.*[^/])/(.*[^/])/(.*[^/])'
target_label: serverset
replacement: $1/$2/$3
- source_labels:
- 'serverset'
regex: '^(.*[^/])/(.*[^/])/(.*[^/])$'
target_label: role
replacement: $1
- source_labels:
- 'serverset'
regex: '^(.*[^/])/(.*[^/])/(.*[^/])$'
target_label: environ
replacement: $2
- source_labels:
- 'serverset'
regex: '^(.*[^/])/(.*[^/])/(.*[^/])$'
target_label: application
replacement: $3
- source_labels:
- '__meta_serverset_shard'
target_label: shard
@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Sep 28, 2017

There's no indication of a bug here, this currently looks like a support question.

It makes more sense to ask questions like this on the prometheus-users mailing list rather than in a GitHub issue. On the mailing list, more people are available to potentially respond to your question, and the whole community can benefit from the answers provided.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.