<commit_before>init_config:

instances:
 - name: Prometheus
   url: '{{.Values.monasca_agent_config_prometheus_url}}/federate'
   timeout: 30
   mapping:
      match_labels:

      dimensions:
         resource: resource
      groups:
         dns:
             gauges: [ 'bind_up' ]
             rates: [ '(bind_incoming_queries)_total', '(bind_responses)_total' ]
             dimensions:
                 bind_server: kubernetes_name
                 result: result
         datapath:
             gauges: [ 'datapath_(status)' ]
             dimensions:
                 test: script
         blackbox:
             gauges: [ 'blackbox_(status)' ]
             dimensions:
                 test: script
         canary:
             gauges: [ 'canary_(status)' ]
             dimensions:
                 test: script
         prometheus:
             gauges: [ 'up' ]
             dimensions:
                 instance: instance
                 component: component
         activedirectory:
             gauges: [ 'ad_(.*_status)' ]
         kubernetes:
             gauges: [ 'kube_(node_status_ready)', 'kube_(node_status_out_of_disk)', 'node_filesystem_free' ]
             dimensions:
                 node: node
                 node: instance
                 mountpoint: mountpoint
                 fstype:
                     source_key: fstype
                     regex: '(xfs|ext4)'
                 condition: condition
         openstack.api:
             rates: [ 'openstack_(responses)_by_api_counter', 'openstack_(requests)_total_counter' ]
             gauges: [ 'openstack_(latency)_by_api_timer' ]
             dimensions:
                 service: component
                 component: kubernetes_name
                 method: method
                 api: api
                 le: le
                 quantile: quantile
                 status: status
         monasca:
             gauges: [ 'monasca_(health.*)_gauge' ]
             dimensions:
                 service: service

 - name: Prometheus-Aggregated
   url: '{{.Values.monasca_agent_config_prometheus_aggr_url}}/federate'
   timeout: 30
   match_labels:
       kubernetes_namespace:
        - monsoon3
        - monasca
        - ceilometer
        - keystone
        - swift
        - elektra
        - lyra
   mapping:
       dimensions:
           resource: resource
           kubernetes.namespace: kubernetes_namespace
           kubernetes.pod_name: kubernetes_pod_name
           hostname: kubernetes_io_hostname<commit_msg>import Prometheus metrics for Swift into Monasca<commit_after>init_config:

instances:
 - name: Prometheus
   url: '{{.Values.monasca_agent_config_prometheus_url}}/federate'
   timeout: 30
   mapping:
      match_labels:

      dimensions:
         resource: resource
      groups:
         dns:
             gauges: [ 'bind_up' ]
             rates: [ '(bind_incoming_queries)_total', '(bind_responses)_total' ]
             dimensions:
                 bind_server: kubernetes_name
                 result: result
         datapath:
             gauges: [ 'datapath_(status)' ]
             dimensions:
                 test: script
         blackbox:
             gauges: [ 'blackbox_(status)' ]
             dimensions:
                 test: script
         canary:
             gauges: [ 'canary_(status)' ]
             dimensions:
                 test: script
         prometheus:
             gauges: [ 'up' ]
             dimensions:
                 instance: instance
                 component: component
         activedirectory:
             gauges: [ 'ad_(.*_status)' ]
         kubernetes:
             gauges: [ 'kube_(node_status_ready)', 'kube_(node_status_out_of_disk)', 'node_filesystem_free' ]
             dimensions:
                 node: node
                 node: instance
                 mountpoint: mountpoint
                 fstype:
                     source_key: fstype
                     regex: '(xfs|ext4)'
                 condition: condition
         openstack.api:
             rates: [ 'openstack_(responses)_by_api_counter', 'openstack_(requests)_total_counter' ]
             gauges: [ 'openstack_(latency)_by_api_timer' ]
             dimensions:
                 service: component
                 component: kubernetes_name
                 method: method
                 api: api
                 le: le
                 quantile: quantile
                 status: status
         monasca:
             gauges: [ 'monasca_(health.*)_gauge' ]
             dimensions:
                 service: service
         swift.cluster:
             gauges:
                 - 'swift_cluster_(drives_audit_errors)_gauge'
                 - 'swift_cluster_(drives_unmounted)_gauge'
                 - 'swift_cluster_(md5_ring_not_matched)_gauge'
                 - 'swift_cluster_(storage_used_percent)_gauge'
                 - 'swift_cluster_(storage_used_percent_by_disk)_gauge'
             dimensions:
                 storage_ip: storage_ip
                 disk: disk
         swift.dispersion:
             gauges:
                 - 'swift_(dispersion_container_overlapping)_gauge'
                 - 'swift_(dispersion_object_overlapping)_gauge'
         swift.proxy:
             gauges: [ 'swift_proxy_(firstbyte_timer)' ]
             dimensions:
                 policy:   { regex: 'all' }
                 quantile: quantile
                 status:   status
                 type:     type

 - name: Prometheus-Aggregated
   url: '{{.Values.monasca_agent_config_prometheus_aggr_url}}/federate'
   timeout: 30
   match_labels:
       kubernetes_namespace:
        - monsoon3
        - monasca
        - ceilometer
        - keystone
        - swift
        - elektra
        - lyra
   mapping:
       dimensions:
           resource: resource
           kubernetes.namespace: kubernetes_namespace
           kubernetes.pod_name: kubernetes_pod_name
           hostname: kubernetes_io_hostname
{'fraction_non_alphanumeric': 0.07553173672751633, 'fraction_numerical': 0.0021771897504605595, 'mean_word_length': 1.4041867954911433, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7061392', 'n_tokens_mistral': 1582, 'n_tokens_neox': 1556, 'n_words': 284}