0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-14 01:29:11 +00:00
Commit graph

18140 commits

Author SHA1 Message Date
vkalintiris
e99da8b64b
Run the agent as a Windows service. ()
* Run the agent as a Windows service.

This commit contains the boilerplate code for running the agent as a
Windows service.

We start the agent's main as a separate thread, although this is not
strictly required based on my experiments. We need similar logic for
calling netdata's exit function when someone wants to stop the agent.

However, at this point we need to resolve the issue of gaps when
running the agent as a service. It seems that sleeping for one second
with `sleep(1)`, actually sleeps for 2 to 4 seconds on my setup.

Once we resolve this, the work that remains concerns packaging: ie.
installing the binaries at the proper places so that the relevant
DLLs are found.

To test this PR you need to:
  - Build the agent: ./packaging/utils/compile-on-windows.sh
  - Install the files: `ninja -C build/ install`
  - Copy the main binary: `cp ./build/netdata /usr/bin/`
  - (Only once) Create the netdata service: `sc.exe config Netdata binPath="C:\msys64\usr\bin\netdata"`
  - Start the service: `sc.exe start Netdata`

A couple notes:
  - The health and the spawn client have been disabled for the time
    being. They will be re-enabled once we finish the agent-as-service
    issue and the packaging.
  - Last time I checked, the agent crashes after a while when using
    dbengine. In order to have something that works correctly, you
    should specify memory-mode ram in your netdata.conf.

* Add windows version for sleep_usec_with_now

* Split install prefix from runtime prefix

These paths are always the same for non-Windows
systems. On Windows, RFS is the top-level
installation path.

With the current setup, Netdata will be installed
at C:\msys64\opt\netdata at packaging time. However,
the layout of the application means that when the
agent starts, it'll look as if everything was installed
at /.

* Do not use mold linker on Windows.

* Use modern UI for installer.

* Make the service delayed-auto

* Use mutexes instead of spinlocks.

* Update service handling logic.

* Add proper ifdefs for spinlock implementation.

* Initialize analytics spinlock

* Add a macro to build the agent as regular cli tool.

* Add makensis dependency

* Let installer know it's installing Netdata.

* Disable pluginsd on Windows

When pluginsd is enabled, the agent freezes approximately
20% of the time during startup.

* Add service description.

* Return pthread_join result

* Print tag when we fail to join a thread.

* Do not use mutexes instead of spinlocks.

* Assorted changes to service/main code.

* Rework service functions.

With the current implementation we are not getting any
MUTEX_LOCK errors and thread joining succeeds.

The only case where joining fails is the parallel initialization
of dbengine threads, which we can easily avoid by serializing
the initialization step.

* Rework main functions

This will allow someone to run the agent either as a service
or as a command-line tool.

* Change runtime prefix only when building for packaging.

* Install binaries and dlls.

* Make netdata claiming through UI work correctly.

