diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
commit | be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97 (patch) | |
tree | 9754ff1ca740f6346cf8483ec915d4054bc5da2d /integrations/templates/setup | |
parent | Initial commit. (diff) | |
download | netdata-upstream.tar.xz netdata-upstream.zip |
Adding upstream version 1.44.3.upstream/1.44.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | integrations/templates/setup.md | 108 | ||||
-rw-r--r-- | integrations/templates/setup/sample-apps-config.md | 41 | ||||
-rw-r--r-- | integrations/templates/setup/sample-charts-config.md | 6 | ||||
-rw-r--r-- | integrations/templates/setup/sample-go-config.md | 9 | ||||
-rw-r--r-- | integrations/templates/setup/sample-netdata-config.md | 10 | ||||
-rw-r--r-- | integrations/templates/setup/sample-python-config.md | 10 |
6 files changed, 184 insertions, 0 deletions
diff --git a/integrations/templates/setup.md b/integrations/templates/setup.md new file mode 100644 index 00000000..1f15c1da --- /dev/null +++ b/integrations/templates/setup.md @@ -0,0 +1,108 @@ +## Setup + +[% if entry.setup.description %] +[[ entry.setup.description ]] +[% else %] +### Prerequisites +[% if entry.setup.prerequisites.list %] + +[% for prereq in entry.setup.prerequisites.list %] +#### [[ prereq.title ]] + +[[ prereq.description ]] + +[% endfor %] + +[% else %] + +No action required. + +[% endif %] +### Configuration + +#### File + +[% if entry.setup.configuration.file.name %] +The configuration file name for this integration is `[[ entry.setup.configuration.file.name ]]`. +[% if 'section_name' in entry.setup.configuration.file %] +Configuration for this specific integration is located in the `[[ entry.setup.configuration.file.section_name ]]` section within that file. +[% endif %] + +[% if entry.plugin_name == 'go.d.plugin' %] +[% include 'setup/sample-go-config.md' %] +[% elif entry.plugin_name == 'python.d.plugin' %] +[% include 'setup/sample-python-config.md' %] +[% elif entry.plugin_name == 'charts.d.plugin' %] +[% include 'setup/sample-charts-config.md' %] +[% elif entry.plugin_name == 'ioping.plugin' %] +[% include 'setup/sample-charts-config.md' %] +[% elif entry.plugin_name == 'apps.plugin' %] +[% include 'setup/sample-apps-config.md' %] +[% elif entry.plugin_name == 'ebpf.plugin' %] +[% include 'setup/sample-netdata-config.md' %] +[% elif entry.setup.configuration.file.name == 'netdata.conf' %] +[% include 'setup/sample-netdata-config.md' %] +[% endif %] + +You can edit the configuration file using the `edit-config` script from the +Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory). + +```bash +cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata +sudo ./edit-config [[ entry.setup.configuration.file.name ]] +``` +[% else %] +There is no configuration file. +[% endif %] +#### Options + +[[ entry.setup.configuration.options.description ]] + +[% if entry.setup.configuration.options.list %] +[% if entry.setup.configuration.options.folding.enabled and not clean %] +{% details summary="[[ entry.setup.configuration.options.folding.title ]]" %} +[% endif %] +| Name | Description | Default | Required | +|:----|:-----------|:-------|:--------:| +[% for item in entry.setup.configuration.options.list %] +| [[ strfy(item.name) ]] | [[ strfy(item.description) ]] | [[ strfy(item.default_value) ]] | [[ strfy(item.required) ]] | +[% endfor %] + +[% for item in entry.setup.configuration.options.list %] +[% if 'detailed_description' in item %] +##### [[ item.name ]] + +[[ item.detailed_description ]] + +[% endif %] +[% endfor %] +[% if entry.setup.configuration.options.folding.enabled and not clean %] +{% /details %} +[% endif %] +[% elif not entry.setup.configuration.options.description %] +There are no configuration options. + +[% endif %] +#### Examples +[% if entry.setup.configuration.examples.list %] + +[% for example in entry.setup.configuration.examples.list %] +##### [[ example.name ]] + +[[ example.description ]] + +[% if example.folding.enabled and not clean %] +{% details summary="[[ entry.setup.configuration.examples.folding.title ]]" %} +[% endif %] +```yaml +[[ example.config ]] +``` +[% if example.folding.enabled and not clean %] +{% /details %} +[% endif %] +[% endfor %] +[% else%] +There are no configuration examples. + +[% endif %] +[% endif %] diff --git a/integrations/templates/setup/sample-apps-config.md b/integrations/templates/setup/sample-apps-config.md new file mode 100644 index 00000000..eb483794 --- /dev/null +++ b/integrations/templates/setup/sample-apps-config.md @@ -0,0 +1,41 @@ +A custom format is used. + +Each configuration line has a form like: + +``` +group_name: app1 app2 app3 +``` + +Where `group_name` defines an application group, and `app1`, `app2`, and `app3` are process names to match for +that application group. + +Each group can be given multiple times, to add more processes to it. + +The process names are the ones returned by: + + - `ps -e` or `/proc/PID/stat` + - in case of substring mode (see below): `/proc/PID/cmdline` + +To add process names with spaces, enclose them in quotes (single or double): +`'Plex Media Serv' "my other process"` + +Note that spaces are not supported for process groups. Use a dash "-" instead. + +You can add an asterisk (\*) at the beginning and/or the end of a process to do wildcard matching: + + - `*name` suffix mode: will search for processes ending with 'name' (/proc/PID/stat) + - `name*` prefix mode: will search for processes beginning with 'name' (/proc/PID/stat) + - `*name*` substring mode: will search for 'name' in the whole command line (/proc/PID/cmdline) + +If you enter even just one `*name*` (substring), apps.plugin will process /proc/PID/cmdline for all processes, +just once (when they are first seen). + +To add processes with single quotes, enclose them in double quotes: "process with this ' single quote" + +To add processes with double quotes, enclose them in single quotes: 'process with this " double quote' + +The order of the entries in this list is important, the first that matches a process is used, so put important +ones at the top. Processes not matched by any row, will inherit it from their parents or children. + +The order also controls the order of the dimensions on the generated charts (although applications started after +apps.plugin is started, will be appended to the existing list of dimensions the netdata daemon maintains). diff --git a/integrations/templates/setup/sample-charts-config.md b/integrations/templates/setup/sample-charts-config.md new file mode 100644 index 00000000..affd2b35 --- /dev/null +++ b/integrations/templates/setup/sample-charts-config.md @@ -0,0 +1,6 @@ +The file format is POSIX shell script. Generally, the structure is: + +```sh +OPTION_1="some value" +OPTION_2="some other value" +``` diff --git a/integrations/templates/setup/sample-go-config.md b/integrations/templates/setup/sample-go-config.md new file mode 100644 index 00000000..8be9abb5 --- /dev/null +++ b/integrations/templates/setup/sample-go-config.md @@ -0,0 +1,9 @@ +The file format is YAML. Generally, the structure is: + +```yaml +update_every: 1 +autodetection_retry: 0 +jobs: + - name: some_name1 + - name: some_name1 +``` diff --git a/integrations/templates/setup/sample-netdata-config.md b/integrations/templates/setup/sample-netdata-config.md new file mode 100644 index 00000000..bff5dcfa --- /dev/null +++ b/integrations/templates/setup/sample-netdata-config.md @@ -0,0 +1,10 @@ +The file format is a modified INI syntax. The general structure is: + +```ini +[section1] + option1 = some value + option2 = some other value + +[section2] + option3 = some third value +``` diff --git a/integrations/templates/setup/sample-python-config.md b/integrations/templates/setup/sample-python-config.md new file mode 100644 index 00000000..52967455 --- /dev/null +++ b/integrations/templates/setup/sample-python-config.md @@ -0,0 +1,10 @@ +The file format is YAML. Generally, the structure is: + +```yaml +update_every: 1 +autodetection_retry: 0 + +job_name: + job_option1: some_value + job_option2: some_other_vlaue +``` |