This file is indexed.

/usr/lib/python3/dist-packages/gnocchi/tests/functional/gabbits/metric-derived.yaml is in python3-gnocchi 4.2.0-0ubuntu5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
fixtures:
    - ConfigFixture

defaults:
  request_headers:
    # User foobar
    authorization: "basic Zm9vYmFyOg=="
    content-type: application/json

tests:
    - name: create archive policy
      desc: for later use
      POST: /v1/archive_policy
      request_headers:
        # User admin
        authorization: "basic YWRtaW46"
      data:
          name: carrot-cake
          aggregation_methods:
              - rate:mean
              - rate:max
              - rate:95pct
              - max
          definition:
              - granularity: 1 minute
      status: 201

    - name: create valid metric
      POST: /v1/metric
      data:
          archive_policy_name: carrot-cake
      status: 201

    - name: push measurements to metric
      POST: /v1/metric/$RESPONSE['$.id']/measures
      data:
          - timestamp: "2015-03-06T14:33:00"
            value: 10
          - timestamp: "2015-03-06T14:34:10"
            value: 13
          - timestamp: "2015-03-06T14:34:20"
            value: 13
          - timestamp: "2015-03-06T14:34:30"
            value: 15
          - timestamp: "2015-03-06T14:34:40"
            value: 18
          - timestamp: "2015-03-06T14:34:50"
            value: 20
          - timestamp: "2015-03-06T14:35:00"
            value: 22
          - timestamp: "2015-03-06T14:35:10"
            value: 26
          - timestamp: "2015-03-06T14:35:20"
            value: 30
          - timestamp: "2015-03-06T14:35:30"
            value: 31
          - timestamp: "2015-03-06T14:35:40"
            value: 37
          - timestamp: "2015-03-06T14:35:50"
            value: 55
          - timestamp: "2015-03-06T14:36:00"
            value: 62
          - timestamp: "2015-03-06T14:36:10"
            value: 100
          - timestamp: "2015-03-06T14:36:20"
            value: 102
          - timestamp: "2015-03-06T14:36:30"
            value: 103
          - timestamp: "2015-03-06T14:36:40"
            value: 104
          - timestamp: "2015-03-06T14:36:50"
            value: 110
      status: 202

    - name: get measurements rate:mean
      GET: /v1/metric/$HISTORY['create valid metric'].$RESPONSE['id']/measures?aggregation=rate:mean&refresh=true
      status: 200
      response_json_paths:
          $:
            - ['2015-03-06T14:34:00+00:00', 60.0, 2.0]
            - ['2015-03-06T14:35:00+00:00', 60.0, 5.833333333333333]
            - ['2015-03-06T14:36:00+00:00', 60.0, 9.166666666666666]

    - name: get measurements rate:95pct
      GET: /v1/metric/$HISTORY['create valid metric'].$RESPONSE['id']/measures?aggregation=rate:95pct
      status: 200
      response_json_paths:
          $:
            - ['2015-03-06T14:34:00+00:00', 60.0, 3.0]
            - ['2015-03-06T14:35:00+00:00', 60.0, 15.0]
            - ['2015-03-06T14:36:00+00:00', 60.0, 30.25]

    - name: get measurements rate:max
      GET: /v1/metric/$HISTORY['create valid metric'].$RESPONSE['id']/measures?aggregation=rate:max
      status: 200
      response_json_paths:
          $:
            - ['2015-03-06T14:34:00+00:00', 60.0, 3.0]
            - ['2015-03-06T14:35:00+00:00', 60.0, 18.0]
            - ['2015-03-06T14:36:00+00:00', 60.0, 38.0]

    - name: get measurements max
      GET: /v1/metric/$HISTORY['create valid metric'].$RESPONSE['id']/measures?aggregation=max
      status: 200
      response_json_paths:
          $:
            - ['2015-03-06T14:33:00+00:00', 60.0, 10.0]
            - ['2015-03-06T14:34:00+00:00', 60.0, 20.0]
            - ['2015-03-06T14:35:00+00:00', 60.0, 55.0]
            - ['2015-03-06T14:36:00+00:00', 60.0, 110.0]

    - name: create a second metric
      POST: /v1/metric
      data:
          archive_policy_name: carrot-cake
      status: 201

    - name: push measurements to the second metric
      POST: /v1/metric/$RESPONSE['$.id']/measures
      data:
          - timestamp: "2015-03-06T14:33:00"
            value: 10
          - timestamp: "2015-03-06T14:34:10"
            value: 13
          - timestamp: "2015-03-06T14:34:20"
            value: 13
          - timestamp: "2015-03-06T14:34:30"
            value: 15
          - timestamp: "2015-03-06T14:34:40"
            value: 18
          - timestamp: "2015-03-06T14:34:50"
            value: 20
          - timestamp: "2015-03-06T14:35:00"
            value: 22
          - timestamp: "2015-03-06T14:35:10"
            value: 26
      status: 202

    - name: push other measurements to the second metric
      POST: /v1/metric/$HISTORY['create a second metric'].$RESPONSE['$.id']/measures
      data:
          - timestamp: "2015-03-06T14:35:20"
            value: 30
          - timestamp: "2015-03-06T14:35:30"
            value: 31
          - timestamp: "2015-03-06T14:35:40"
            value: 37
          - timestamp: "2015-03-06T14:35:50"
            value: 55
          - timestamp: "2015-03-06T14:36:00"
            value: 62
          - timestamp: "2015-03-06T14:36:10"
            value: 100
          - timestamp: "2015-03-06T14:36:20"
            value: 102
          - timestamp: "2015-03-06T14:36:30"
            value: 103
          - timestamp: "2015-03-06T14:36:40"
            value: 104
          - timestamp: "2015-03-06T14:36:50"
            value: 110
      status: 202

    - name: get measurements rate:mean second metric
      GET: /v1/metric/$HISTORY['create a second metric'].$RESPONSE['id']/measures?aggregation=rate:mean&refresh=true
      status: 200
      response_json_paths:
          $:
            - ['2015-03-06T14:34:00+00:00', 60.0, 2.0]
            - ['2015-03-06T14:35:00+00:00', 60.0, 5.833333333333333]
            - ['2015-03-06T14:36:00+00:00', 60.0, 9.166666666666666]

    - name: get measurements rate:95pct second metric
      GET: /v1/metric/$HISTORY['create a second metric'].$RESPONSE['id']/measures?aggregation=rate:95pct
      status: 200
      response_json_paths:
          $:
            - ['2015-03-06T14:34:00+00:00', 60.0, 3.0]
            - ['2015-03-06T14:35:00+00:00', 60.0, 15.0]
            - ['2015-03-06T14:36:00+00:00', 60.0, 30.25]

    - name: get measurements rate:max second metric
      GET: /v1/metric/$HISTORY['create a second metric'].$RESPONSE['id']/measures?aggregation=rate:max
      status: 200
      response_json_paths:
          $:
            - ['2015-03-06T14:34:00+00:00', 60.0, 3.0]
            - ['2015-03-06T14:35:00+00:00', 60.0, 18.0]
            - ['2015-03-06T14:36:00+00:00', 60.0, 38.0]

    - name: get measurements max second metric
      GET: /v1/metric/$HISTORY['create a second metric'].$RESPONSE['id']/measures?aggregation=max
      status: 200
      response_json_paths:
          $:
            - ['2015-03-06T14:33:00+00:00', 60.0, 10.0]
            - ['2015-03-06T14:34:00+00:00', 60.0, 20.0]
            - ['2015-03-06T14:35:00+00:00', 60.0, 55.0]
            - ['2015-03-06T14:36:00+00:00', 60.0, 110.0]