HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //lib/netdata/conf.d/go.d/sd/snmp.conf
## ===================================================================
## WARNING: SNMP DISCOVERY IS DISABLED BY DEFAULT
## To enable, change "disabled: yes" to "disabled: no" below
## AND configure proper credentials and networks
## ===================================================================

disabled: yes

name: 'snmp'

discover:
  - discoverer: snmp
    snmp:
      ## how often to scan the networks for devices (default: 30m)
      ## Set to 0 to perform a single discovery scan and exit
      #rescan_interval: "30m"

      ## the maximum time to wait for SNMP device responses (default: 1s)
      #timeout: "1s"

      ## How long to trust cached discovery results before requiring a new probe (default: 12h)
      ## Set to 0 to never expire cached results (devices will never be re-probed once discovered)
      #device_cache_ttl: "12h"

      ## how many IPs to scan concurrently within each subnet (default: 32)
      #parallel_scans_per_network: 32

      ## ==========================================================
      ## IMPORTANT: YOU MUST CONFIGURE YOUR OWN CREDENTIALS BELOW
      ## The example credentials will not work in most environments
      ## ==========================================================
      credentials:
        - name: "public-v2c"
          version: "2"
          community: "public"

        - name: "secure-v3"
          version: "3"
          ## one of: "noAuthNoPriv", "authNoPriv", or "authPriv"
          security_level: "authPriv"
          username: "admin"
          ##  one of: "md5", "sha", "sha224", "sha256", "sha384", "sha512"
          auth_protocol: "sha"
          auth_password: "secret123"
          ## one of: "des", "aes", "aes192", "aes256", "aes192C", "aes256C"
          priv_protocol: "aes"
          priv_password: "encrypt123"

      ## ========================================================
      ## IMPORTANT: YOU MUST CONFIGURE YOUR OWN NETWORKS BELOW
      ## By default, no networks will be scanned until configured
      ## Maximum size is limited to 512 IPs per subnet (/23 CIDR)
      ## ========================================================
      networks:
        ## Subnet is the IP range to scan, supporting various formats:
        ## https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/pkg/iprange#supported-formats
        - subnet: "192.168.1.0/24"
          ## Credential is the name of a credential from the Credentials list
          credential: "public-v2c"

classify:
  - name: "SNMP Devices"
    selector: "*"
    tags: "snmp"
    match:
      - tags: "snmp"
        expr: '{{ true }}'

compose:
  - name: "SNMP Devices"
    selector: "snmp"
    config:
      - selector: "snmp"
        template: |
          module: snmp
          update_every: 5
          {{- if .SysInfo.Name }}
          name: {{ .SysInfo.Name }}-ip-{{ .IPAddress }}
          {{- else }}
          name: ip-{{ .IPAddress }}
          {{- end }}
          hostname: {{ .IPAddress }}
          options:
            version: {{ .Credential.Version }}
          {{- if eq .Credential.Version "1" "2" }}
          community: {{ .Credential.Community }}
          {{- else }}
          user:
            name: {{ .Credential.UserName }}
            level: {{ .Credential.SecurityLevel }}
            auth_proto: {{ .Credential.AuthProtocol }}
            auth_key: {{ .Credential.AuthPassphrase }}
            priv_proto: {{ .Credential.PrivacyProtocol }}
            priv_key: {{ .Credential.PrivacyPassphrase }}
          {{- end }}