As the error says, you are using unsupported regex syntax.  Prometheus 
supports the syntax of the RE2 library: 
https://github.com/google/re2/wiki/Syntax

For more complex ways of combining drop/keep expressions, you can use __tmp 
labels.  Here is an example which doesn't solve your particular problem 
exactly, but gives an example of how it can be used:

      # On docker hosts we get many tmpfs/aufs filesystem; lots of NFS 
mounts too,
      # plus ext4 bind mounts under /run/docker/runtime-runs/moby/
      # Drop all of these, except keep node_filesystem_readonly for NFS 
mounts.
      - source_labels: [__name__, fstype]
        regex: 'node_filesystem_readonly;(nfs|nfs4|.*gluster.*)'
        target_label: __tmp_keep
        replacement: Y
      - source_labels: [__tmp_keep, fstype]
        regex: ';(aufs|tmpfs|nfs|nfs4|fuse.lxcfs|.*gluster.*)'
        action: drop
      - source_labels: [__tmp_keep, mountpoint]
        regex: ';(/run/.*)'
        action: drop
      - regex: '__tmp.*'
        action: labeldrop

I wanted to drop all labels with specific fstype and mountpoint values, 
*except* I wanted to keep the node_filesystem_readonly metrics for certain 
filesystem types.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/9f8ae287-52e6-41ee-a812-afa3e1866da1n%40googlegroups.com.

Reply via email to