Skip to content
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

select metrics #12

Merged
merged 2 commits into from
Apr 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 55 additions & 1 deletion deploy/helm/overrides.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,58 @@
prometheus:
prometheusSpec:
remoteWrite:
- url: http://fluentd:9888/prometheus.metrics
- url: http://fluentd:9888/prometheus.metrics.state.daemonset
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these new url matching to the source endpoints created by Sam's PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these urls need to match with the source endpoints created by my PR. Since fluentd accepts all of these metrics from prometheus and more or less treats them all the same (since they are all retagged with prometheus.datapoint). Then we separate the metrics again by job to send to the source endpoints on Sumo's end.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. they are transformed to same tag in datapoint filter stage so no impact. spliting them into different urls maybe benefit for the statistics later.

writeRelabelConfigs:
- action: keep
regex: kube-state-metrics;(kube_daemonset_status_current_number_scheduled|kube_daemonset_status_desired_number_scheduled|kube_daemonset_status_number_misscheduled|kube_daemonset_status_number_unavailable|kube_daemonset_metadata_generation)
sourceLabels: [job, __name__]
- url: http://fluentd:9888/prometheus.metrics.state.deployment
writeRelabelConfigs:
- action: keep
regex: kube-state-metrics;(kube_deployment_metadata_generation|kube_deployment_spec_paused|kube_deployment_spec_replicas|kube_deployment_status_observed_generation|kube_deployment_spec_strategy_rollingupdate_max_unavailable|kube_deployment_status_replicas_available|kube_deployment_status_replicas_unavailable)
sourceLabels: [job, __name__]
- url: http://fluentd:9888/prometheus.metrics.state.node
writeRelabelConfigs:
- action: keep
regex: kube-state-metrics;(kube_node_info|kube_node_spec_unschedulable|kube_node_status_allocatable|kube_node_status_capacity|kube_node_status_condition)
sourceLabels: [job, __name__]
- url: http://fluentd:9888/prometheus.metrics.state.pod
writeRelabelConfigs:
- action: keep
regex: kube-state-metrics;(kube_pod_container_info|kube_pod_container_resource_requests|kube_pod_container_resource_limits|kube_pod_container_status_ready|kube_pod_container_status_terminated_reason|kube_pod_container_status_waiting_reason|kube_pod_status_phase)
sourceLabels: [job, __name__]
- url: http://fluentd:9888/prometheus.metrics.controller-manager
writeRelabelConfigs:
- action: keep
regex: cloudprovider_.*_api_request_duration_seconds.*
sourceLabels: [__name__]
- url: http://fluentd:9888/prometheus.metrics.scheduler
writeRelabelConfigs:
- action: keep
regex: scheduler_e2e_scheduling_latency_microseconds.*|scheduler_binding_latency_microseconds.*|scheduler_scheduling_algorithm_latency_microseconds.*
sourceLabels: [__name__]
- url: http://fluentd:9888/prometheus.metrics.apiserver
writeRelabelConfigs:
- action: keep
regex: apiserver;(apiserver_request_count|apiserver_request_latencies.*|etcd_request_cache_get_latencies_summary.*|etcd_request_cache_add_latencies_summary.*)
sourceLabels: [job, __name__]
- url: http://fluentd:9888/prometheus.metrics.kubelet
writeRelabelConfigs:
- action: keep
regex: kubelet_docker_operations_errors|kubelet_docker_operations_latency_microseconds.*|kubelet_running_container_count|kubelet_running_pod_count|kubelet_runtime_operations_latency_microseconds.*
sourceLabels: [__name__]
- url: http://fluentd:9888/prometheus.metrics.container
writeRelabelConfigs:
- action: keep
regex: container_cpu_load_average_10s|container_cpu_system_seconds_total|container_cpu_usage_seconds_total|container_cpu_cfs_throttled_seconds_total|container_memory_usage_bytes|container_spec_memory_limit_bytes|container_memory_swap|container_spec_memory_swap_limit_bytes|container_spec_memory_reservation_limit_bytes|container_fs_usage_bytes|container_fs_limit_bytes|container_fs_writes_bytes_total|container_fs_reads_bytes_total|container_network_receive_bytes_total|container_network_transmit_bytes_total|container_network_receive_errors_total|container_network_transmit_errors_total
sourceLabels: [__name__]
- url: http://fluentd:9888/prometheus.metrics.node
writeRelabelConfigs:
- action: keep
regex: node-exporter;(node_load15|node_load5|node_cpu|node_memory_MemFree|node_memory_MemTotal|node_memory_Buffers|node_memory_Cached|node_ipvs_incoming_packets_total|node_ipvs_outgoing_packets_total|node_ipvs_outgoing_bytes_total|node_ipvs_incoming_bytes_total|node_disk_reads_completed|node_disk_bytes_read|node_disk_writes_completed|node_disk_bytes_written|node_filesystem_avail|node_filesystem_free|node_filesystem_size)
sourceLabels: [job, __name__]
- url: http://fluentd:9888/prometheus.metrics.go
writeRelabelConfigs:
- action: keep
regex: go_gc_duration_seconds|go_threads|go_goroutines
sourceLabels: [__name__]
6 changes: 3 additions & 3 deletions deploy/kubernetes/fluentd-sumologic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ data:
@type protobuf
</parse>
</source>
<match prometheus.metrics>
<match prometheus.metrics.**>
@type datapoint
tag "prometheus.datapoint"
tag prometheus.datapoint
</match>
<filter prometheus.datapoint>
@type carbon_v2
</filter>
</filter>
<match prometheus.datapoint>
@type sumologic
endpoint "#{ENV['SUMO_ENDPOINT_METRICS']}"
Expand Down