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

start-all.sh: Validate files in target and support es-linus #2399

Merged
merged 1 commit into from
Sep 22, 2024
Merged
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
16 changes: 14 additions & 2 deletions start-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Options:
--enable-protobuf - If set, enable the experimental Prometheus Protobuf with Native histograms support.
--scrap [scrap duration] - Change the default Prometheus scrap duration. Duration is in seconds.
--target-directory - If set, prometheus/targets/ directory will be set as a root directory for the target files
the file names should be scylla_server.yml, node_exporter_servers.yml, and scylla_manager_servers.yml
the file names should be scylla_servers.yml, node_exporter_servers.yml, scylla_manager_agents.yml, and scylla_manager_servers.yml
--stack id - Use this option when running a secondary stack, id could be 1-4
--limit container,param - Allow to set a specific Docker parameter for a container, where container can be:
prometheus, grafana, alertmanager, loki, sidecar, grafanarender
Expand Down Expand Up @@ -578,7 +578,19 @@ else
fi

if [ "$TARGET_DIRECTORY" != "" ]; then
SCYLLA_TARGET_FILE="-v "$($readlink_command $TARGET_DIRECTORY)":/etc/scylla.d/prometheus/targets/"
SCYLLA_TARGET_FILE="-v "$($readlink_command $TARGET_DIRECTORY)":/etc/scylla.d/prometheus/targets/:z"
if [ ! -f $TARGET_DIRECTORY/scylla_servers.yml ]; then
echo "Warning, using $TARGET_DIRECTORY for Prometheus traget directory, scylla_servers.yml is missing, make sure to create it, or ScyllaDB targets will be missing"
fi
if [ ! -f $TARGET_DIRECTORY/node_exporter_servers.yml ]; then
echo "Warning, using $TARGET_DIRECTORY for Prometheus traget directory, node_exporter_servers.yml is missing, make sure to create it, or node-exporter targets will be missing"
fi
if [ ! -f $TARGET_DIRECTORY/scylla_manager_agents.yml ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

If one does not use Manager, this warning is rudendent.
Its look like Prometheus do work without Manager agent or server

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll make the manager optional (or add an option to by pass it) in the future, then it will be ok not to add the files, I'm trying to avoid the situation that something is wrong with the setup but there is no indication to the user

echo "Warning, using $TARGET_DIRECTORY for Prometheus traget directory, scylla_manager_agents.yml is missing, make sure to create it, or ScyllaDB manager-agent targets will be missing"
fi
if [ ! -f $TARGET_DIRECTORY/scylla_manager_servers.yml ]; then
echo "Warning, using $TARGET_DIRECTORY for Prometheus traget directory, scylla_manager_servers.yml is missing, make sure to create it, or ScyllaDB manager target will be missing"
fi
fi
if [ -z $DATA_DIR ]
then
Expand Down