metadata.yaml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. plugin_name: python.d.plugin
  2. modules:
  3. - meta:
  4. plugin_name: python.d.plugin
  5. module_name: samba
  6. monitored_instance:
  7. name: Samba
  8. link: https://www.samba.org/samba/
  9. categories:
  10. - data-collection.storage-mount-points-and-filesystems
  11. icon_filename: "samba.svg"
  12. related_resources:
  13. integrations:
  14. list: []
  15. info_provided_to_referring_integrations:
  16. description: ""
  17. keywords:
  18. - samba
  19. - file sharing
  20. most_popular: false
  21. overview:
  22. data_collection:
  23. metrics_description: "This collector monitors the performance metrics of Samba file sharing."
  24. method_description: |
  25. It is using the `smbstatus` command-line tool.
  26. Executed commands:
  27. - `sudo -n smbstatus -P`
  28. supported_platforms:
  29. include: []
  30. exclude: []
  31. multi_instance: false
  32. additional_permissions:
  33. description: |
  34. `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.
  35. default_behavior:
  36. auto_detection:
  37. description: "After all the permissions are satisfied, the `smbstatus -P` binary is executed."
  38. limits:
  39. description: ""
  40. performance_impact:
  41. description: ""
  42. setup:
  43. prerequisites:
  44. list:
  45. - title: Permissions and programs
  46. description: |
  47. To run the collector you need:
  48. - `smbstatus` program
  49. - `sudo` program
  50. - `smbd` must be compiled with profiling enabled
  51. - `smbd` must be started either with the `-P 1` option or inside `smb.conf` using `smbd profiling level`
  52. The 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.
  53. - add to your `/etc/sudoers` file:
  54. `which smbstatus` shows the full path to the binary.
  55. ```bash
  56. netdata ALL=(root) NOPASSWD: /path/to/smbstatus
  57. ```
  58. - Reset Netdata's systemd unit [CapabilityBoundingSet](https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Capabilities) (Linux distributions with systemd)
  59. 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`.
  60. As the `root` user, do the following:
  61. ```cmd
  62. mkdir /etc/systemd/system/netdata.service.d
  63. echo -e '[Service]\nCapabilityBoundingSet=~' | tee /etc/systemd/system/netdata.service.d/unset-capability-bounding-set.conf
  64. systemctl daemon-reload
  65. systemctl restart netdata.service
  66. ```
  67. configuration:
  68. file:
  69. name: python.d/samba.conf
  70. options:
  71. description: |
  72. There are 2 sections:
  73. * Global variables
  74. * One or more JOBS that can define multiple different instances to monitor.
  75. The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values.
  76. Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition.
  77. Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.
  78. folding:
  79. title: "Config options"
  80. enabled: true
  81. list:
  82. - name: update_every
  83. description: Sets the default data collection frequency.
  84. default_value: 5
  85. required: false
  86. - name: priority
  87. description: Controls the order of charts at the netdata dashboard.
  88. default_value: 60000
  89. required: false
  90. - name: autodetection_retry
  91. description: Sets the job re-check interval in seconds.
  92. default_value: 0
  93. required: false
  94. - name: penalty
  95. description: Indicates whether to apply penalty to update_every in case of failures.
  96. default_value: yes
  97. required: false
  98. examples:
  99. folding:
  100. enabled: true
  101. title: "Config"
  102. list:
  103. - name: Basic
  104. description: A basic example configuration.
  105. config: |
  106. my_job_name:
  107. name: my_name
  108. update_every: 1
  109. troubleshooting:
  110. problems:
  111. list: []
  112. alerts: []
  113. metrics:
  114. folding:
  115. title: Metrics
  116. enabled: false
  117. description: ""
  118. availability: []
  119. scopes:
  120. - name: global
  121. description: "These metrics refer to the entire monitored application."
  122. labels: []
  123. metrics:
  124. - name: syscall.rw
  125. description: R/Ws
  126. unit: "KiB/s"
  127. chart_type: area
  128. dimensions:
  129. - name: sendfile
  130. - name: recvfile
  131. - name: smb2.rw
  132. description: R/Ws
  133. unit: "KiB/s"
  134. chart_type: area
  135. dimensions:
  136. - name: readout
  137. - name: writein
  138. - name: readin
  139. - name: writeout
  140. - name: smb2.create_close
  141. description: Create/Close
  142. unit: "operations/s"
  143. chart_type: line
  144. dimensions:
  145. - name: create
  146. - name: close
  147. - name: smb2.get_set_info
  148. description: Info
  149. unit: "operations/s"
  150. chart_type: line
  151. dimensions:
  152. - name: getinfo
  153. - name: setinfo
  154. - name: smb2.find
  155. description: Find
  156. unit: "operations/s"
  157. chart_type: line
  158. dimensions:
  159. - name: find
  160. - name: smb2.notify
  161. description: Notify
  162. unit: "operations/s"
  163. chart_type: line
  164. dimensions:
  165. - name: notify
  166. - name: smb2.sm_counters
  167. description: Lesser Ops
  168. unit: "count"
  169. chart_type: stacked
  170. dimensions:
  171. - name: tcon
  172. - name: negprot
  173. - name: tdis
  174. - name: cancel
  175. - name: logoff
  176. - name: flush
  177. - name: lock
  178. - name: keepalive
  179. - name: break
  180. - name: sessetup