Skip to content

Commit fcfbf2f

Browse files
committed
feat(alertmanager): first iteration of alertmanager
feat: add search span scope in the list view tab to add the scope at per Query level (#6810) * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level * feat: add search span scope in the list view tab to add the scope at per query level chore(install-script): install.sh script improvements (#6857) - support for docker compose plugin - check for occupied port when installing SigNoz for the first time - remove unused code Signed-off-by: Prashant Shahi <prashant@signoz.io> chore: correct order within page result (#6847)
1 parent 6ce06e3 commit fcfbf2f

38 files changed

+1951
-192
lines changed

deploy/install.sh

+29-46
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ has_cmd() {
3232
command -v "$1" > /dev/null 2>&1
3333
}
3434

35+
# Check if docker compose plugin is present
36+
has_docker_compose_plugin() {
37+
docker compose version > /dev/null 2>&1
38+
}
39+
3540
is_mac() {
3641
[[ $OSTYPE == darwin* ]]
3742
}
@@ -183,9 +188,7 @@ install_docker() {
183188
$sudo_cmd yum-config-manager --add-repo https://download.docker.com/linux/$os/docker-ce.repo
184189
echo "Installing docker"
185190
$yum_cmd install docker-ce docker-ce-cli containerd.io
186-
187191
fi
188-
189192
}
190193

191194
compose_version () {
@@ -227,12 +230,6 @@ start_docker() {
227230
echo "Starting docker service"
228231
$sudo_cmd systemctl start docker.service
229232
fi
230-
# if [[ -z $sudo_cmd ]]; then
231-
# docker ps > /dev/null && true
232-
# if [[ $? -ne 0 ]]; then
233-
# request_sudo
234-
# fi
235-
# fi
236233
if [[ -z $sudo_cmd ]]; then
237234
if ! docker ps > /dev/null && true; then
238235
request_sudo
@@ -265,7 +262,7 @@ bye() { # Prints a friendly good bye message and exits the script.
265262

266263
echo "🔴 The containers didn't seem to start correctly. Please run the following command to check containers that may have errored out:"
267264
echo ""
268-
echo -e "$sudo_cmd docker-compose -f ./docker/clickhouse-setup/docker-compose.yaml ps -a"
265+
echo -e "$sudo_cmd $docker_compose_cmd -f ./docker/clickhouse-setup/docker-compose.yaml ps -a"
269266

270267
echo "Please read our troubleshooting guide https://signoz.io/docs/install/troubleshooting/"
271268
echo "or reach us for support in #help channel in our Slack Community https://signoz.io/slack"
@@ -296,11 +293,6 @@ request_sudo() {
296293
if (( $EUID != 0 )); then
297294
sudo_cmd="sudo"
298295
echo -e "Please enter your sudo password, if prompted."
299-
# $sudo_cmd -l | grep -e "NOPASSWD: ALL" > /dev/null
300-
# if [[ $? -ne 0 ]] && ! $sudo_cmd -v; then
301-
# echo "Need sudo privileges to proceed with the installation."
302-
# exit 1;
303-
# fi
304296
if ! $sudo_cmd -l | grep -e "NOPASSWD: ALL" > /dev/null && ! $sudo_cmd -v; then
305297
echo "Need sudo privileges to proceed with the installation."
306298
exit 1;
@@ -317,6 +309,7 @@ echo -e "👋 Thank you for trying out SigNoz! "
317309
echo ""
318310

319311
sudo_cmd=""
312+
docker_compose_cmd=""
320313

321314
# Check sudo permissions
322315
if (( $EUID != 0 )); then
@@ -362,28 +355,8 @@ else
362355
SIGNOZ_INSTALLATION_ID=$(echo "$sysinfo" | $digest_cmd | grep -E -o '[a-zA-Z0-9]{64}')
363356
fi
364357

365-
# echo ""
366-
367-
# echo -e "👉 ${RED}Two ways to go forward\n"
368-
# echo -e "${RED}1) ClickHouse as database (default)\n"
369-
# read -p "⚙️ Enter your preference (1/2):" choice_setup
370-
371-
# while [[ $choice_setup != "1" && $choice_setup != "2" && $choice_setup != "" ]]
372-
# do
373-
# # echo $choice_setup
374-
# echo -e "\n❌ ${CYAN}Please enter either 1 or 2"
375-
# read -p "⚙️ Enter your preference (1/2): " choice_setup
376-
# # echo $choice_setup
377-
# done
378-
379-
# if [[ $choice_setup == "1" || $choice_setup == "" ]];then
380-
# setup_type='clickhouse'
381-
# fi
382-
383358
setup_type='clickhouse'
384359

385-
# echo -e "\n✅ ${CYAN}You have chosen: ${setup_type} setup\n"
386-
387360
# Run bye if failure happens
388361
trap bye EXIT
389362

@@ -455,8 +428,6 @@ if [[ $desired_os -eq 0 ]]; then
455428
send_event "os_not_supported"
456429
fi
457430

458-
# check_ports_occupied
459-
460431
# Check is Docker daemon is installed and available. If not, the install & start Docker for Linux machines. We cannot automatically install Docker Desktop on Mac OS
461432
if ! is_command_present docker; then
462433

@@ -486,27 +457,39 @@ if ! is_command_present docker; then
486457
fi
487458
fi
488459

460+
if has_docker_compose_plugin; then
461+
echo "docker compose plugin is present, using it"
462+
docker_compose_cmd="docker compose"
489463
# Install docker-compose
490-
if ! is_command_present docker-compose; then
491-
request_sudo
492-
install_docker_compose
464+
else
465+
docker_compose_cmd="docker-compose"
466+
if ! is_command_present docker-compose; then
467+
request_sudo
468+
install_docker_compose
469+
fi
493470
fi
494471

495472
start_docker
496473

497-
# $sudo_cmd docker-compose -f ./docker/clickhouse-setup/docker-compose.yaml up -d --remove-orphans || true
498-
474+
# check for open ports, if signoz is not installed
475+
if is_command_present docker-compose; then
476+
if $sudo_cmd $docker_compose_cmd -f ./docker/clickhouse-setup/docker-compose.yaml ps | grep "signoz-query-service" | grep -q "healthy" > /dev/null 2>&1; then
477+
echo "SigNoz already installed, skipping the occupied ports check"
478+
else
479+
check_ports_occupied
480+
fi
481+
fi
499482

500483
echo ""
501484
echo -e "\n🟡 Pulling the latest container images for SigNoz.\n"
502-
$sudo_cmd docker-compose -f ./docker/clickhouse-setup/docker-compose.yaml pull
485+
$sudo_cmd $docker_compose_cmd -f ./docker/clickhouse-setup/docker-compose.yaml pull
503486

504487
echo ""
505488
echo "🟡 Starting the SigNoz containers. It may take a few minutes ..."
506489
echo
507-
# The docker-compose command does some nasty stuff for the `--detach` functionality. So we add a `|| true` so that the
490+
# The $docker_compose_cmd command does some nasty stuff for the `--detach` functionality. So we add a `|| true` so that the
508491
# script doesn't exit because this command looks like it failed to do it's thing.
509-
$sudo_cmd docker-compose -f ./docker/clickhouse-setup/docker-compose.yaml up --detach --remove-orphans || true
492+
$sudo_cmd $docker_compose_cmd -f ./docker/clickhouse-setup/docker-compose.yaml up --detach --remove-orphans || true
510493

511494
wait_for_containers_start 60
512495
echo ""
@@ -516,7 +499,7 @@ if [[ $status_code -ne 200 ]]; then
516499
echo "🔴 The containers didn't seem to start correctly. Please run the following command to check containers that may have errored out:"
517500
echo ""
518501

519-
echo -e "$sudo_cmd docker-compose -f ./docker/clickhouse-setup/docker-compose.yaml ps -a"
502+
echo -e "$sudo_cmd $docker_compose_cmd -f ./docker/clickhouse-setup/docker-compose.yaml ps -a"
520503

521504
echo "Please read our troubleshooting guide https://signoz.io/docs/install/troubleshooting/"
522505
echo "or reach us on SigNoz for support https://signoz.io/slack"
@@ -537,7 +520,7 @@ else
537520
echo "ℹ️ By default, retention period is set to 15 days for logs and traces, and 30 days for metrics."
538521
echo -e "To change this, navigate to the General tab on the Settings page of SigNoz UI. For more details, refer to https://signoz.io/docs/userguide/retention-period \n"
539522

540-
echo "ℹ️ To bring down SigNoz and clean volumes : $sudo_cmd docker-compose -f ./docker/clickhouse-setup/docker-compose.yaml down -v"
523+
echo "ℹ️ To bring down SigNoz and clean volumes : $sudo_cmd $docker_compose_cmd -f ./docker/clickhouse-setup/docker-compose.yaml down -v"
541524

542525
echo ""
543526
echo "+++++++++++++++++++++++++++++++++++++++++++++++++"

go.mod

+57-14
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ require (
3939
github.com/opentracing/opentracing-go v1.2.0
4040
github.com/patrickmn/go-cache v2.1.0+incompatible
4141
github.com/pkg/errors v0.9.1
42-
github.com/prometheus/common v0.60.0
42+
github.com/prometheus/alertmanager v0.28.0
43+
github.com/prometheus/client_golang v1.20.5
44+
github.com/prometheus/common v0.61.0
4345
github.com/prometheus/prometheus v2.5.0+incompatible
4446
github.com/rs/cors v1.11.1
4547
github.com/russellhaering/gosaml2 v0.9.0
@@ -49,28 +51,26 @@ require (
4951
github.com/smartystreets/goconvey v1.8.1
5052
github.com/soheilhy/cmux v0.1.5
5153
github.com/srikanthccv/ClickHouse-go-mock v0.9.0
52-
github.com/stretchr/testify v1.9.0
54+
github.com/stretchr/testify v1.10.0
5355
github.com/uptrace/bun v1.2.8
5456
github.com/uptrace/bun/dialect/sqlitedialect v1.2.8
5557
go.opentelemetry.io/collector/confmap v1.17.0
5658
go.opentelemetry.io/collector/pdata v1.17.0
5759
go.opentelemetry.io/collector/processor v0.111.0
58-
go.opentelemetry.io/contrib/bridges/otelzap v0.0.0-20240820072021-3fab5f5f20fb
5960
go.opentelemetry.io/contrib/config v0.10.0
60-
go.opentelemetry.io/otel v1.30.0
61-
go.opentelemetry.io/otel/log v0.6.0
62-
go.opentelemetry.io/otel/metric v1.30.0
63-
go.opentelemetry.io/otel/sdk v1.30.0
64-
go.opentelemetry.io/otel/trace v1.30.0
61+
go.opentelemetry.io/otel v1.34.0
62+
go.opentelemetry.io/otel/metric v1.34.0
63+
go.opentelemetry.io/otel/sdk v1.34.0
64+
go.opentelemetry.io/otel/trace v1.34.0
6565
go.uber.org/multierr v1.11.0
6666
go.uber.org/zap v1.27.0
6767
golang.org/x/crypto v0.31.0
6868
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
6969
golang.org/x/net v0.33.0
70-
golang.org/x/oauth2 v0.23.0
70+
golang.org/x/oauth2 v0.24.0
7171
golang.org/x/text v0.21.0
7272
google.golang.org/grpc v1.67.1
73-
google.golang.org/protobuf v1.34.2
73+
google.golang.org/protobuf v1.35.2
7474
gopkg.in/segmentio/analytics-go.v3 v3.1.0
7575
gopkg.in/yaml.v2 v2.4.0
7676
gopkg.in/yaml.v3 v3.0.1
@@ -86,16 +86,21 @@ require (
8686
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
8787
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
8888
github.com/ClickHouse/ch-go v0.61.5 // indirect
89-
github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 // indirect
89+
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect
9090
github.com/andybalholm/brotli v1.1.0 // indirect
91+
github.com/armon/go-metrics v0.4.1 // indirect
92+
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
9193
github.com/aws/aws-sdk-go v1.55.5 // indirect
9294
github.com/beevik/etree v1.1.0 // indirect
9395
github.com/beorn7/perks v1.0.1 // indirect
9496
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
9597
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
98+
github.com/coder/quartz v0.1.2 // indirect
99+
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
96100
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
97101
github.com/dennwc/varint v1.0.0 // indirect
98102
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
103+
github.com/docker/go-units v0.5.0 // indirect
99104
github.com/ebitengine/purego v0.8.0 // indirect
100105
github.com/edsrzf/mmap-go v1.1.0 // indirect
101106
github.com/elastic/lunes v0.1.0 // indirect
@@ -111,19 +116,41 @@ require (
111116
github.com/go-logr/logr v1.4.2 // indirect
112117
github.com/go-logr/stdr v1.2.2 // indirect
113118
github.com/go-ole/go-ole v1.3.0 // indirect
119+
github.com/go-openapi/analysis v0.23.0 // indirect
120+
github.com/go-openapi/errors v0.22.0 // indirect
121+
github.com/go-openapi/jsonpointer v0.21.0 // indirect
122+
github.com/go-openapi/jsonreference v0.21.0 // indirect
123+
github.com/go-openapi/loads v0.22.0 // indirect
124+
github.com/go-openapi/runtime v0.28.0 // indirect
125+
github.com/go-openapi/spec v0.21.0 // indirect
126+
github.com/go-openapi/strfmt v0.23.0 // indirect
127+
github.com/go-openapi/swag v0.23.0 // indirect
128+
github.com/go-openapi/validate v0.24.0 // indirect
114129
github.com/goccy/go-json v0.10.3 // indirect
130+
github.com/gofrs/uuid v4.4.0+incompatible // indirect
115131
github.com/gogo/protobuf v1.3.2 // indirect
116132
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
117133
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
134+
github.com/golang/protobuf v1.5.4 // indirect
118135
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
136+
github.com/google/btree v1.0.1 // indirect
119137
github.com/google/s2a-go v0.1.8 // indirect
120138
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
121139
github.com/gopherjs/gopherjs v1.17.2 // indirect
122140
github.com/gosimple/unidecode v1.0.0 // indirect
123141
github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect
124142
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect
143+
github.com/hashicorp/errwrap v1.1.0 // indirect
144+
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
145+
github.com/hashicorp/go-msgpack/v2 v2.1.1 // indirect
146+
github.com/hashicorp/go-multierror v1.1.1 // indirect
147+
github.com/hashicorp/go-sockaddr v1.0.7 // indirect
125148
github.com/hashicorp/go-version v1.7.0 // indirect
149+
github.com/hashicorp/golang-lru v1.0.2 // indirect
150+
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
151+
github.com/hashicorp/memberlist v0.5.1 // indirect
126152
github.com/inconshreveable/mousetrap v1.1.0 // indirect
153+
github.com/jessevdk/go-flags v1.6.1 // indirect
127154
github.com/jinzhu/inflection v1.0.0 // indirect
128155
github.com/jmespath/go-jmespath v0.4.0 // indirect
129156
github.com/jonboulle/clockwork v0.4.0 // indirect
@@ -137,6 +164,10 @@ require (
137164
github.com/lufia/plan9stats v0.0.0-20240408141607-282e7b5d6b74 // indirect
138165
github.com/magefile/mage v1.15.0 // indirect
139166
github.com/mattermost/xml-roundtrip-validator v0.1.0 // indirect
167+
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
168+
github.com/mdlayher/socket v0.4.1 // indirect
169+
github.com/mdlayher/vsock v1.2.1 // indirect
170+
github.com/miekg/dns v1.1.62 // indirect
140171
github.com/mitchellh/copystructure v1.2.0 // indirect
141172
github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect
142173
github.com/mitchellh/reflectwalk v1.0.2 // indirect
@@ -145,36 +176,43 @@ require (
145176
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
146177
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
147178
github.com/oklog/run v1.1.0 // indirect
179+
github.com/oklog/ulid v1.3.1 // indirect
148180
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.111.0 // indirect
149181
github.com/paulmach/orb v0.11.1 // indirect
150182
github.com/pierrec/lz4/v4 v4.1.21 // indirect
151183
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
152184
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
153185
github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect
154-
github.com/prometheus/client_golang v1.20.4 // indirect
155186
github.com/prometheus/client_model v0.6.1 // indirect
156187
github.com/prometheus/common/sigv4 v0.1.0 // indirect
188+
github.com/prometheus/exporter-toolkit v0.13.2 // indirect
157189
github.com/prometheus/procfs v0.15.1 // indirect
158190
github.com/puzpuzpuz/xsync/v3 v3.4.0 // indirect
159191
github.com/robfig/cron/v3 v3.0.1 // indirect
192+
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
160193
github.com/segmentio/asm v1.2.0 // indirect
161194
github.com/segmentio/backo-go v1.0.1 // indirect
162195
github.com/shirou/gopsutil/v4 v4.24.9 // indirect
163196
github.com/shopspring/decimal v1.4.0 // indirect
197+
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c // indirect
198+
github.com/shurcooL/vfsgen v0.0.0-20230704071429-0000e147ea92 // indirect
164199
github.com/sirupsen/logrus v1.9.3 // indirect
165200
github.com/smarty/assertions v1.15.0 // indirect
166201
github.com/spf13/cobra v1.8.1 // indirect
167202
github.com/spf13/pflag v1.0.5 // indirect
168203
github.com/tklauser/go-sysconf v0.3.13 // indirect
169204
github.com/tklauser/numcpus v0.7.0 // indirect
170205
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect
206+
github.com/trivago/tgo v1.0.7 // indirect
171207
github.com/valyala/fastjson v1.6.4 // indirect
172208
github.com/vjeantet/grok v1.0.1 // indirect
173209
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
174210
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
175211
github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c // indirect
176212
github.com/yusufpapurcu/wmi v1.2.4 // indirect
213+
go.mongodb.org/mongo-driver v1.17.1 // indirect
177214
go.opencensus.io v0.24.0 // indirect
215+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
178216
go.opentelemetry.io/collector v0.111.0 // indirect
179217
go.opentelemetry.io/collector/component v0.111.0 // indirect
180218
go.opentelemetry.io/collector/component/componentprofiles v0.111.0 // indirect
@@ -216,16 +254,21 @@ require (
216254
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.6.0 // indirect
217255
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.30.0 // indirect
218256
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.30.0 // indirect
219-
go.opentelemetry.io/otel/sdk/log v0.6.0 // indirect
220-
go.opentelemetry.io/otel/sdk/metric v1.30.0 // indirect
257+
go.opentelemetry.io/otel/log v0.10.0 // indirect
258+
go.opentelemetry.io/otel/sdk/log v0.10.0 // indirect
259+
go.opentelemetry.io/otel/sdk/metric v1.31.0 // indirect
221260
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
222261
go.uber.org/atomic v1.11.0 // indirect
262+
golang.org/x/mod v0.22.0 // indirect
263+
golang.org/x/sync v0.10.0 // indirect
223264
golang.org/x/sys v0.29.0 // indirect
224265
golang.org/x/time v0.6.0 // indirect
266+
golang.org/x/tools v0.28.0 // indirect
225267
gonum.org/v1/gonum v0.15.1 // indirect
226268
google.golang.org/api v0.199.0 // indirect
227269
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect
228270
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
271+
gopkg.in/telebot.v3 v3.3.8 // indirect
229272
k8s.io/client-go v0.31.1 // indirect
230273
k8s.io/klog/v2 v2.130.1 // indirect
231274
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect

0 commit comments

Comments
 (0)