* Fix netdata path
2024-07-02 12:19:20 +03:00
netdatabot
a38e6eef93 [ci skip] Update changelog and version for nightly build: v1.46.0-82-nightly. 2024-07-02 00:17:43 +00:00
Ilya Mashchenko
66a750fcf7
freeipmi: add "no-restart" (workaround ) () 2024-07-01 23:51:27 +03:00
Ilya Mashchenko
a698070253
ndsudo add 'chronyc serverstats' () 2024-07-01 23:38:35 +03:00
Ilya Mashchenko
eb93428eba
go.d chrony add serverstats query (disabled for now) () 2024-07-01 22:29:28 +03:00
Ilya Mashchenko
d84d32a0c0
go.d update packages () 2024-07-01 18:23:37 +03:00
Netdata bot
0ee154f554
Regenerate integrations.js ()
Co-authored-by: ilyam8 <22274335+ilyam8@users.noreply.github.com>
2024-07-01 12:14:01 +03:00
Ilya Mashchenko
60f72852c4
docs: deploy docker add host root mount () 2024-07-01 12:02:38 +03:00
Fotis Voutsas
559dbb3a24
Update role-based-access-model.md () 2024-07-01 11:43:38 +03:00
dependabot[bot]
46dfeb490c
Bump github.com/prometheus/common from 0.54.0 to 0.55.0 in /src/go/collectors/go.d.plugin ()
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 10:56:22 +03:00
dependabot[bot]
7dbb5cf6b6
Bump github.com/likexian/whois-parser from 1.24.16 to 1.24.18 in /src/go/collectors/go.d.plugin ()
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 10:29:02 +03:00
dependabot[bot]
d59a4f73d6
Bump github.com/docker/docker from 27.0.0+incompatible to 27.0.2+incompatible in /src/go/collectors/go.d.plugin ()
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 10:24:20 +03:00
dependabot[bot]
01c6d336fd
Bump actions/add-to-project from 1.0.1 to 1.0.2 ()
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 10:23:41 +03:00
dependabot[bot]
fbc1e1605b
Bump go.mongodb.org/mongo-driver from 1.15.1 to 1.16.0 in /src/go/collectors/go.d.plugin ()
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 10:23:02 +03:00
dependabot[bot]
4f19451a8c
Bump github.com/gofrs/flock from 0.8.1 to 0.11.0 in /src/go/collectors/go.d.plugin ()
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 10:06:44 +03:00
netdatabot
4ccb652ec0 [ci skip] Update changelog and version for nightly build: v1.46.0-68-nightly. 2024-06-30 00:18:44 +00:00
Ilya Mashchenko
e9103d9988
proc/diskstats: Increase accuracy of average IO operation time ()
proc/diskstats: collect avg io op time in microseconds
2024-06-30 00:56:40 +03:00
Ilya Mashchenko
324072266a
diskspace: update exclude paths/filesystems () 2024-06-29 22:24:19 +03:00
Ilya Mashchenko
0157e9b600
fix installing netdata-updater svc/timer for native packages ()
Co-authored-by: Austin S. Hemmelgarn <austin@netdata.cloud>
2024-06-29 22:23:27 +03:00
Netdata bot
454142900b
Regenerate integrations.js ()
Co-authored-by: ilyam8 <22274335+ilyam8@users.noreply.github.com>
2024-06-29 20:15:35 +03:00
Ilya Mashchenko
80b03f68fe
docs: fix go.d/weblog parser config () 2024-06-29 20:09:24 +03:00
Ilya Mashchenko
f8350a705c
fix diskspace plugin in Docker ()
* fix diskspace in Docker

* freez mount_point_stat_path
2024-06-29 11:36:52 +03:00
netdatabot
1e2c17058c [ci skip] Update changelog and version for nightly build: v1.46.0-61-nightly. 2024-06-29 00:17:48 +00:00
Austin S. Hemmelgarn
be1dc2ea51
Bump repository config fetched by kickstart to latest version. () 2024-06-28 10:05:00 -04:00
Austin S. Hemmelgarn
f2d6af0ee5
Fix Coverity scan CI. ()
* Fix Coverity scan CI.

- Bail early in the script if the system isn’t 64-bit x86 Linux, since
  it doesn’t actually work elsewhere.
- If a specific version of the Coverity tools was not specified, use
  whatever version we end up with instead of failing. This means that
  the CI will _just work_ instead of needing to be updated every few
  months because the Coverity team does not understand the concept of
  providing properly versioned download links.

* Fix typo.
2024-06-28 08:09:08 -04:00
Fotis Voutsas
2aa0ec9200
Troubleshooter must be assigned to rooms docs ()
* troubleshooter must be assigned to rooms docs

