plugin_name: go.d.plugin
modules:
  - meta:
      id: collector-go.d.plugin-rspamd
      plugin_name: go.d.plugin
      module_name: rspamd
      monitored_instance:
        name: Rspamd
        link: https://rspamd.com/
        categories:
          - data-collection.security-systems
        icon_filename: globe.svg
      related_resources:
        integrations:
          list:
            - plugin_name: go.d.plugin
              module_name: httpcheck
            - plugin_name: apps.plugin
              module_name: apps
      alternative_monitored_instances: []
      info_provided_to_referring_integrations:
        description: ""
      keywords:
        - spam
        - rspamd
        - email
      most_popular: false
    overview:
      data_collection:
        metrics_description: |
          This collector monitors the activity and performance of Rspamd servers. It gathers various metrics including scanned emails, learned messages, spam/ham counts, and actions taken on emails (reject, rewrite, etc.).
        method_description: |
          It retrieves statistics from Rspamd's [built-in web server](https://rspamd.com/doc/workers/controller.html) by making HTTP requests to the `/stat` endpoint.
      default_behavior:
        auto_detection:
          description: |
            By default, it detects Rspamd instances running on localhost that are listening on port 11334.
        limits:
          description: ""
        performance_impact:
          description: ""
      additional_permissions:
        description: ""
      multi_instance: true
      supported_platforms:
        include: []
        exclude: []
    setup:
      prerequisites:
        list: []
      configuration:
        file:
          name: go.d/rspamd.conf
        options:
          description: |
            The following options can be defined globally: update_every, autodetection_retry.
          folding:
            title: Config options
            enabled: true
          list:
            - name: update_every
              description: Data collection frequency.
              default_value: 1
              required: false
            - name: autodetection_retry
              description: Recheck interval in seconds. Zero means no recheck will be scheduled.
              default_value: 0
              required: false
            - name: url
              description: Server URL.
              default_value: http://127.0.0.1:11334
              required: true
            - name: timeout
              description: HTTP request timeout.
              default_value: 1
              required: false
            - name: username
              description: Username for basic HTTP authentication.
              default_value: ""
              required: false
            - name: password
              description: Password for basic HTTP authentication.
              default_value: ""
              required: false
            - name: proxy_url
              description: Proxy URL.
              default_value: ""
              required: false
            - name: proxy_username
              description: Username for proxy basic HTTP authentication.
              default_value: ""
              required: false
            - name: proxy_password
              description: Password for proxy basic HTTP authentication.
              default_value: ""
              required: false
            - name: method
              description: HTTP request method.
              default_value: GET
              required: false
            - name: body
              description: HTTP request body.
              default_value: ""
              required: false
            - name: headers
              description: HTTP request headers.
              default_value: ""
              required: false
            - name: not_follow_redirects
              description: Redirect handling policy. Controls whether the client follows redirects.
              default_value: false
              required: false
            - name: tls_skip_verify
              description: Server certificate chain and hostname validation policy. Controls whether the client performs this check.
              default_value: false
              required: false
            - name: tls_ca
              description: Certification authority that the client uses when verifying the server's certificates.
              default_value: ""
              required: false
            - name: tls_cert
              description: Client TLS certificate.
              default_value: ""
              required: false
            - name: tls_key
              description: Client TLS key.
              default_value: ""
              required: false
        examples:
          folding:
            title: Config
            enabled: true
          list:
            - name: Basic
              description: A basic example configuration.
              folding:
                enabled: false
              config: |
                jobs:
                  - name: local
                    url: http://127.0.0.1:11334
            - name: HTTP authentication
              description: Basic HTTP authentication.
              config: |
                jobs:
                  - name: local
                    url: http://127.0.0.1:11334
                    username: username
                    password: password
            - name: Multi-instance
              description: |
                > **Note**: When you define multiple jobs, their names must be unique.
                
                Collecting metrics from local and remote instances.
              config: |
                jobs:
                  - name: local
                    url: http://127.0.0.1:11334
                
                  - name: remote
                    url: http://192.0.2.1:11334
    troubleshooting:
      problems:
        list: []
    alerts: []
    metrics:
      folding:
        title: Metrics
        enabled: false
      description: ""
      availability: []
      scopes:
        - name: global
          description: These metrics refer to the entire monitored application.
          labels: []
          metrics:
            - name: rspamd.classifications
              description: Classifications
              unit: messages/s
              chart_type: stacked
              dimensions:
                - name: ham
                - name: spam
            - name: rspamd.actions
              description: Actions
              unit: messages/s
              chart_type: stacked
              dimensions:
                - name: reject
                - name: soft_reject
                - name: rewrite_subject
                - name: add_header
                - name: greylist
                - name: custom
                - name: discard
                - name: quarantine
                - name: no_action
            - name: rspamd.scans
              description: Scanned messages
              unit: messages/s
              chart_type: line
              dimensions:
                - name: scanned
            - name: rspamd.learns
              description: Learned messages
              unit: messages/s
              chart_type: line
              dimensions:
                - name: learned
            - name: rspamd.connections
              description: Connections
              unit: connections/s
              chart_type: line
              dimensions:
                - name: connections
            - name: rspamd.control_connections
              description: Control connections
              unit: connections/s
              chart_type: line
              dimensions:
                - name: control_connections
