-
Notifications
You must be signed in to change notification settings - Fork 166
istio k8s discovery #5854
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
istio k8s discovery #5854
Changes from 2 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
1cfa1b3
Spike: test istio k8s discovery
atoulme bd7e504
add more metrics
atoulme 84d9177
Merge branch 'main' into istio
jinja2 636d324
Spike: test istio k8s discovery
atoulme b7e5042
add more metrics
atoulme 08086a3
update discover rules and config
jinja2 771baee
Merge branch 'istio' of github.com:signalfx/splunk-otel-collector int…
jinja2 e95f3d7
Merge branch 'main' into istio
jinja2 125f8ae
add discovery test for istio
jinja2 60f06ab
Merge branch 'main' into istio
jinja2 6ab6cde
changelog
jinja2 d6661ef
Merge branch 'main' into istio
jinja2 1cecbd0
fix test
jinja2 029c9aa
fix lint
jinja2 08ef05e
add doc
jinja2 4b9565f
Merge branch 'main' into istio
jinja2 350050c
fix test
jinja2 99bdbea
Merge branch 'main' into istio
jinja2 fdd4157
multiline the config and check more attrs
jinja2 77dc0d6
Merge branch 'main' into istio
jinja2 7172616
add metrics to keep
jinja2 5de7670
update metric for envoy to a more common one
jinja2 96733df
Merge branch 'main' into istio
jinja2 5f9b0c8
Merge branch 'main' into istio
jinja2 701b3ac
disable prometheus/istio receiver
jinja2 d75f696
Merge branch 'main' into istio
jinja2 c19856e
update changelog
jinja2 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
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
37 changes: 37 additions & 0 deletions
37
cmd/otelcol/config/collector/config.d.linux/receivers/istio.discovery.yaml
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,37 @@ | ||
##################################################################################### | ||
# This file is generated by the Splunk Distribution of the OpenTelemetry Collector. # | ||
# # | ||
# It reflects the default configuration bundled in the Collector executable for use # | ||
# in discovery mode (--discovery) and is provided for reference or customization. # | ||
# Please note that any changes made to this file will need to be reconciled during # | ||
# upgrades of the Collector. # | ||
##################################################################################### | ||
# prometheus/istio: | ||
# enabled: true | ||
# rule: | ||
# k8s_observer: type == "pod.container" and container_image matches "istio" | ||
# config: | ||
# default: | ||
# config: | ||
# scrape_configs: | ||
# - job_name: 'envoy' | ||
# metrics_path: /stats/prometheus | ||
# scrape_interval: 10s | ||
# static_configs: | ||
# - targets: ['`endpoint`'] | ||
# metric_relabel_configs: | ||
# - source_labels: [__name__] | ||
# action: keep | ||
# regex: '(envoy_cluster_lb_healthy_panic|envoy_cluster_manager_warming_clusters|envoy_cluster_membership_healthy|envoy_cluster_membership_total|envoy_cluster_membership_healthy|envoy_cluster_upstream_cx_none_healthy|envoy_cluster_ssl_handshake|envoy_cluster_ssl_session_reused|envoy_cluster_ssl_versions_TLSv1_2|envoy_listener_ssl_versions_TLSv1_3|envoy_cluster_upstream_cx_total|envoy_cluster_upstream_cx_active|envoy_cluster_upstream_cx_http1_total|envoy_cluster_upstream_cx_http2_total|envoy_cluster_upstream_cx_close_notify|envoy_cluster_upstream_cx_connect_attempts_exceeded|envoy_cluster_upstream_cx_connect_timeout|envoy_cluster_upstream_cx_destroy_local_with_active_rq|envoy_cluster_upstream_cx_idle_timeout|envoy_cluster_upstream_cx_max_requests|envoy_cluster_upstream_cx_pool_overflow|envoy_cluster_upstream_cx_protocol_error|envoy_listener_downstream_cx_total|envoy_cluster_upstream_rq_active|envoy_cluster_upstream_rq_completed|envoy_cluster_upstream_rq_pending_active|envoy_cluster_upstream_rq_retry|envoy_cluster_upstream_rq_retry_limit_exceeded|envoy_cluster_upstream_rq_cancelled|envoy_cluster_upstream_rq_timeout|envoy_cluster_upstream_rq_tx_reset|envoy_cluster_upstream_rq_xx|envoy_cluster_upstream_rq_5xx|envoy_cluster_upstream_rq_4xx|envoy_cluster_upstream_rq_time|envoy_cluster_upstream_cx_connect_ms_sum|envoy_server_uptime|envoy_cluster_upstream_rq_completed|pilot_proxy_queue_time|pilot_proxy_convergence_time|pilot_xds_push_time|pilot_xds_send_time|envoy_server_memory_allocated|envoy_server_memory_heap_size|envoy_server_total_connections|envoy_server_live|istio_request_bytes|istio_tcp_received_bytes_total|istio_tcp_response_bytes_total|istio_tcp_connections_opened_total|istio_tcp_connections_closed_total|istio_request_messages_total|istio_response_messages_total|istio_request_duration_milliseconds|istio_requests_total|pilot_conflict_inbound_listener|pilot_eds_no_instances|pilot_k8s_cfg_events|pilot_k8s_endpoints_pending_pod|pilot_k8s_endpoints_with_no_pods|pilot_no_ip|pilot_services|pilot_xds_cds_reject|pilot_xds_eds_reject|pilot_xds_lds_reject|pilot_xds_rds_reject|pilot_xds_write_timeout|pilot_xds_expired_nonce|pilot_xds_push_context_errors|istio_mesh_connections_from_logs|istio_monitor_pods_without_sidecars)' | ||
jinja2 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# status: | ||
# metrics: | ||
# - status: successful | ||
# strict: envoy_cluster_upstream_cx_active | ||
# message: istio prometheus receiver is working! | ||
# statements: | ||
# - status: failed | ||
# regexp: "connection refused" | ||
# message: The container is not serving http connections. | ||
# - status: failed | ||
# regexp: "dial tcp: lookup" | ||
# message: Unable to resolve istio prometheus tcp endpoint |
33 changes: 33 additions & 0 deletions
33
internal/confmapprovider/discovery/bundle/bundle.d/receivers/istio.discovery.yaml
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,33 @@ | ||
##################################################################################### | ||
# Do not edit manually! # | ||
# All changes must be made to associated .tmpl file before running 'make bundle.d'. # | ||
##################################################################################### | ||
prometheus/istio: | ||
enabled: true | ||
rule: | ||
k8s_observer: type == "pod.container" and container_image matches "istio" | ||
config: | ||
default: | ||
config: | ||
scrape_configs: | ||
- job_name: 'envoy' | ||
metrics_path: /stats/prometheus | ||
scrape_interval: 10s | ||
static_configs: | ||
- targets: ['`endpoint`'] | ||
metric_relabel_configs: | ||
- source_labels: [__name__] | ||
action: keep | ||
regex: '(envoy_cluster_lb_healthy_panic|envoy_cluster_manager_warming_clusters|envoy_cluster_membership_healthy|envoy_cluster_membership_total|envoy_cluster_membership_healthy|envoy_cluster_upstream_cx_none_healthy|envoy_cluster_ssl_handshake|envoy_cluster_ssl_session_reused|envoy_cluster_ssl_versions_TLSv1_2|envoy_listener_ssl_versions_TLSv1_3|envoy_cluster_upstream_cx_total|envoy_cluster_upstream_cx_active|envoy_cluster_upstream_cx_http1_total|envoy_cluster_upstream_cx_http2_total|envoy_cluster_upstream_cx_close_notify|envoy_cluster_upstream_cx_connect_attempts_exceeded|envoy_cluster_upstream_cx_connect_timeout|envoy_cluster_upstream_cx_destroy_local_with_active_rq|envoy_cluster_upstream_cx_idle_timeout|envoy_cluster_upstream_cx_max_requests|envoy_cluster_upstream_cx_pool_overflow|envoy_cluster_upstream_cx_protocol_error|envoy_listener_downstream_cx_total|envoy_cluster_upstream_rq_active|envoy_cluster_upstream_rq_completed|envoy_cluster_upstream_rq_pending_active|envoy_cluster_upstream_rq_retry|envoy_cluster_upstream_rq_retry_limit_exceeded|envoy_cluster_upstream_rq_cancelled|envoy_cluster_upstream_rq_timeout|envoy_cluster_upstream_rq_tx_reset|envoy_cluster_upstream_rq_xx|envoy_cluster_upstream_rq_5xx|envoy_cluster_upstream_rq_4xx|envoy_cluster_upstream_rq_time|envoy_cluster_upstream_cx_connect_ms_sum|envoy_server_uptime|envoy_cluster_upstream_rq_completed|pilot_proxy_queue_time|pilot_proxy_convergence_time|pilot_xds_push_time|pilot_xds_send_time|envoy_server_memory_allocated|envoy_server_memory_heap_size|envoy_server_total_connections|envoy_server_live|istio_request_bytes|istio_tcp_received_bytes_total|istio_tcp_response_bytes_total|istio_tcp_connections_opened_total|istio_tcp_connections_closed_total|istio_request_messages_total|istio_response_messages_total|istio_request_duration_milliseconds|istio_requests_total|pilot_conflict_inbound_listener|pilot_eds_no_instances|pilot_k8s_cfg_events|pilot_k8s_endpoints_pending_pod|pilot_k8s_endpoints_with_no_pods|pilot_no_ip|pilot_services|pilot_xds_cds_reject|pilot_xds_eds_reject|pilot_xds_lds_reject|pilot_xds_rds_reject|pilot_xds_write_timeout|pilot_xds_expired_nonce|pilot_xds_push_context_errors|istio_mesh_connections_from_logs|istio_monitor_pods_without_sidecars)' | ||
status: | ||
metrics: | ||
- status: successful | ||
strict: envoy_cluster_upstream_cx_active | ||
message: istio prometheus receiver is working! | ||
statements: | ||
- status: failed | ||
regexp: "connection refused" | ||
message: The container is not serving http connections. | ||
- status: failed | ||
regexp: "dial tcp: lookup" | ||
message: Unable to resolve istio prometheus tcp endpoint |
29 changes: 29 additions & 0 deletions
29
internal/confmapprovider/discovery/bundle/bundle.d/receivers/istio.discovery.yaml.tmpl
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,29 @@ | ||
{{ receiver "prometheus/istio" }}: | ||
enabled: true | ||
rule: | ||
k8s_observer: type == "pod.container" and container_image matches "istio" | ||
config: | ||
default: | ||
config: | ||
scrape_configs: | ||
- job_name: 'envoy' | ||
metrics_path: /stats/prometheus | ||
scrape_interval: 10s | ||
static_configs: | ||
- targets: ['`endpoint`'] | ||
metric_relabel_configs: | ||
- source_labels: [__name__] | ||
action: keep | ||
regex: '(envoy_cluster_lb_healthy_panic|envoy_cluster_manager_warming_clusters|envoy_cluster_membership_healthy|envoy_cluster_membership_total|envoy_cluster_membership_healthy|envoy_cluster_upstream_cx_none_healthy|envoy_cluster_ssl_handshake|envoy_cluster_ssl_session_reused|envoy_cluster_ssl_versions_TLSv1_2|envoy_listener_ssl_versions_TLSv1_3|envoy_cluster_upstream_cx_total|envoy_cluster_upstream_cx_active|envoy_cluster_upstream_cx_http1_total|envoy_cluster_upstream_cx_http2_total|envoy_cluster_upstream_cx_close_notify|envoy_cluster_upstream_cx_connect_attempts_exceeded|envoy_cluster_upstream_cx_connect_timeout|envoy_cluster_upstream_cx_destroy_local_with_active_rq|envoy_cluster_upstream_cx_idle_timeout|envoy_cluster_upstream_cx_max_requests|envoy_cluster_upstream_cx_pool_overflow|envoy_cluster_upstream_cx_protocol_error|envoy_listener_downstream_cx_total|envoy_cluster_upstream_rq_active|envoy_cluster_upstream_rq_completed|envoy_cluster_upstream_rq_pending_active|envoy_cluster_upstream_rq_retry|envoy_cluster_upstream_rq_retry_limit_exceeded|envoy_cluster_upstream_rq_cancelled|envoy_cluster_upstream_rq_timeout|envoy_cluster_upstream_rq_tx_reset|envoy_cluster_upstream_rq_xx|envoy_cluster_upstream_rq_5xx|envoy_cluster_upstream_rq_4xx|envoy_cluster_upstream_rq_time|envoy_cluster_upstream_cx_connect_ms_sum|envoy_server_uptime|envoy_cluster_upstream_rq_completed|pilot_proxy_queue_time|pilot_proxy_convergence_time|pilot_xds_push_time|pilot_xds_send_time|envoy_server_memory_allocated|envoy_server_memory_heap_size|envoy_server_total_connections|envoy_server_live|istio_request_bytes|istio_tcp_received_bytes_total|istio_tcp_response_bytes_total|istio_tcp_connections_opened_total|istio_tcp_connections_closed_total|istio_request_messages_total|istio_response_messages_total|istio_request_duration_milliseconds|istio_requests_total|pilot_conflict_inbound_listener|pilot_eds_no_instances|pilot_k8s_cfg_events|pilot_k8s_endpoints_pending_pod|pilot_k8s_endpoints_with_no_pods|pilot_no_ip|pilot_services|pilot_xds_cds_reject|pilot_xds_eds_reject|pilot_xds_lds_reject|pilot_xds_rds_reject|pilot_xds_write_timeout|pilot_xds_expired_nonce|pilot_xds_push_context_errors|istio_mesh_connections_from_logs|istio_monitor_pods_without_sidecars)' | ||
status: | ||
metrics: | ||
- status: successful | ||
strict: envoy_cluster_upstream_cx_active | ||
message: istio prometheus receiver is working! | ||
statements: | ||
- status: failed | ||
regexp: "connection refused" | ||
message: The container is not serving http connections. | ||
- status: failed | ||
regexp: "dial tcp: lookup" | ||
message: Unable to resolve istio prometheus tcp endpoint |
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
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
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
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
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
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
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
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
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
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,3 @@ | ||
#!/bin/bash | ||
jinja2 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
kubectl apply -f $SCRIPT_DIR/envoy.yaml |
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,12 @@ | ||
#!/bin/bash | ||
|
||
# These steps install istio, with a demo profile, set up the default namespace to inject sidecars, CRDs, and the sample application under test. | ||
# See https://istio.io/latest/docs/setup/getting-started/#bookinfo for more info. | ||
|
||
curl -L https://istio.io/downloadIstio | sh - | ||
wget https://raw.githubusercontent.com/istio/istio/release-1.24/samples/bookinfo/demo-profile-no-gateways.yaml | ||
$( find . -name istio-*)/bin/istioctl install -f demo-profile-no-gateways.yaml -y | ||
kubectl label namespace default istio-injection=enabled | ||
kubectl get crd gateways.gateway.networking.k8s.io &> /dev/null || \ | ||
{ kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd?ref=v1.2.0" | kubectl apply -f -; } | ||
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.24/samples/bookinfo/platform/kube/bookinfo.yaml |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.