Any idea how to use/compile netdata-cloud under archlinx?



  • i have an important archlinux server which i wanna monitor with netdata.

    But building it with via the archlinux aur repo just gives me:
    “an with version of netdata isnt complied with netdata-cloud” etc. and so on.

    any idea what i could do?


  • Staff

    Hey,

    Welcome to our community and thank you for asking this question. It’s an important one that has been asked by various users. It would be best to follow the instructions as mentioned in our documentation. We don’t have any control over the netdata package of any Linux distribution, as this is maintained by their own maintainers.

    If you have any other question, just fire away!

    @Manos-Saratsis you might find this interesting.


  • Staff

    @zerberus893 Please use our preferred method, the kickstart script instead of the package manager of Arch linux. https://learn.netdata.cloud/docs/agent/packaging/installer

    We meet the packaging requirements of the distros but some times they deactivate cloud from the packaged Netdata application.


  • Staff

    @Manos-Saratsis Strictly speaking, we do not in fact meet distro packaging requirements in many cases, entirely because of the cloud support. The issue is the handling of the bundled libraries, distros (and most sane sysadmins) do not like programs which insist on statically linking libraries due to the security implications.



  • Sadly ive tried to use the kickstart installer on the webpage but it doesnt work.
    any idea what i can do, i really need to monitor this server. 😕


  • Staff

    Hey @zerberys893,

    Can you share the full terminal log that is outputted when you run the kickstart script? Also the exact version of the Linux distribution + kernel version would be handy. We will get to the bottom of this!



  • ┌root at cthulhu in ~
    └$ bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh)
    — Found existing install of Netdata under: /opt/netdata —
    — Attempting to update existing install instead of creating a new one —
    [/root]# /opt/netdata/usr/libexec/netdata/netdata-updater.sh --not-running-from-cron
    Entering /tmp/netdata-updater-xWG7nIS2rE

    ^
    |.-. .-. .-. .-. . netdata
    | ‘-’ ‘-’ ‘-’ ‘-’ real-time performance monitoring, done right!
    ±—±----±----±----±----±----±----±----±----±----±----±----±–>

    © Copyright 2017, Costa Tsaousis
    All rights reserved
    Released under GPL v3+

    You are about to install netdata to this system.
    netdata will be installed at:

                    /opt/netdata
    

    The following changes will be made to your system:

    USERS / GROUPS

    User ‘netdata’ and group ‘netdata’ will be added, if not present.

    LOGROTATE

    This file will be installed if logrotate is present.

    • /etc/logrotate.d/netdata

    SYSTEM INIT

    This file will be installed if this system runs with systemd:

    • /lib/systemd/system/netdata.service

    or, for older Centos, Debian/Ubuntu or OpenRC Gentoo:

    • /etc/init.d/netdata will be created

    This package can also update a netdata installation that has been
    created with another version of it.

    Your netdata configuration will be retained.
    After installation, netdata will be (re-)started.

    netdata re-distributes a lot of open source software components.
    Check its full license at:
    https://github.com/netdata/netdata/blob/master/LICENSE.md
    Creating directory /opt/netdata
    Verifying archive integrity… 100% All good.
    Uncompressing netdata, the real-time performance and health monitoring system 100%
    — Attempt to create user/group netdata/netadata —
    Group ‘netdata’ already exists.
    User ‘netdata’ already exists.
    — Add user netdata to required user groups —
    Group ‘docker’ does not exist.
    FAILED Failed to add netdata user to secondary groups

    Group ‘nginx’ does not exist.
    FAILED Failed to add netdata user to secondary groups

    Group ‘varnish’ does not exist.
    FAILED Failed to add netdata user to secondary groups

    Group ‘haproxy’ does not exist.
    FAILED Failed to add netdata user to secondary groups

    User ‘netdata’ is already in group ‘adm’.
    Group ‘nsd’ does not exist.
    FAILED Failed to add netdata user to secondary groups

    Group ‘proxy’ does not exist.
    FAILED Failed to add netdata user to secondary groups

    Group ‘squid’ does not exist.
    FAILED Failed to add netdata user to secondary groups

    Group ‘ceph’ does not exist.
    FAILED Failed to add netdata user to secondary groups

    User ‘netdata’ is already in group ‘nobody’.
    Group ‘I2C’ does not exist.
    FAILED Failed to add netdata user to secondary groups

    — Check SSL certificates paths —
    — Install logrotate configuration for netdata —
    [/opt/netdata]# chmod 644 /etc/logrotate.d/netdata
    OK

    — Telemetry configuration —
    You can opt out from anonymous statistics via the --disable-telemetry option, or by creating an empty file /opt/netdata/etc/netdata/.opt-out-from-anonymous-statistics

    — Install netdata at system init —
    Installing systemd service…
    [/opt/netdata]# cp system/netdata.service /lib/systemd/system/netdata.service
    OK

    [/opt/netdata]# systemctl daemon-reload
    OK

    [/opt/netdata]# systemctl enable netdata
    OK

    — Install (but not enable) netdata updater tool —
    Unit /usr/lib/systemd/system/netdata-updater.timer is masked, ignoring.
    cat: /system/netdata-updater.timer: No such file or directory
    cat: /system/netdata-updater.service: No such file or directory
    Update script is located at /opt/netdata/usr/libexec/netdata/netdata-updater.sh

    — Check if we must enable/disable the netdata updater tool —
    Unable to determine what type of auto-update scheduling to use, not enabling auto-updates.

    FAILED Cannot enable netdata updater tool

    — creating quick links —
    [/opt/netdata]# rm sbin
    OK

    [/opt/netdata]# ln -s bin sbin
    OK

    [/opt/netdata/usr]# rm bin
    OK

    [/opt/netdata/usr]# ln -s …/bin bin
    OK

    [/opt/netdata/usr]# rm sbin
    OK

    [/opt/netdata/usr]# ln -s …/bin sbin
    OK

    [/opt/netdata/usr]# rm local
    OK

    [/opt/netdata/usr]# ln -s . local
    OK

    [/opt/netdata]# rm netdata-configs
    OK

    [/opt/netdata]# ln -s etc/netdata netdata-configs
    OK

    [/opt/netdata]# rm netdata-web-files
    OK

    [/opt/netdata]# ln -s usr/share/netdata/web netdata-web-files
    OK

    [/opt/netdata]# rm netdata-plugins
    OK

    [/opt/netdata]# ln -s usr/libexec/netdata netdata-plugins
    OK

    [/opt/netdata]# rm netdata-dbs
    OK

    [/opt/netdata]# ln -s var/lib/netdata netdata-dbs
    OK

    [/opt/netdata]# rm netdata-metrics
    OK

    [/opt/netdata]# ln -s var/cache/netdata netdata-metrics
    OK

    [/opt/netdata]# rm netdata-logs
    OK

    [/opt/netdata]# ln -s var/log/netdata netdata-logs
    OK

    [/opt/netdata/etc/netdata]# rm orig
    OK

    [/opt/netdata/etc/netdata]# ln -s …/…/usr/lib/netdata/conf.d orig
    OK

    — fix permissions —
    [/opt/netdata]# chmod g+rx,o+rx /opt
    OK

    [/opt/netdata]# chown -R netdata:netdata /opt/netdata
    OK

    — fix plugin permissions —
    [/opt/netdata]# chown root:netdata usr/libexec/netdata/plugins.d/apps.plugin
    OK

    [/opt/netdata]# chmod 4750 usr/libexec/netdata/plugins.d/apps.plugin
    OK

    [/opt/netdata]# chown root:netdata usr/libexec/netdata/plugins.d/ioping
    OK

    [/opt/netdata]# chmod 4750 usr/libexec/netdata/plugins.d/ioping
    OK

    [/opt/netdata]# chown root:netdata usr/libexec/netdata/plugins.d/cgroup-network
    OK

    [/opt/netdata]# chmod 4750 usr/libexec/netdata/plugins.d/cgroup-network
    OK

    [/opt/netdata]# chown root:netdata bin/fping
    OK

    [/opt/netdata]# chmod 4750 bin/fping
    OK

    Configure TLS certificate paths
    Using /etc/ssl for TLS configuration and certificates
    Save install options
    — starting netdata —
    — Restarting netdata instance —

    Stopping all netdata threads
    [/opt/netdata]# stop_all_netdata
    OK

    Starting netdata using command ‘systemctl start netdata’
    [/opt/netdata]# systemctl start netdata
    OK

    ^
    |.-. .-. .-. .-. .-. . netdata .-. .-. .-. .-
    | ‘-’ ‘-’ ‘-’ ‘-’ ‘-’ is installed now! -’ ‘-’ ‘-’ ‘-’
    ±—±----±----±----±----±----±----±----±----±----±----±----±–>

    [/opt/netdata]# chmod 0644 /opt/netdata/etc/netdata/netdata.conf
    OK

    Switching back to /root
    OK

    — Updated existing install at /opt/netdata/bin/netdata —
    ┌root at cthulhu in ~
    └$ sudo netdata-claim.sh -token=kvQzM4o3ffXip3Y1_afKhsZ1bIN5lPW1sFewzRQZ1cAX66ilvIsXaQt5pYQPAIzBu5xMhKIYlEy5nfzyibn1VuENqErffLfolYkT7cWCPFrg0hxytAwqtfppyFzNb8KpKvsLVb8 -rooms=86230735-523a-4719-8cb5-179e5a025cea -url=https://app.netdata.cloud
    sudo: netdata-claim.sh: command not found
    ┌root at cthulhu in ~
    └$


  • Staff

    Ok, thanks for that!

    It may be possible that the script exists, but it’s not in PATH. Can you try this to find the script in this path? /opt/netdata/usr/sbin/netdata-claim.sh?



  • okay worked out.


  • Staff

    @zerberus893 I am happy! This shouldn’t happen, you can be sure that we will improve on this regard! Other than that, we hope that you enjoy netdata and it proves as useful as you hoped it to be 🙂

    @joel @Austin-Hemmelgarn

    Various users have reported that the claiming script is not in the PATH, and thus they can’t use it as we say in the documentation.

    1. Should the installer always place it in PATH? Can we improve the installer story here?
    2. Should we add explicit mentions in the documentation to be on the safe side?

    Cheers everyone!


  • Staff

    @OdysLam

    1. No, we absolutely should not put things in places outside of the requested install prefix, at least not until we actually get our install method set up to properly track what we install so we can sanely uninstall everything. The only thing we currently put outside of the install prefix are init scripts and the updater script, and those are only because there is literally no other way to integrate with the system service manager and handle scheduling for auto-updates.
    2. Yes, we should probably update the documentation, but we need to update the cloud too because that is probably about 95% of where users are getting confused. This is part of the problem with providing ‘easy one-line’ commands for this, they do not account for different configurations on user systems.

  • Staff

    Hey Austin,

    What I mean is that the kickstarter script shouldn’t add the location of the claiming script in the $PATH so that the user can evoke it as netdata-claim.sh instead of supplying the full path? Our documentation assumes that the user can evoke the script as such. Am I missing something?


  • Staff

    Yes, namely that we:

    1. Shouldn’t be manipulating core system configuration such as the value of $PATH (there’s too much risk of us causing issues for users).
    2. Actually cannot manipulate such things reliably because no two distros seem to agree about how to do it (not to mention that some distros (NixOS for example) actively prevent such changes at the system level).

    IMO, the correct solution here is to change our default install prefix from / to /opt/netdata (IOW, make it so that the regular installs with kickstart.sh and the binary packages are consistent with static installs) and then use absolute paths in the documentation (with notes that users who installed to a different prefix need to use that prefix instead).


Log in to reply