mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-24 21:27:16 +02:00
fix(signoz): install the histogramQuantile ClickHouse function (#17386)
This commit is contained in:
@@ -31,6 +31,31 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ ! -f /var/lib/clickhouse/user_scripts/histogramQuantile ]]; then
|
||||
fetch_and_deploy_gh_release "histogram-quantile" "SigNoz/signoz" "prebuild" "histogram-quantile/v0.0.1" "/opt/histogram-quantile" "histogram-quantile_linux_$(arch_resolve).tar.gz"
|
||||
|
||||
msg_info "Adding ClickHouse histogramQuantile Function"
|
||||
mkdir -p /var/lib/clickhouse/user_scripts
|
||||
install -m 755 -o clickhouse -g clickhouse /opt/histogram-quantile/histogram-quantile /var/lib/clickhouse/user_scripts/histogramQuantile
|
||||
cat <<EOF >/etc/clickhouse-server/histogram_quantile_function.yaml
|
||||
functions:
|
||||
name: histogramQuantile
|
||||
type: executable
|
||||
format: CSV
|
||||
command: ./histogramQuantile
|
||||
return_type: Float64
|
||||
argument:
|
||||
- name: buckets
|
||||
type: Array(Float64)
|
||||
- name: counts
|
||||
type: Array(Float64)
|
||||
- name: quantile
|
||||
type: Float64
|
||||
EOF
|
||||
systemctl restart clickhouse-server
|
||||
msg_ok "Added ClickHouse histogramQuantile Function"
|
||||
fi
|
||||
|
||||
if check_for_gh_release "signoz" "SigNoz/signoz"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop signoz
|
||||
|
||||
@@ -36,6 +36,28 @@ export DEBIAN_FRONTEND=noninteractive
|
||||
$STD apt install -y clickhouse-server clickhouse-client
|
||||
msg_ok "Setup ClickHouse"
|
||||
|
||||
fetch_and_deploy_gh_release "histogram-quantile" "SigNoz/signoz" "prebuild" "histogram-quantile/v0.0.1" "/opt/histogram-quantile" "histogram-quantile_linux_$(arch_resolve).tar.gz"
|
||||
|
||||
msg_info "Setting up ClickHouse histogramQuantile Function"
|
||||
mkdir -p /var/lib/clickhouse/user_scripts
|
||||
install -m 755 -o clickhouse -g clickhouse /opt/histogram-quantile/histogram-quantile /var/lib/clickhouse/user_scripts/histogramQuantile
|
||||
cat <<EOF >/etc/clickhouse-server/histogram_quantile_function.yaml
|
||||
functions:
|
||||
name: histogramQuantile
|
||||
type: executable
|
||||
format: CSV
|
||||
command: ./histogramQuantile
|
||||
return_type: Float64
|
||||
argument:
|
||||
- name: buckets
|
||||
type: Array(Float64)
|
||||
- name: counts
|
||||
type: Array(Float64)
|
||||
- name: quantile
|
||||
type: Float64
|
||||
EOF
|
||||
msg_ok "Setup ClickHouse histogramQuantile Function"
|
||||
|
||||
msg_info "Setting up Zookeeper"
|
||||
ZOOURL=$(curl -fsSL https://dlcdn.apache.org/zookeeper/current/ | grep -o 'apache-zookeeper-[0-9.]\+-bin\.tar\.gz' | head -n1)
|
||||
curl -fsSL "https://dlcdn.apache.org/zookeeper/current/$ZOOURL" -o ~/zookeeper.tar.gz
|
||||
|
||||
Reference in New Issue
Block a user