File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 6464config_path=" $( snapctl get config-path) "
6565if [[ -z " $config_path " ]]; then
6666 snapctl set config-path=" "
67- fi
67+ fi
68+
69+ # Set off-cpu threshold
70+ off_cpu_threshold=" $( snapctl get off-cpu-threshold) "
71+ if [[ -z " $off_cpu_threshold " ]]; then
72+ snapctl set off-cpu-threshold=" 0"
73+ fi
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ insecure="$(snapctl get remote-store-insecure)"
2727token=" $( snapctl get remote-store-bearer-token) "
2828metadata_external_labels=" $( snapctl get metadata-external-labels) "
2929config_path=" $( snapctl get config-path) "
30+ off_cpu_threshold=" $( snapctl get off-cpu-threshold) "
3031
3132# Start building an array of command line options
3233opts=(
3738 " --remote-store-insecure=${insecure} "
3839 " --metadata-external-labels=${metadata_external_labels} "
3940 " --config-path=${config_path} "
41+ " --off-cpu-threshold=${off_cpu_threshold} "
4042)
4143
4244# If the token has been changed from empty, append it to the command line args
@@ -45,4 +47,4 @@ if [[ -n "${token}" ]]; then
4547fi
4648
4749# Run parca-agent with the gathered arguments
48- exec " ${SNAP} /parca-agent" " ${opts[@]} " 2>&1 | tee -a " $SNAP_COMMON /parca-agent.log"
50+ exec " ${SNAP} /parca-agent" " ${opts[@]} " 2>&1 | tee -a " $SNAP_COMMON /parca-agent.log"
You can’t perform that action at this time.
0 commit comments