Skip to content

Commit

Permalink
hieradata: change swift statsd-exporter units
Browse files Browse the repository at this point in the history
statsd-exporter 0.9 fixes summaries to scale from milliseconds to
seconds, which is what prometheus expects

prometheus/statsd_exporter#178

Bug: T220709
Change-Id: I9214bbf764dd99e0cb60c6bcd92d4de442a802a5
  • Loading branch information
filippog committed May 8, 2019
1 parent f61341f commit 336732b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
14 changes: 7 additions & 7 deletions hieradata/role/common/swift/proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ profile::prometheus::statsd_exporter::mappings:

# Rate Limiting
- match: swift.*.*.proxy-server.RL.*.*.timing
name: swift_proxy_server_ratelimit_milliseconds
name: swift_proxy_server_ratelimit_seconds
labels:
method: "$3"
status: "$4"
Expand Down Expand Up @@ -58,13 +58,13 @@ profile::prometheus::statsd_exporter::mappings:
action: drop
# Per-policy metrics
- match: swift.*.*.proxy-server.object.policy.*.*.*.timing
name: swift_proxy_server_object_milliseconds
name: swift_proxy_server_object_seconds
labels:
policy: "$3"
method: "$4"
status: "$5"
- match: swift.*.*.proxy-server.object.policy.*.*.*.first-byte.timing
name: swift_proxy_server_object_first_byte_milliseconds
name: swift_proxy_server_object_first_byte_seconds
labels:
policy: "$3"
method: "$4"
Expand All @@ -84,12 +84,12 @@ profile::prometheus::statsd_exporter::mappings:
- match: swift.*.*.proxy-server.account.handoff_count
name: swift_proxy_server_account_handoff_total
- match: swift.*.*.proxy-server.account.*.*.timing
name: swift_proxy_server_account_milliseconds
name: swift_proxy_server_account_seconds
labels:
method: "$3"
status: "$4"
- match: swift.*.*.proxy-server.account.*.*.first-byte.timing
name: swift_proxy_server_account_first_byte_milliseconds
name: swift_proxy_server_account_first_byte_seconds
labels:
method: "$3"
status: "$4"
Expand All @@ -107,12 +107,12 @@ profile::prometheus::statsd_exporter::mappings:
- match: swift.*.*.proxy-server.container.handoff_count
name: swift_proxy_server_container_handoff_total
- match: swift.*.*.proxy-server.container.*.*.timing
name: swift_proxy_server_container_milliseconds
name: swift_proxy_server_container_seconds
labels:
method: "$3"
status: "$4"
- match: swift.*.*.proxy-server.container.*.*.first-byte.timing
name: swift_proxy_server_container_first_byte_milliseconds
name: swift_proxy_server_container_first_byte_seconds
labels:
method: "$3"
status: "$4"
Expand Down
38 changes: 19 additions & 19 deletions hieradata/role/common/swift/storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ profile::prometheus::statsd_exporter::mappings:
- match: swift.*.*.account-auditor.passes
name: swift_account_auditor_passes_total
- match: swift.*.*.account-auditor.timing
name: swift_account_auditor_milliseconds
name: swift_account_auditor_seconds

- match: swift.*.*.account-reaper.errors
name: swift_account_reaper_errors_total
Expand All @@ -27,10 +27,10 @@ profile::prometheus::statsd_exporter::mappings:
- match: swift.*.*.account-replicator.successes
name: swift_account_replicator_successes_total
- match: swift.*.*.account-replicator.timing
name: swift_account_replicator_milliseconds
name: swift_account_replicator_seconds

- match: swift.*.*.account-server.*.timing
name: swift_account_server_milliseconds
name: swift_account_server_seconds
labels:
method: "$3"

Expand All @@ -39,7 +39,7 @@ profile::prometheus::statsd_exporter::mappings:
- match: swift.*.*.container-auditor.passes
name: swift_container_auditor_passes_total
- match: swift.*.*.container-auditor.timing
name: swift_container_auditor_milliseconds
name: swift_container_auditor_seconds

- match: swift.*.*.container-replicator.attempts
name: swift_container_replicator_attempts_total
Expand All @@ -60,14 +60,14 @@ profile::prometheus::statsd_exporter::mappings:
- match: swift.*.*.container-replicator.successes
name: swift_container_replicator_successes_total
- match: swift.*.*.container-replicator.timing
name: swift_container_replicator_milliseconds
name: swift_container_replicator_seconds

