<commit_before>those files are used as input to the snmp-exporter generator (https://github.com/prometheus/snmp_exporter/tree/master/generator) to generate the corresponding _snmp-exporter-<module-name>.yaml.tpl files - for example:

cp asr-generator.yaml generator.yml
<path-to-generator>/generator generate
# this prefixes the metric names with snmp_asr_
perl -p -e 's,-\ name:\ ,-\ name:\ snmp_asr_,g' snmp.yml > ../../templates/_snmp-exporter-asr.yaml.tpl

for this to work the following section has to exist in the secrets file (for snmp v3 auth):

snmp_exporter:
  enabled: True
  docker_repo: prom/snmp-exporter
  maia_snmp_config:
    - name: asr
      default:
      version: 3
      username: asruser
      password: <PASSWORD>
      auth_protocol: MD5
      priv_protocol: DES
      security_level: authPriv
      priv_password: <PASSWORD>
      target: 10.11.12.13
      prefix: snmp_asr_

or for snmp v2 auth (v1 is the same with version: 1):

...
    - name: asr
      default:
      version: 2
      community: asrcomm
      target: 10.11.12.13
      prefix: snmp_asr_

how to create the xyz-generator.yaml file with snmpwalk?

create a ~/.snmp/snmp.conf file for convenience (otherwise you'll need more cmdline options for the auth):

snmp v3 auth:

defSecurityName asruser
defSecurityLevel authPriv
defAuthType MD5
defPrivType DES
defAuthPassphrase <PASSWORD>
defPrivPassphrase <PASSWORD><commit_msg>adjust doc to latest state<commit_after>those files are used as input to the snmp-exporter generator (https://github.com/prometheus/snmp_exporter/tree/master/generator) to generate the corresponding _snmp-exporter-<module-name>.yaml.tpl files - for example:

cp asr-generator.yaml generator.yml
<path-to-generator>/generator generate
# this prefixes the metric names with snmp_asr_
perl -p -e 's,-\ name:\ ,-\ name:\ snmp_asr_,g' snmp.yml > ../../templates/_snmp-exporter-asr.yaml.tpl

for this to work the following section has to exist in the secrets file (for snmp v3 auth):

snmp_exporter:
  enabled: True
  docker_repo: prom/snmp-exporter
  maia_snmp_config:
    - name: asr
      default:
      version: 3
      username: asruser
      password: <PASSWORD>
      auth_protocol: MD5
      priv_protocol: DES
      security_level: authPriv
      priv_password: <PASSWORD>
      target: 10.11.12.13
      configname: asr

or for snmp v2 auth (v1 is the same with version: 1):

...
    - name: asr
      default:
      version: 2
      community: asrcomm
      target: 10.11.12.13
      configname: asr

how to create the xyz-generator.yaml file with snmpwalk?

create a ~/.snmp/snmp.conf file for convenience (otherwise you'll need more cmdline options for the auth):

snmp v3 auth:

defSecurityName asruser
defSecurityLevel authPriv
defAuthType MD5
defPrivType DES
defAuthPassphrase <PASSWORD>
defPrivPassphrase as<PASSWORD>
{'fraction_non_alphanumeric': 0.08646748681898067, 'fraction_numerical': 0.01757469244288225, 'mean_word_length': 3.3450381679389314, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '412143', 'n_tokens_mistral': 965, 'n_tokens_neox': 922, 'n_words': 295}