@cryptotaxi247 / netdata-1 / commits / cae7a2a13

Regenerate integrations.js (#18421)

Co-authored-by: ilyam8 <22274335+ilyam8@users.noreply.github.com>

Netdata bot committed Aug 26, 2024 at 14:33 UTC cae7a2a13cc24a8bc4a2a35395ef27fa98920421
5 files changed +318 -73
integrations/integrations.js
+38 -36
@@ -16410,6 +16410,44 @@ export const integrations = [
16410 "edit_link": "https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/rspamd/metadata.yaml",
16411 "related_resources": ""
16412 },
16413 + {
16414 + "meta": {
16415 + "id": "collector-go.d.plugin-samba",
16416 + "plugin_name": "go.d.plugin",
16417 + "module_name": "samba",
16418 + "monitored_instance": {
16419 + "name": "Samba",
16420 + "link": "https://www.samba.org/samba/",
16421 + "icon_filename": "samba.svg",
16422 + "categories": [
16423 + "data-collection.storage-mount-points-and-filesystems"
16424 + ]
16425 + },
16426 + "keywords": [
16427 + "samba",
16428 + "smb",
16429 + "file sharing"
16430 + ],
16431 + "related_resources": {
16432 + "integrations": {
16433 + "list": []
16434 + }
16435 + },
16436 + "info_provided_to_referring_integrations": {
16437 + "description": ""
16438 + },
16439 + "most_popular": false
16440 + },
16441 + "overview": "# Samba\n\nPlugin: go.d.plugin\nModule: samba\n\n## Overview\n\nThis collector monitors Samba syscalls and SMB2 calls. It relies on the [`smbstatus`](https://www.samba.org/samba/docs/current/man-html/smbstatus.1.html) CLI tool but avoids directly executing the binary. Instead, it utilizes `ndsudo`, a Netdata helper specifically designed to run privileged commands securely within the Netdata environment. This approach eliminates the need to use `sudo`, improving security and potentially simplifying permission management.\nExecuted commands:\n- `smbstatus -P`\n\n\n\n\nThis collector is supported on all platforms.\n\nThis collector only supports collecting metrics from a single instance of this integration.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nThis integration doesn't support auto-detection.\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits on data collection.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n",
16442 + "setup": "## Setup\n\n### Prerequisites\n\n#### Verifying and Enabling Profiling for SMBd\n\n1. **Check for Profiling Support**\n\n Before enabling profiling, it's important to verify if `smbd` was compiled with profiling capabilities. Run the following command as root user (using `sudo`) to check:\n\n ```bash\n $ sudo smbd --build-options | grep WITH_PROFILE\n WITH_PROFILE\n ```\n\n If the command outputs `WITH_PROFILE`, profiling is supported. If not, you'll need to recompile `smbd` with profiling enabled (refer to Samba documentation for specific instructions).\n\n2. **Enable Profiling**\n\n Once you've confirmed profiling support, you can enable it using one of the following methods:\n\n - **Command-Line Option**\n Start smbd with the `-P 1` option when invoking it directly from the command line.\n - **Configuration File**\n Modify the `smb.conf` configuration file located at `/etc/samba/smb.conf` (the path might vary slightly depending on your system). Add the following line to the `[global]` section:\n\n ```bash\n smbd profiling level = count\n ```\n3. **Restart the Samba service**\n\n\n\n### Configuration\n\n#### File\n\nThe configuration file name for this integration is `go.d/samba.conf`.\n\n\nYou can edit the configuration file using the `edit-config` script from the\nNetdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config go.d/samba.conf\n```\n#### Options\n\nThe following options can be defined globally: update_every.\n\n\n{% details open=true summary=\"Config options\" %}\n| Name | Description | Default | Required |\n|:----|:-----------|:-------|:--------:|\n| update_every | Data collection frequency. | 10 | no |\n| timeout | smbstatus binary execution timeout. | 2 | no |\n\n{% /details %}\n#### Examples\n\n##### Custom update_every\n\nAllows you to override the default data collection interval.\n\n{% details open=true summary=\"Config\" %}\n```yaml\njobs:\n - name: samba\n update_every: 5 # Collect statistics every 5 seconds\n\n```\n{% /details %}\n",
16443 + "troubleshooting": "## Troubleshooting\n\n### Debug Mode\n\n**Important**: Debug mode is not supported for data collection jobs created via the UI using the Dyncfg feature.\n\nTo troubleshoot issues with the `samba` collector, run the `go.d.plugin` with the debug option enabled. The output\nshould give you clues as to why the collector isn't working.\n\n- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on\n your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.\n\n ```bash\n cd /usr/libexec/netdata/plugins.d/\n ```\n\n- Switch to the `netdata` user.\n\n ```bash\n sudo -u netdata -s\n ```\n\n- Run the `go.d.plugin` to debug the collector:\n\n ```bash\n ./go.d.plugin -d -m samba\n ```\n\n### Getting Logs\n\nIf you're encountering problems with the `samba` collector, follow these steps to retrieve logs and identify potential issues:\n\n- **Run the command** specific to your system (systemd, non-systemd, or Docker container).\n- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.\n\n#### System with systemd\n\nUse the following command to view logs generated since the last Netdata service restart:\n\n```bash\njournalctl _SYSTEMD_INVOCATION_ID=\"$(systemctl show --value --property=InvocationID netdata)\" --namespace=netdata --grep samba\n```\n\n#### System without systemd\n\nLocate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:\n\n```bash\ngrep samba /var/log/netdata/collector.log\n```\n\n**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.\n\n#### Docker Container\n\nIf your Netdata runs in a Docker container named \"netdata\" (replace if different), use this command:\n\n```bash\ndocker logs netdata 2>&1 | grep samba\n```\n\n",
16444 + "alerts": "## Alerts\n\nThere are no alerts configured by default for this integration.\n",
16445 + "metrics": "## Metrics\n\nMetrics grouped by *scope*.\n\nThe scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.\n\n\n\n### Per syscall\n\nThese metrics refer to the the Syscall.\n\nLabels:\n\n| Label | Description |\n|:-----------|:----------------|\n| syscall | Syscall name |\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| samba.syscall_calls | syscalls | calls/s |\n| samba.syscall_transferred_data | transferred | bytes/s |\n\n### Per smb2call\n\nThese metrics refer to the the SMB2 Call.\n\nLabels:\n\n| Label | Description |\n|:-----------|:----------------|\n| smb2call | SMB2 call name |\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| samba.smb2_call_calls | smb2 | calls/s |\n| samba.smb2_call_transferred_data | in, out | bytes/s |\n\n",
16446 + "integration_type": "collector",
16447 + "id": "go.d.plugin-samba-Samba",
16448 + "edit_link": "https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/samba/metadata.yaml",
16449 + "related_resources": ""
16450 + },
16451 {
16452 "meta": {
16453 "id": "collector-go.d.plugin-scaleio",
@@ -19223,42 +19261,6 @@ export const integrations = [
19261 "edit_link": "https://github.com/netdata/netdata/blob/master/src/collectors/python.d.plugin/pandas/metadata.yaml",
19262 "related_resources": ""
19263 },
19226 - {
19227 - "meta": {
19228 - "plugin_name": "python.d.plugin",
19229 - "module_name": "samba",
19230 - "monitored_instance": {
19231 - "name": "Samba",
19232 - "link": "https://www.samba.org/samba/",
19233 - "categories": [
19234 - "data-collection.storage-mount-points-and-filesystems"
19235 - ],
19236 - "icon_filename": "samba.svg"
19237 - },
19238 - "related_resources": {
19239 - "integrations": {
19240 - "list": []
19241 - }
19242 - },
19243 - "info_provided_to_referring_integrations": {
19244 - "description": ""
19245 - },
19246 - "keywords": [
19247 - "samba",
19248 - "file sharing"
19249 - ],
19250 - "most_popular": false
19251 - },
19252 - "overview": "# Samba\n\nPlugin: python.d.plugin\nModule: samba\n\n## Overview\n\nThis collector monitors the performance metrics of Samba file sharing.\n\nIt is using the `smbstatus` command-line tool.\n\nExecuted commands:\n\n- `sudo -n smbstatus -P`\n\n\nThis collector is supported on all platforms.\n\nThis collector only supports collecting metrics from a single instance of this integration.\n\n`smbstatus` is used, which can only be executed by `root`. It uses `sudo` and assumes that it is configured such that the `netdata` user can execute `smbstatus` as root without a password.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nAfter all the permissions are satisfied, the `smbstatus -P` binary is executed.\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits on data collection.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n",
19253 - "setup": "## Setup\n\n### Prerequisites\n\n#### Enable the samba collector\n\nThe `samba` collector is disabled by default. To enable it, use `edit-config` from the Netdata [config directory](/docs/netdata-agent/configuration/README.md), which is typically at `/etc/netdata`, to edit the `python.d.conf` file.\n\n```bash\ncd /etc/netdata # Replace this path with your Netdata config directory, if different\nsudo ./edit-config python.d.conf\n```\nChange the value of the `samba` setting to `yes`. Save the file and restart the Netdata Agent with `sudo systemctl restart netdata`, or the [appropriate method](/packaging/installer/README.md#maintaining-a-netdata-agent-installation) for your system.\n\n\n#### Permissions and programs\n\nTo run the collector you need:\n\n- `smbstatus` program\n- `sudo` program\n- `smbd` must be compiled with profiling enabled\n- `smbd` must be started either with the `-P 1` option or inside `smb.conf` using `smbd profiling level`\n\nThe module uses `smbstatus`, which can only be executed by `root`. It uses `sudo` and assumes that it is configured such that the `netdata` user can execute `smbstatus` as root without a password.\n\n- add to your `/etc/sudoers` file:\n\n `which smbstatus` shows the full path to the binary.\n\n ```bash\n netdata ALL=(root) NOPASSWD: /path/to/smbstatus\n ```\n\n- Reset Netdata's systemd unit [CapabilityBoundingSet](https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Capabilities) (Linux distributions with systemd)\n\n The default CapabilityBoundingSet doesn't allow using `sudo`, and is quite strict in general. Resetting is not optimal, but a next-best solution given the inability to execute `smbstatus` using `sudo`.\n\n\n As the `root` user, do the following:\n\n ```cmd\n mkdir /etc/systemd/system/netdata.service.d\n echo -e '[Service]\\nCapabilityBoundingSet=~' | tee /etc/systemd/system/netdata.service.d/unset-capability-bounding-set.conf\n systemctl daemon-reload\n systemctl restart netdata.service\n ```\n\n\n\n### Configuration\n\n#### File\n\nThe configuration file name for this integration is `python.d/samba.conf`.\n\n\nYou can edit the configuration file using the `edit-config` script from the\nNetdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config python.d/samba.conf\n```\n#### Options\n\nThere are 2 sections:\n\n* Global variables\n* One or more JOBS that can define multiple different instances to monitor.\n\nThe following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values.\n\nAdditionally, the following collapsed table contains all the options that can be configured inside a JOB definition.\n\nEvery configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.\n\n\n{% details open=true summary=\"Config options\" %}\n| Name | Description | Default | Required |\n|:----|:-----------|:-------|:--------:|\n| update_every | Sets the default data collection frequency. | 5 | no |\n| priority | Controls the order of charts at the netdata dashboard. | 60000 | no |\n| autodetection_retry | Sets the job re-check interval in seconds. | 0 | no |\n| penalty | Indicates whether to apply penalty to update_every in case of failures. | yes | no |\n\n{% /details %}\n#### Examples\n\n##### Basic\n\nA basic example configuration.\n\n{% details open=true summary=\"Config\" %}\n```yaml\nmy_job_name:\n name: my_name\n update_every: 1\n\n```\n{% /details %}\n",
19254 - "troubleshooting": "## Troubleshooting\n\n### Debug Mode\n\n\nTo troubleshoot issues with the `samba` collector, run the `python.d.plugin` with the debug option enabled. The output\nshould give you clues as to why the collector isn't working.\n\n- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on\n your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.\n\n ```bash\n cd /usr/libexec/netdata/plugins.d/\n ```\n\n- Switch to the `netdata` user.\n\n ```bash\n sudo -u netdata -s\n ```\n\n- Run the `python.d.plugin` to debug the collector:\n\n ```bash\n ./python.d.plugin samba debug trace\n ```\n\n### Getting Logs\n\nIf you're encountering problems with the `samba` collector, follow these steps to retrieve logs and identify potential issues:\n\n- **Run the command** specific to your system (systemd, non-systemd, or Docker container).\n- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.\n\n#### System with systemd\n\nUse the following command to view logs generated since the last Netdata service restart:\n\n```bash\njournalctl _SYSTEMD_INVOCATION_ID=\"$(systemctl show --value --property=InvocationID netdata)\" --namespace=netdata --grep samba\n```\n\n#### System without systemd\n\nLocate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:\n\n```bash\ngrep samba /var/log/netdata/collector.log\n```\n\n**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.\n\n#### Docker Container\n\nIf your Netdata runs in a Docker container named \"netdata\" (replace if different), use this command:\n\n```bash\ndocker logs netdata 2>&1 | grep samba\n```\n\n",
19255 - "alerts": "## Alerts\n\nThere are no alerts configured by default for this integration.\n",
19256 - "metrics": "## Metrics\n\nMetrics grouped by *scope*.\n\nThe scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.\n\n\n\n### Per Samba instance\n\nThese metrics refer to the entire monitored application.\n\nThis scope has no labels.\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| syscall.rw | sendfile, recvfile | KiB/s |\n| smb2.rw | readout, writein, readin, writeout | KiB/s |\n| smb2.create_close | create, close | operations/s |\n| smb2.get_set_info | getinfo, setinfo | operations/s |\n| smb2.find | find | operations/s |\n| smb2.notify | notify | operations/s |\n| smb2.sm_counters | tcon, negprot, tdis, cancel, logoff, flush, lock, keepalive, break, sessetup | count |\n\n",
19257 - "integration_type": "collector",
19258 - "id": "python.d.plugin-samba-Samba",
19259 - "edit_link": "https://github.com/netdata/netdata/blob/master/src/collectors/python.d.plugin/samba/metadata.yaml",
19260 - "related_resources": ""
19261 - },
19264 {
19265 "meta": {
19266 "plugin_name": "python.d.plugin",
integrations/integrations.json
+38 -36
@@ -16408,6 +16408,44 @@
16408 "edit_link": "https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/rspamd/metadata.yaml",
16409 "related_resources": ""
16410 },
16411 + {
16412 + "meta": {
16413 + "id": "collector-go.d.plugin-samba",
16414 + "plugin_name": "go.d.plugin",
16415 + "module_name": "samba",
16416 + "monitored_instance": {
16417 + "name": "Samba",
16418 + "link": "https://www.samba.org/samba/",
16419 + "icon_filename": "samba.svg",
16420 + "categories": [
16421 + "data-collection.storage-mount-points-and-filesystems"
16422 + ]
16423 + },
16424 + "keywords": [
16425 + "samba",
16426 + "smb",
16427 + "file sharing"
16428 + ],
16429 + "related_resources": {
16430 + "integrations": {
16431 + "list": []
16432 + }
16433 + },
16434 + "info_provided_to_referring_integrations": {
16435 + "description": ""
16436 + },
16437 + "most_popular": false
16438 + },
16439 + "overview": "# Samba\n\nPlugin: go.d.plugin\nModule: samba\n\n## Overview\n\nThis collector monitors Samba syscalls and SMB2 calls. It relies on the [`smbstatus`](https://www.samba.org/samba/docs/current/man-html/smbstatus.1.html) CLI tool but avoids directly executing the binary. Instead, it utilizes `ndsudo`, a Netdata helper specifically designed to run privileged commands securely within the Netdata environment. This approach eliminates the need to use `sudo`, improving security and potentially simplifying permission management.\nExecuted commands:\n- `smbstatus -P`\n\n\n\n\nThis collector is supported on all platforms.\n\nThis collector only supports collecting metrics from a single instance of this integration.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nThis integration doesn't support auto-detection.\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits on data collection.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n",
16440 + "setup": "## Setup\n\n### Prerequisites\n\n#### Verifying and Enabling Profiling for SMBd\n\n1. **Check for Profiling Support**\n\n Before enabling profiling, it's important to verify if `smbd` was compiled with profiling capabilities. Run the following command as root user (using `sudo`) to check:\n\n ```bash\n $ sudo smbd --build-options | grep WITH_PROFILE\n WITH_PROFILE\n ```\n\n If the command outputs `WITH_PROFILE`, profiling is supported. If not, you'll need to recompile `smbd` with profiling enabled (refer to Samba documentation for specific instructions).\n\n2. **Enable Profiling**\n\n Once you've confirmed profiling support, you can enable it using one of the following methods:\n\n - **Command-Line Option**\n Start smbd with the `-P 1` option when invoking it directly from the command line.\n - **Configuration File**\n Modify the `smb.conf` configuration file located at `/etc/samba/smb.conf` (the path might vary slightly depending on your system). Add the following line to the `[global]` section:\n\n ```bash\n smbd profiling level = count\n ```\n3. **Restart the Samba service**\n\n\n\n### Configuration\n\n#### File\n\nThe configuration file name for this integration is `go.d/samba.conf`.\n\n\nYou can edit the configuration file using the `edit-config` script from the\nNetdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config go.d/samba.conf\n```\n#### Options\n\nThe following options can be defined globally: update_every.\n\n\n| Name | Description | Default | Required |\n|:----|:-----------|:-------|:--------:|\n| update_every | Data collection frequency. | 10 | no |\n| timeout | smbstatus binary execution timeout. | 2 | no |\n\n#### Examples\n\n##### Custom update_every\n\nAllows you to override the default data collection interval.\n\n```yaml\njobs:\n - name: samba\n update_every: 5 # Collect statistics every 5 seconds\n\n```\n",
16441 + "troubleshooting": "## Troubleshooting\n\n### Debug Mode\n\n**Important**: Debug mode is not supported for data collection jobs created via the UI using the Dyncfg feature.\n\nTo troubleshoot issues with the `samba` collector, run the `go.d.plugin` with the debug option enabled. The output\nshould give you clues as to why the collector isn't working.\n\n- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on\n your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.\n\n ```bash\n cd /usr/libexec/netdata/plugins.d/\n ```\n\n- Switch to the `netdata` user.\n\n ```bash\n sudo -u netdata -s\n ```\n\n- Run the `go.d.plugin` to debug the collector:\n\n ```bash\n ./go.d.plugin -d -m samba\n ```\n\n### Getting Logs\n\nIf you're encountering problems with the `samba` collector, follow these steps to retrieve logs and identify potential issues:\n\n- **Run the command** specific to your system (systemd, non-systemd, or Docker container).\n- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.\n\n#### System with systemd\n\nUse the following command to view logs generated since the last Netdata service restart:\n\n```bash\njournalctl _SYSTEMD_INVOCATION_ID=\"$(systemctl show --value --property=InvocationID netdata)\" --namespace=netdata --grep samba\n```\n\n#### System without systemd\n\nLocate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:\n\n```bash\ngrep samba /var/log/netdata/collector.log\n```\n\n**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.\n\n#### Docker Container\n\nIf your Netdata runs in a Docker container named \"netdata\" (replace if different), use this command:\n\n```bash\ndocker logs netdata 2>&1 | grep samba\n```\n\n",
16442 + "alerts": "## Alerts\n\nThere are no alerts configured by default for this integration.\n",
16443 + "metrics": "## Metrics\n\nMetrics grouped by *scope*.\n\nThe scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.\n\n\n\n### Per syscall\n\nThese metrics refer to the the Syscall.\n\nLabels:\n\n| Label | Description |\n|:-----------|:----------------|\n| syscall | Syscall name |\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| samba.syscall_calls | syscalls | calls/s |\n| samba.syscall_transferred_data | transferred | bytes/s |\n\n### Per smb2call\n\nThese metrics refer to the the SMB2 Call.\n\nLabels:\n\n| Label | Description |\n|:-----------|:----------------|\n| smb2call | SMB2 call name |\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| samba.smb2_call_calls | smb2 | calls/s |\n| samba.smb2_call_transferred_data | in, out | bytes/s |\n\n",
16444 + "integration_type": "collector",
16445 + "id": "go.d.plugin-samba-Samba",
16446 + "edit_link": "https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/samba/metadata.yaml",
16447 + "related_resources": ""
16448 + },
16449 {
16450 "meta": {
16451 "id": "collector-go.d.plugin-scaleio",
@@ -19221,42 +19259,6 @@
19259 "edit_link": "https://github.com/netdata/netdata/blob/master/src/collectors/python.d.plugin/pandas/metadata.yaml",
19260 "related_resources": ""
19261 },
19224 - {
19225 - "meta": {
19226 - "plugin_name": "python.d.plugin",
19227 - "module_name": "samba",
19228 - "monitored_instance": {
19229 - "name": "Samba",
19230 - "link": "https://www.samba.org/samba/",
19231 - "categories": [
19232 - "data-collection.storage-mount-points-and-filesystems"
19233 - ],
19234 - "icon_filename": "samba.svg"
19235 - },
19236 - "related_resources": {
19237 - "integrations": {
19238 - "list": []
19239 - }
19240 - },
19241 - "info_provided_to_referring_integrations": {
19242 - "description": ""
19243 - },
19244 - "keywords": [
19245 - "samba",
19246 - "file sharing"
19247 - ],
19248 - "most_popular": false
19249 - },
19250 - "overview": "# Samba\n\nPlugin: python.d.plugin\nModule: samba\n\n## Overview\n\nThis collector monitors the performance metrics of Samba file sharing.\n\nIt is using the `smbstatus` command-line tool.\n\nExecuted commands:\n\n- `sudo -n smbstatus -P`\n\n\nThis collector is supported on all platforms.\n\nThis collector only supports collecting metrics from a single instance of this integration.\n\n`smbstatus` is used, which can only be executed by `root`. It uses `sudo` and assumes that it is configured such that the `netdata` user can execute `smbstatus` as root without a password.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nAfter all the permissions are satisfied, the `smbstatus -P` binary is executed.\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits on data collection.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n",
19251 - "setup": "## Setup\n\n### Prerequisites\n\n#### Enable the samba collector\n\nThe `samba` collector is disabled by default. To enable it, use `edit-config` from the Netdata [config directory](/docs/netdata-agent/configuration/README.md), which is typically at `/etc/netdata`, to edit the `python.d.conf` file.\n\n```bash\ncd /etc/netdata # Replace this path with your Netdata config directory, if different\nsudo ./edit-config python.d.conf\n```\nChange the value of the `samba` setting to `yes`. Save the file and restart the Netdata Agent with `sudo systemctl restart netdata`, or the [appropriate method](/packaging/installer/README.md#maintaining-a-netdata-agent-installation) for your system.\n\n\n#### Permissions and programs\n\nTo run the collector you need:\n\n- `smbstatus` program\n- `sudo` program\n- `smbd` must be compiled with profiling enabled\n- `smbd` must be started either with the `-P 1` option or inside `smb.conf` using `smbd profiling level`\n\nThe module uses `smbstatus`, which can only be executed by `root`. It uses `sudo` and assumes that it is configured such that the `netdata` user can execute `smbstatus` as root without a password.\n\n- add to your `/etc/sudoers` file:\n\n `which smbstatus` shows the full path to the binary.\n\n ```bash\n netdata ALL=(root) NOPASSWD: /path/to/smbstatus\n ```\n\n- Reset Netdata's systemd unit [CapabilityBoundingSet](https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Capabilities) (Linux distributions with systemd)\n\n The default CapabilityBoundingSet doesn't allow using `sudo`, and is quite strict in general. Resetting is not optimal, but a next-best solution given the inability to execute `smbstatus` using `sudo`.\n\n\n As the `root` user, do the following:\n\n ```cmd\n mkdir /etc/systemd/system/netdata.service.d\n echo -e '[Service]\\nCapabilityBoundingSet=~' | tee /etc/systemd/system/netdata.service.d/unset-capability-bounding-set.conf\n systemctl daemon-reload\n systemctl restart netdata.service\n ```\n\n\n\n### Configuration\n\n#### File\n\nThe configuration file name for this integration is `python.d/samba.conf`.\n\n\nYou can edit the configuration file using the `edit-config` script from the\nNetdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config python.d/samba.conf\n```\n#### Options\n\nThere are 2 sections:\n\n* Global variables\n* One or more JOBS that can define multiple different instances to monitor.\n\nThe following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values.\n\nAdditionally, the following collapsed table contains all the options that can be configured inside a JOB definition.\n\nEvery configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.\n\n\n| Name | Description | Default | Required |\n|:----|:-----------|:-------|:--------:|\n| update_every | Sets the default data collection frequency. | 5 | no |\n| priority | Controls the order of charts at the netdata dashboard. | 60000 | no |\n| autodetection_retry | Sets the job re-check interval in seconds. | 0 | no |\n| penalty | Indicates whether to apply penalty to update_every in case of failures. | yes | no |\n\n#### Examples\n\n##### Basic\n\nA basic example configuration.\n\n```yaml\nmy_job_name:\n name: my_name\n update_every: 1\n\n```\n",
19252 - "troubleshooting": "## Troubleshooting\n\n### Debug Mode\n\n\nTo troubleshoot issues with the `samba` collector, run the `python.d.plugin` with the debug option enabled. The output\nshould give you clues as to why the collector isn't working.\n\n- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on\n your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.\n\n ```bash\n cd /usr/libexec/netdata/plugins.d/\n ```\n\n- Switch to the `netdata` user.\n\n ```bash\n sudo -u netdata -s\n ```\n\n- Run the `python.d.plugin` to debug the collector:\n\n ```bash\n ./python.d.plugin samba debug trace\n ```\n\n### Getting Logs\n\nIf you're encountering problems with the `samba` collector, follow these steps to retrieve logs and identify potential issues:\n\n- **Run the command** specific to your system (systemd, non-systemd, or Docker container).\n- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.\n\n#### System with systemd\n\nUse the following command to view logs generated since the last Netdata service restart:\n\n```bash\njournalctl _SYSTEMD_INVOCATION_ID=\"$(systemctl show --value --property=InvocationID netdata)\" --namespace=netdata --grep samba\n```\n\n#### System without systemd\n\nLocate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:\n\n```bash\ngrep samba /var/log/netdata/collector.log\n```\n\n**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.\n\n#### Docker Container\n\nIf your Netdata runs in a Docker container named \"netdata\" (replace if different), use this command:\n\n```bash\ndocker logs netdata 2>&1 | grep samba\n```\n\n",
19253 - "alerts": "## Alerts\n\nThere are no alerts configured by default for this integration.\n",
19254 - "metrics": "## Metrics\n\nMetrics grouped by *scope*.\n\nThe scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.\n\n\n\n### Per Samba instance\n\nThese metrics refer to the entire monitored application.\n\nThis scope has no labels.\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| syscall.rw | sendfile, recvfile | KiB/s |\n| smb2.rw | readout, writein, readin, writeout | KiB/s |\n| smb2.create_close | create, close | operations/s |\n| smb2.get_set_info | getinfo, setinfo | operations/s |\n| smb2.find | find | operations/s |\n| smb2.notify | notify | operations/s |\n| smb2.sm_counters | tcon, negprot, tdis, cancel, logoff, flush, lock, keepalive, break, sessetup | count |\n\n",
19255 - "integration_type": "collector",
19256 - "id": "python.d.plugin-samba-Samba",
19257 - "edit_link": "https://github.com/netdata/netdata/blob/master/src/collectors/python.d.plugin/samba/metadata.yaml",
19258 - "related_resources": ""
19259 - },
19262 {
19263 "meta": {
19264 "plugin_name": "python.d.plugin",
src/collectors/COLLECTORS.md
+1 -1
@@ -1009,7 +1009,7 @@ If you don't see the app/service you'd like to monitor in this list:
1009
1010 - [Netapp ONTAP API](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/prometheus/integrations/netapp_ontap_api.md)
1011
1012 -- [Samba](https://github.com/netdata/netdata/blob/master/src/collectors/python.d.plugin/samba/integrations/samba.md)
1012 +- [Samba](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/samba/integrations/samba.md)
1013
1014 - [Starwind VSAN VSphere Edition](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/prometheus/integrations/starwind_vsan_vsphere_edition.md)
1015
src/go/plugin/go.d/modules/samba/README.md new
+1
@@ -0,0 +1 @@
1 +integrations/samba.md
\ No newline at end of file
src/go/plugin/go.d/modules/samba/integrations/samba.md new
+240
@@ -0,0 +1,240 @@
1 +<!--startmeta
2 +custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/modules/samba/README.md"
3 +meta_yaml: "https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/modules/samba/metadata.yaml"
4 +sidebar_label: "Samba"
5 +learn_status: "Published"
6 +learn_rel_path: "Collecting Metrics/Storage, Mount Points and Filesystems"
7 +most_popular: False
8 +message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
9 +endmeta-->
10 +
11 +# Samba
12 +
13 +
14 +<img src="https://netdata.cloud/img/samba.svg" width="150"/>
15 +
16 +
17 +Plugin: go.d.plugin
18 +Module: samba
19 +
20 +<img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
21 +
22 +## Overview
23 +
24 +This collector monitors Samba syscalls and SMB2 calls. It relies on the [`smbstatus`](https://www.samba.org/samba/docs/current/man-html/smbstatus.1.html) CLI tool but avoids directly executing the binary. Instead, it utilizes `ndsudo`, a Netdata helper specifically designed to run privileged commands securely within the Netdata environment. This approach eliminates the need to use `sudo`, improving security and potentially simplifying permission management.
25 +Executed commands:
26 +- `smbstatus -P`
27 +
28 +
29 +
30 +
31 +This collector is supported on all platforms.
32 +
33 +This collector only supports collecting metrics from a single instance of this integration.
34 +
35 +
36 +### Default Behavior
37 +
38 +#### Auto-Detection
39 +
40 +This integration doesn't support auto-detection.
41 +
42 +#### Limits
43 +
44 +The default configuration for this integration does not impose any limits on data collection.
45 +
46 +#### Performance Impact
47 +
48 +The default configuration for this integration is not expected to impose a significant performance impact on the system.
49 +
50 +
51 +## Metrics
52 +
53 +Metrics grouped by *scope*.
54 +
55 +The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
56 +
57 +
58 +
59 +### Per syscall
60 +
61 +These metrics refer to the the Syscall.
62 +
63 +Labels:
64 +
65 +| Label | Description |
66 +|:-----------|:----------------|
67 +| syscall | Syscall name |
68 +
69 +Metrics:
70 +
71 +| Metric | Dimensions | Unit |
72 +|:------|:----------|:----|
73 +| samba.syscall_calls | syscalls | calls/s |
74 +| samba.syscall_transferred_data | transferred | bytes/s |
75 +
76 +### Per smb2call
77 +
78 +These metrics refer to the the SMB2 Call.
79 +
80 +Labels:
81 +
82 +| Label | Description |
83 +|:-----------|:----------------|
84 +| smb2call | SMB2 call name |
85 +
86 +Metrics:
87 +
88 +| Metric | Dimensions | Unit |
89 +|:------|:----------|:----|
90 +| samba.smb2_call_calls | smb2 | calls/s |
91 +| samba.smb2_call_transferred_data | in, out | bytes/s |
92 +
93 +
94 +
95 +## Alerts
96 +
97 +There are no alerts configured by default for this integration.
98 +
99 +
100 +## Setup
101 +
102 +### Prerequisites
103 +
104 +#### Verifying and Enabling Profiling for SMBd
105 +
106 +1. **Check for Profiling Support**
107 +
108 + Before enabling profiling, it's important to verify if `smbd` was compiled with profiling capabilities. Run the following command as root user (using `sudo`) to check:
109 +
110 + ```bash
111 + $ sudo smbd --build-options | grep WITH_PROFILE
112 + WITH_PROFILE
113 + ```
114 +
115 + If the command outputs `WITH_PROFILE`, profiling is supported. If not, you'll need to recompile `smbd` with profiling enabled (refer to Samba documentation for specific instructions).
116 +
117 +2. **Enable Profiling**
118 +
119 + Once you've confirmed profiling support, you can enable it using one of the following methods:
120 +
121 + - **Command-Line Option**
122 + Start smbd with the `-P 1` option when invoking it directly from the command line.
123 + - **Configuration File**
124 + Modify the `smb.conf` configuration file located at `/etc/samba/smb.conf` (the path might vary slightly depending on your system). Add the following line to the `[global]` section:
125 +
126 + ```bash
127 + smbd profiling level = count
128 + ```
129 +3. **Restart the Samba service**
130 +
131 +
132 +
133 +### Configuration
134 +
135 +#### File
136 +
137 +The configuration file name for this integration is `go.d/samba.conf`.
138 +
139 +
140 +You can edit the configuration file using the `edit-config` script from the
141 +Netdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).
142 +
143 +```bash
144 +cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
145 +sudo ./edit-config go.d/samba.conf
146 +```
147 +#### Options
148 +
149 +The following options can be defined globally: update_every.
150 +
151 +
152 +<details open><summary>Config options</summary>
153 +
154 +| Name | Description | Default | Required |
155 +|:----|:-----------|:-------|:--------:|
156 +| update_every | Data collection frequency. | 10 | no |
157 +| timeout | smbstatus binary execution timeout. | 2 | no |
158 +
159 +</details>
160 +
161 +#### Examples
162 +
163 +##### Custom update_every
164 +
165 +Allows you to override the default data collection interval.
166 +
167 +<details open><summary>Config</summary>
168 +
169 +```yaml
170 +jobs:
171 + - name: samba
172 + update_every: 5 # Collect statistics every 5 seconds
173 +
174 +```
175 +</details>
176 +
177 +
178 +
179 +## Troubleshooting
180 +
181 +### Debug Mode
182 +
183 +**Important**: Debug mode is not supported for data collection jobs created via the UI using the Dyncfg feature.
184 +
185 +To troubleshoot issues with the `samba` collector, run the `go.d.plugin` with the debug option enabled. The output
186 +should give you clues as to why the collector isn't working.
187 +
188 +- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on
189 + your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
190 +
191 + ```bash
192 + cd /usr/libexec/netdata/plugins.d/
193 + ```
194 +
195 +- Switch to the `netdata` user.
196 +
197 + ```bash
198 + sudo -u netdata -s
199 + ```
200 +
201 +- Run the `go.d.plugin` to debug the collector:
202 +
203 + ```bash
204 + ./go.d.plugin -d -m samba
205 + ```
206 +
207 +### Getting Logs
208 +
209 +If you're encountering problems with the `samba` collector, follow these steps to retrieve logs and identify potential issues:
210 +
211 +- **Run the command** specific to your system (systemd, non-systemd, or Docker container).
212 +- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.
213 +
214 +#### System with systemd
215 +
216 +Use the following command to view logs generated since the last Netdata service restart:
217 +
218 +```bash
219 +journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show --value --property=InvocationID netdata)" --namespace=netdata --grep samba
220 +```
221 +
222 +#### System without systemd
223 +
224 +Locate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:
225 +
226 +```bash
227 +grep samba /var/log/netdata/collector.log
228 +```
229 +
230 +**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.
231 +
232 +#### Docker Container
233 +
234 +If your Netdata runs in a Docker container named "netdata" (replace if different), use this command:
235 +
236 +```bash
237 +docker logs netdata 2>&1 | grep samba
238 +```
239 +
240 +