- match: swift.*.*.container-server.*.timing
name: swift_container_server_success_milliseconds
name: swift_container_server_success_seconds
labels:
method: "$3"
- match: swift.*.*.container-server.*.errors.timing
name: swift_container_server_errors_milliseconds
name: swift_container_server_errors_seconds
labels:
method: "$3"

Expand All @@ -83,7 +83,7 @@ profile::prometheus::statsd_exporter::mappings:
- match: swift.*.*.container-updater.successes
name: swift_container_updater_successes_total
- match: swift.*.*.container-updater.timing
name: swift_container_updater_milliseconds
name: swift_container_updater_seconds


# Object-related services
Expand All @@ -92,16 +92,16 @@ profile::prometheus::statsd_exporter::mappings:
- match: swift.*.*.object-auditor.quarantines
name: swift_object_auditor_quarantines_total
- match: swift.*.*.object-auditor.timing
name: swift_object_auditor_milliseconds
name: swift_object_auditor_seconds

- match: swift.*.*.object-replicator.partition.delete.timing
name: swift_object_replicator_partition_delete_milliseconds
name: swift_object_replicator_partition_delete_seconds
- match: swift.*.*.object-replicator.partition.delete.count.*
name: swift_object_replicator_partition_delete_total
labels:
device: "$3"
- match: swift.*.*.object-replicator.partition.update.timing
name: swift_object_replicator_partition_update_milliseconds
name: swift_object_replicator_partition_update_seconds
- match: swift.*.*.object-replicator.partition.update.count.*
name: swift_object_replicator_partition_update_total
labels:
Expand All @@ -117,16 +117,16 @@ profile::prometheus::statsd_exporter::mappings:
name: swift_object_server_async_pendings_total
# Drop the generic timing in favor of per-device timing below
- match: swift.*.*.object-server.*.timing
name: swift_object_server_success_milliseconds
name: swift_object_server_success_seconds
action: drop
labels:
method: "$3"
- match: swift.*.*.object-server.*.errors.timing
name: swift_object_server_errors_milliseconds
name: swift_object_server_errors_seconds
labels:
method: "$3"
- match: swift.*.*.object-server.*.*.timing
name: swift_object_server_success_milliseconds
name: swift_object_server_success_seconds
labels:
method: "$3"
device: "$4"
Expand All @@ -138,7 +138,7 @@ profile::prometheus::statsd_exporter::mappings:
- match: swift.*.*.object-updater.successes
name: swift_object_updater_successes_total
- match: swift.*.*.object-updater.timing
name: swift_object_updater_milliseconds
name: swift_object_updater_seconds
- match: swift.*.*.object-updater.unlinks
name: swift_object_updater_unlinks_total

Expand All @@ -151,12 +151,12 @@ profile::prometheus::statsd_exporter::mappings:
- match: swift.*.*.proxy-server.account.handoff_count
name: swift_proxy_server_account_handoff_total
- match: swift.*.*.proxy-server.account.*.*.timing
name: swift_proxy_server_account_milliseconds
name: swift_proxy_server_account_seconds
labels:
method: "$3"
status: "$4"
- match: swift.*.*.proxy-server.account.*.*.first-byte.timing
name: swift_proxy_server_account_first_byte_milliseconds
name: swift_proxy_server_account_first_byte_seconds
labels:
method: "$3"
status: "$4"
Expand All @@ -174,12 +174,12 @@ profile::prometheus::statsd_exporter::mappings:
- match: swift.*.*.proxy-server.container.handoff_count
name: swift_proxy_server_container_handoff_total
- match: swift.*.*.proxy-server.container.*.*.timing
name: swift_proxy_server_container_milliseconds
name: swift_proxy_server_container_seconds
labels:
method: "$3"
status: "$4"
- match: swift.*.*.proxy-server.container.*.*.first-byte.timing
name: swift_proxy_server_container_first_byte_milliseconds
name: swift_proxy_server_container_first_byte_seconds
labels:
method: "$3"
status: "$4"
Expand Down

0 comments on commit 336732b

Please sign in to comment.