-
Notifications
You must be signed in to change notification settings - Fork 554
[GCP] Add redis data stream #4325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
867777a
add redis data stream
gpop63 3c20d6f
fix field types
gpop63 58ea070
add ingest pipeline
gpop63 6f10450
update docs
gpop63 f1cd1fc
fix manifest and changelog version
gpop63 b58f789
fix sample event metricset name
gpop63 161f7dd
add suffixes units and metric types
gpop63 60944a4
Merge remote-tracking branch 'upstream/main' into add_gcp-redis
gpop63 9177979
update docs
gpop63 9b12bab
Merge branch 'main' into add_gcp-redis
endorama 5f7fc98
Merge remote-tracking branch 'upstream/main' into add_gcp-redis
gpop63 a06acd1
fix sample event field name
gpop63 19e4ee4
Merge branch 'main' into add_gcp-redis
endorama File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Redis | ||
|
|
||
| ## Metrics | ||
|
|
||
| The `redis` dataset fetches metrics from [Redis](https://cloud.google.com/memorystore/) in Google Cloud Platform. It contains all metrics exported from the [GCP Redis Monitoring API](https://cloud.google.com/monitoring/api/metrics_gcp#gcp-redis). | ||
|
|
||
| ## Sample Event | ||
|
|
||
| {{event "redis"}} | ||
|
|
||
| ## Exported fields | ||
|
|
||
| {{fields "redis"}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
packages/gcp/data_stream/redis/agent/stream/stream.yml.hbs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| metricsets: ["metrics"] | ||
| period: {{period}} | ||
| project_id: {{project_id}} | ||
| {{#if credentials_file}} | ||
| credentials_file_path: {{credentials_file}} | ||
| {{/if}} | ||
| {{#if credentials_json}} | ||
| credentials_json: '{{credentials_json}}' | ||
| {{/if}} | ||
| {{#if region}} | ||
| region: {{region}} | ||
| {{/if}} | ||
| {{#if zone}} | ||
| zone: {{zone}} | ||
| {{/if}} | ||
| exclude_labels: {{exclude_labels}} | ||
| metrics: | ||
| - service: redis | ||
| metric_types: | ||
| - "clients/blocked" | ||
| - "clients/connected" | ||
| - "commands/calls" | ||
| - "commands/total_time" | ||
| - "commands/usec_per_call" | ||
| - "keyspace/avg_ttl" | ||
| - "keyspace/keys" | ||
| - "keyspace/keys_with_expiration" | ||
| - "persistence/rdb/bgsave_in_progress" | ||
| - "replication/master/slaves/lag" | ||
| - "replication/master/slaves/offset" | ||
| - "replication/master_repl_offset" | ||
| - "replication/offset_diff" | ||
| - "replication/role" | ||
| - "server/uptime" | ||
| - "stats/cache_hit_ratio" | ||
| - "stats/connections/total" | ||
| - "stats/cpu_utilization" | ||
| - "stats/evicted_keys" | ||
| - "stats/expired_keys" | ||
| - "stats/keyspace_hits" | ||
| - "stats/keyspace_misses" | ||
| - "stats/memory/maxmemory" | ||
| - "stats/memory/system_memory_overload_duration" | ||
| - "stats/memory/system_memory_usage_ratio" | ||
| - "stats/memory/usage" | ||
| - "stats/memory/usage_ratio" | ||
| - "stats/network_traffic" | ||
| - "stats/pubsub/channels" | ||
| - "stats/pubsub/patterns" | ||
| - "stats/reject_connections_count" |
131 changes: 131 additions & 0 deletions
131
packages/gcp/data_stream/redis/elasticsearch/ingest_pipeline/default.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,131 @@ | ||
| --- | ||
| description: Pipeline for parsing GCP Redis metrics. | ||
| processors: | ||
| - rename: | ||
| field: gcp.metrics.clients.blocked.value | ||
| target_field: gcp.redis.clients.blocked.count | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.clients.connected.value | ||
| target_field: gcp.redis.clients.connected.count | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.commands.calls.value | ||
| target_field: gcp.redis.commands.calls.count | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.commands.total_time.value | ||
| target_field: gcp.redis.commands.total_time.us | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.commands.usec_per_call.value | ||
| target_field: gcp.redis.commands.usec_per_call.sec | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.keyspace.avg_ttl.value | ||
| target_field: gcp.redis.keyspace.avg_ttl.sec | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.keyspace.keys.value | ||
| target_field: gcp.redis.keyspace.keys.count | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.keyspace.keys_with_expiration.value | ||
| target_field: gcp.redis.keyspace.keys_with_expiration.count | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.persistence.rdb.bgsave_in_progress.value | ||
| target_field: gcp.redis.persistence.rdb.bgsave_in_progress | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.replication.master.slaves.lag.value | ||
| target_field: gcp.redis.replication.master.slaves.lag.sec | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.replication.master.slaves.offset.value | ||
| target_field: gcp.redis.replication.master.slaves.offset.bytes | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.replication.master_repl_offset.value | ||
| target_field: gcp.redis.replication.master_repl_offset.bytes | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.replication.offset_diff.value | ||
| target_field: gcp.redis.replication.offset_diff.bytes | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.replication.role.value | ||
| target_field: gcp.redis.replication.role | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.server.uptime.value | ||
| target_field: gcp.redis.server.uptime.sec | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.stats.cache_hit_ratio.value | ||
| target_field: gcp.redis.stats.cache_hit_ratio | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.stats.connections.total.value | ||
| target_field: gcp.redis.stats.connections.total.count | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.stats.cpu_utilization.value | ||
| target_field: gcp.redis.stats.cpu_utilization.sec | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.stats.evicted_keys.value | ||
| target_field: gcp.redis.stats.evicted_keys.count | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.stats.expired_keys.value | ||
| target_field: gcp.redis.stats.expired_keys.count | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.stats.keyspace_hits.value | ||
| target_field: gcp.redis.stats.keyspace_hits.count | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.stats.keyspace_misses.value | ||
| target_field: gcp.redis.stats.keyspace_misses.count | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.stats.memory.maxmemory.value | ||
| target_field: gcp.redis.stats.memory.maxmemory.mb | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.stats.memory.system_memory_overload_duration.value | ||
| target_field: gcp.redis.stats.memory.system_memory_overload_duration.us | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.stats.memory.system_memory_usage_ratio.value | ||
| target_field: gcp.redis.stats.memory.system_memory_usage_ratio | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.stats.memory.usage.value | ||
| target_field: gcp.redis.stats.memory.usage.bytes | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.stats.memory.usage_ratio.value | ||
| target_field: gcp.redis.stats.memory.usage_ratio | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.stats.network_traffic.value | ||
| target_field: gcp.redis.stats.network_traffic.bytes | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.stats.pubsub.channels.value | ||
| target_field: gcp.redis.stats.pubsub.channels.count | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.stats.pubsub.patterns.value | ||
| target_field: gcp.redis.stats.pubsub.patterns.count | ||
| ignore_missing: true | ||
| - rename: | ||
| field: gcp.metrics.stats.reject_connections_count.value | ||
| target_field: gcp.redis.stats.reject_connections.count | ||
| ignore_missing: true | ||
| on_failure: | ||
| - set: | ||
| field: error.message | ||
| value: '{{ _ingest.on_failure_message }}' | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the fields here should have proper suffixes, like mentioned in https://www.elastic.co/guide/en/beats/devguide/current/event-conventions.html