-
-
Save ralphm/1326498c474aaacf0a12f9e569dac863 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
# | |
# This explicitly installs Netdata Agent version 1.40.0-2-nightly on Debian based systems. | |
# | |
apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances netdata=1.40.0-2-nightly 2>/dev/null | awk '/Depends: netdata/{print $2"=1.40.0-2-nightly"}' | sort | uniq | xargs apt-get -y --allow-downgrades install | |
chown -f -R netdata:netdata /var/{lib,cache,run,log}/netdata | |
systemctl restart netdata |
This work-around for the problematic 1.40.0-6-nightly:
- Installs or downgrades
netdata
version 1.40.0-2-nightly and its plugin dependencies - Fixes the permissions for all directories the Agent should access
- Restarts the Agent through systemd.
suggested downgrade to 1.40.02 worked
thanks
Your incident -handling is great! 🖐️
People having quoting issues because of the awk
command may try this as a replacement:
grep 'Depends: netdata' | cut -d' ' -f 4 | sed 's/$/=1.40.0-2-nightly/'
Notice that he "Depends: " part is language dependent: in my Ubuntu 22.04 configured in Spanish I had to replace it with "Depende: "
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Drive-by comment: I don't know if
xargs
is available by default. If not, we could save this to a variable with| tr '\n' ' '
and expand it inapt-get
.