netdata / netdata

Architected for speed. Automated for easy. Monitoring and troubleshooting, transformed!
https://www.netdata.cloud
GNU General Public License v3.0
70.58k stars 5.86k forks source link

[Bug]: Netdata agent for pfsense get disabled cloud feature #14091

Closed william-vn closed 1 year ago

william-vn commented 1 year ago

Bug description

I've just installed netdata on pfsense, the installation was successful. I install using "pkg install netdata" I am abe to access local dashboard:

image

but, I don't see any option/feature to connect to cloud from Dashboard. Seemingly, cloud functionality was get disabled during installation automatically.

Expected behavior

Want netdata agent connect to cloud

Steps to reproduce

  1. follow the instructions: https://learn.netdata.cloud/docs/agent/packaging/installer/methods/pfsense

Installation method

other

System info

[2.6.0-RELEASE][admin@pfSense.home.arpa]/var/log/netdata: uname -a
FreeBSD pfSense.home.arpa 12.3-STABLE FreeBSD 12.3-STABLE RELENG_2_6_0-n226742-1285d6d205f pfSense  amd64

[2.6.0-RELEASE][admin@pfSense.home.arpa]/var/log/netdata: uname -K
1203500

Netdata build info

[2.6.0-RELEASE][admin@pfSense.home.arpa]/var/log/netdata: netdata -W buildinfo
Version: netdata v1.36.1
Configure options:  '--disable-unit-tests' '--disable-cloud' '--disable-plugin-cups' '--enable-dbengine' '--disable-plugin-freeipmi' '--enable-lto' '--prefix=/usr/local' '--localstatedir=/var' '--mandir=/usr/local/man' '--disable-silent-rules' '--infodir=/usr/local/share/info/' '--build=amd64-portbld-freebsd12.3' 'build_alias=amd64-portbld-freebsd12.3' 'CC=cc' 'CFLAGS=-O2 -pipe  -fstack-protector-strong -fno-strict-aliasing ' 'LDFLAGS=  -fstack-protector-strong ' 'LIBS=' 'CPPFLAGS=-D_WANT_VMMETER' 'CXX=c++' 'CXXFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing  ' 'PKG_CONFIG=pkgconf' 'PKG_CONFIG_LIBDIR=/wrkdirs/usr/ports/net-mgmt/netdata/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig' 'CPP=cpp'
Install type: custom
Features:
    dbengine:                   YES
    Native HTTPS:               YES
    Netdata Cloud:              NO (by user request)
    ACLK Next Generation:       NO
    ACLK-NG New Cloud Protocol: YES
    ACLK Legacy:                NO
    TLS Host Verification:      YES
    Machine Learning:           YES
    Stream Compression:         YES
Libraries:
    protobuf:                NO
    jemalloc:                NO
    JSON-C:                  YES
    libcap:                  NO
    libcrypto:               YES
    libm:                    YES
    tcalloc:                 NO
    zlib:                    YES
Plugins:
    apps:                    YES
    cgroup Network Tracking: NO
    CUPS:                    NO
    EBPF:                    NO
    IPMI:                    NO
    NFACCT:                  NO
    perf:                    NO
    slabinfo:                NO
    Xen:                     NO
    Xen VBD Error Tracking:  NO
Exporters:
    AWS Kinesis:             NO
    GCP PubSub:              NO
    MongoDB:                 NO
    Prometheus Remote Write: NO
[2.6.0-RELEASE][admin@pfSense.home.arpa]/var/log/netdata:

Additional info

error.log access.log

Ferroin commented 1 year ago

This is unfortunately a known limitation of the packages provided by FreeBSD and pfSense.

If you can run either a Docker container or a Linux system (or possibly set up a FreeBSD Jail with their Linux compatibility layer), you may be able to work around this limitation by streaming from the pfSense node and connecting the parent node to the Cloud. I’m not 100% certain if this will work or not though.

william-vn commented 1 year ago

Thanks @Ferroin . I also have another workaround for this problem: Install Freebsd on another machine (use version of freebsd same as the OS that pfsense running) --> compile netdata from source code --> copy compiled netdata (/opt/netdata) to pfsense --> list all of necessary libraries for netdata, using this command: ldd /opt/netdata/usr/sbin/netdata --> copy listed libraries to pfsense --> copy the service script of netdata ( /usr/local/etc/rc.d/netdata)to pfsense --> start netdata service on pfsense --> finally, config netdata register to cloud.

I've tried to this workaround successfully , now I am able to connect netdata cloud from agent. But I am not sure it work well later or not.

woodsb02 commented 1 year ago

The netdata package on FreeBSD has recently been updated to include the cloud option by default - noting that this still needs to be manually enabled using the netdata-claim.sh script after install. The new packages should be available online with this in a few days.

https://cgit.freebsd.org/ports/commit/net-mgmt/netdata?id=b02e58aec16fdae73cb59554d37d592ec36100bb

https://cgit.freebsd.org/ports/commit/net-mgmt/netdata?id=14e7c1f66098b410e01eab023859a81dee673e6f

MrZammler commented 1 year ago

@woodsb02 thank you for this! Much appreciated.

@william-vn willing to test what @woodsb02 posted and let us know?

Thanks!

william-vn commented 1 year ago

good news. thanks @woodsb02 . I will test and let you know.

bignay2000 commented 1 year ago

Any idea what it would take to work with netgate and have this available in the PFSense's Built in Package Manager? I see competitor Zabbix has a variety of packages...

woodsb02 commented 1 year ago

Any idea what it would take to work with netgate and have this available in the PFSense's Built in Package Manager? I see competitor Zabbix has a variety of packages...

PfSense already uses the FreeBSD ports tree to build their packages, so the main effort that would be required would be to develop the PHP code to integrate configuration, service management, status monitoring and log viewing into the Pfsense web gui.

Equivalent code for the pfsense-zabbix-agent package can be found in the “files” directory here

william-vn commented 1 year ago

Hi @woodsb02 @MrZammler , I've installed netdata agent (with cloud functionality) on Pfsense successfully. now cloud feature of pfsense was enabled on pfsense.

Thank you very much !!!