* Update manage-notification-methods.md
2024-06-28 13:01:50 +03:00
netdatabot
97c0a8fea2 [ci skip] Update changelog and version for nightly build: v1.46.0-57-nightly. 2024-06-28 00:17:10 +00:00
thiagoftsm
7a447032a3
add Win CPU interrupts () 2024-06-27 22:23:43 +00:00
Netdata bot
5e2eb85d4f
Regenerate integrations.js ()
Co-authored-by: ilyam8 <22274335+ilyam8@users.noreply.github.com>
2024-06-27 21:48:31 +03:00
Ilya Mashchenko
396ad748ce
go.d/postfix: simplify and fix tests ()
* go.d/postfix: simplify and fix tests

* update python.d.conf
2024-06-27 21:41:09 +03:00
Stelios Fragkakis
97d6793f90
Improve global statistics thread shutdown () 2024-06-27 19:46:03 +03:00
Ilya Mashchenko
ff866e463f
go.d k8state: skip jobs/cronjobs Pods () 2024-06-27 19:42:28 +03:00
Fotis Voutsas
b9ea4b4cb2
Port postfix collector from python to go () 2024-06-27 18:44:09 +03:00
Stelios Fragkakis
9f0c8c400e
Fix proxy connect response ()
* Fix proxy connect response

* Handle CONNECT to mqtt

* Fix typo
2024-06-27 16:41:03 +03:00
thiagoftsm
a4adc506d3
sysinfo (WinAPI) () 2024-06-27 11:58:58 +00:00
Ilya Mashchenko
d7769900cf
alert prototype: set default "after" to -600 () 2024-06-27 14:54:04 +03:00
Netdata bot
391df71a30
Regenerate integrations.js ()
Co-authored-by: ilyam8 <22274335+ilyam8@users.noreply.github.com>
2024-06-27 14:39:02 +03:00
Ilya Mashchenko
a567f32357
fix grep warning in kickstart () 2024-06-27 14:26:06 +03:00
Ilya Mashchenko
0458b23782
go.d snmp: add config options to filter interfaces by name and type () 2024-06-27 14:25:21 +03:00
Ilya Mashchenko
ce1f127c28
ping meta fix configuring ping_group_range () 2024-06-27 12:27:39 +03:00
netdatabot
45740face9 [ci skip] Update changelog and version for nightly build: v1.46.0-43-nightly. 2024-06-27 00:17:05 +00:00
Netdata bot
f7c6ba2ca2
Regenerate integrations.js ()
Co-authored-by: ilyam8 <22274335+ilyam8@users.noreply.github.com>
2024-06-26 20:08:05 +03:00
Ilya Mashchenko
45d84b12b0
go.d snmp: add collecting network interface stats () 2024-06-26 20:00:10 +03:00
Ilya Mashchenko
2bad58ba6e
rrdlabels: allow uppercase A-Z in label name () 2024-06-26 16:04:02 +03:00
Austin S. Hemmelgarn
16fea49038
Fix key ID handling for DEB package signing. 2024-06-26 07:14:58 -04:00
Austin S. Hemmelgarn
28a589cfef
Fix key identification for DEB package signing. 2024-06-26 07:07:32 -04:00
Austin S. Hemmelgarn
1440750413
Explicitly disable logsmanagement plugin on known-broken environments. ()
* Explicitly disable logsmanagement plugin on known-broken environments.

Also, just disable it by default, because we don’t really support it.

* Fix logic for disabling logs management plugin.
2024-06-26 06:59:38 -04:00
Austin S. Hemmelgarn
e244993763
Enforce proper include ordering for vendored libraries. ()
* Enforce proper include ordering for vendored libraries.

* Fix support for older CMake versions.
2024-06-26 06:59:11 -04:00
Austin S. Hemmelgarn
ab66b4e15e
Fix Slack error reporting for packaging workflows. () 2024-06-26 06:58:36 -04:00
netdatabot
2ea4979ec3 [ci skip] Update changelog and version for nightly build: v1.46.0-34-nightly. 2024-06-26 00:17:13 +00:00