scrape by network

21 views
Skip to first unread message

sh...@perimeterx.com

unread,
Nov 9, 2020, 7:46:15 AM11/9/20
to Prometheus Users
i have GCE project with multiple networks, i want prometheus to scrape only specific network, is it possible? try adding it to filter in various ways with no success.

error: googleapi: Error 400: Invalid value for field 'filter': 'network=europe-west1-net'. Invalid list filter expression., invalid"

conf:

- job_name: 'gce_scrape_node_europe-west1-b'

    gce_sd_configs:

      - project: myproject

        zone: europe-west1-b

        port: 9100

        filter: 'network=mynetwork'

        refresh_interval: 120s

    relabel_configs:

    - source_labels: [__meta_gce_label_network]

       target_label: network

    - source_labels: [__meta_gce_metadata_billing_component]

       target_label: billing_component

     - source_labels: [__meta_gce_instance_name]

        target_label: instance


tried setting networkInterfaces.network / networkInterfaces[].network in the filter as well and got the same error

Reply all
Reply to author
Forward
0 new messages