Skip to content

Commit

Permalink
Merge pull request #2137 from amnonh/ipv6_safe
Browse files Browse the repository at this point in the history
Ipv6 safe
  • Loading branch information
amnonh authored Dec 20, 2023
2 parents ab5daad + 4e44b98 commit bf078cc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/source/install/monitoring-stack.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,15 @@ For example:

*Using IPV6*

To use IPv6 inside scylla_server.yml, add the IPv6 addresses with their square brackets and the port numbers.
To use IPv6 inside scylla_server.yml, add the IPv6 addresses with their square brackets.

For example:

.. code-block:: yaml
- targets:
- "[2600:1f18:26b1:3a00:fac8:118e:9199:67b9]:9180"
- "[2600:1f18:26b1:3a00:fac8:118e:9199:67ba]:9180"
- "[2600:1f18:26b1:3a00:fac8:118e:9199:67b9]"
- "[2600:1f18:26b1:3a00:fac8:118e:9199:67ba]"
labels:
cluster: cluster1
dc: dc1
Expand Down
20 changes: 16 additions & 4 deletions prometheus/prometheus.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ scrape_configs:
- /etc/scylla.d/prometheus/targets/scylla_servers.yml
relabel_configs:
- source_labels: [__address__]
regex: '([^:]+)'
regex: '(.+)([:]\d+)$'
target_label: __port__
replacement: '::'
- source_labels: [__address__, __port__]
regex: '(.+);$'
target_label: __address__
replacement: '${1}:9180'

- source_labels: [__address__]
regex: '(.*):.+'
regex: '(.*):.+$'
target_label: instance
replacement: '${1}'
metric_relabel_configs:
Expand Down Expand Up @@ -154,7 +158,11 @@ scrape_configs:
relabel_configs:
# NODE_EXPORTER_PORT_MAPPING
- source_labels: [__address__]
regex: '([^:]+)'
regex: '(.+)([:]\d+)$'
target_label: __port__
replacement: '::'
- source_labels: [__address__, __port__]
regex: '(.+);$'
target_label: __address__
replacement: '${1}:9100'
- source_labels: [__address__]
Expand All @@ -175,7 +183,11 @@ scrape_configs:
relabel_configs:
# MANAGER_AGENT_PORT_MAPPING
- source_labels: [__address__]
regex: '([^:]+)'
regex: '(.+)([:]\d+)$'
target_label: __port__
replacement: '::'
- source_labels: [__address__, __port__]
regex: '(.+);$'
target_label: __address__
replacement: '${1}:5090'
- source_labels: [__address__]
Expand Down
4 changes: 2 additions & 2 deletions start-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -428,12 +428,12 @@ if [ -z "$TARGET_DIRECTORY" ] && [ -z "$CONSUL_ADDRESS" ]; then
fi

if [ -z $NODE_TARGET_FILE ]; then
PROMETHEUS_TARGETS="$PROMETHEUS_TARGETS --no-manager-agent-file"
PROMETHEUS_TARGETS="$PROMETHEUS_TARGETS --no-node-exporter-file"
NODE_TARGET_FILE=$SCYLLA_TARGET_FILE
fi

if [ -z $SCYLLA_MANGER_AGENT_TARGET_FILE ]; then
PROMETHEUS_TARGETS="$PROMETHEUS_TARGETS --no-node-exporter-file"
PROMETHEUS_TARGETS="$PROMETHEUS_TARGETS --no-manager-agent-file"
SCYLLA_MANGER_AGENT_TARGET_FILE=$SCYLLA_TARGET_FILE
fi
if [ ! -f $NODE_TARGET_FILE ]; then
Expand Down

0 comments on commit bf078cc

Please sign in to comment.