Also - another question which is unclear from the documentation: When using the generator.yml file to generate snmp.yml, are the values "password" and "priv_password" entered as plaintext in the generator.yml config file or do they need to be encrypted already with their given "auth_protocol" and "priv_protocol"? I had assumed that you give the passwords in plaintext and the generator would use the given algorithm to encrypt them.
On Monday, July 19, 2021 at 4:58:11 PM UTC-7 Nolan Crooks wrote: > Also - if its noteworthy, I am using a custom MIB file, for Observium: > https://mibs.observium.org/mib/PowerNet-MIB/ > > On Monday, July 19, 2021 at 4:53:37 PM UTC-7 Nolan Crooks wrote: > >> Hi there, >> >> I'm having trouble getting the snmp_exporter >> <https://github.com/prometheus/snmp_exporter> working with my Prometheus >> instances. I have successfully built and am running the exporter across my >> instances, and have configured it as follows using the generator >> <https://github.com/prometheus/snmp_exporter/tree/main/generator> tool >> to scrape the rPDU2DeviceStatusPower metric: >> >> modules: >> main: # The module name. You can have as many modules as you want. >> walk: # List of OIDs to walk. Can also be SNMP object names or >> specific instances. >> - rPDU2DeviceStatusPower >> version: 3 # SNMP version to use. Defaults to 2. >> # 1 will use GETNEXT, 2 and 3 use GETBULK. >> max_repetitions: 25 # How many objects to request with GET/GETBULK, >> defaults to 25. >> # May need to be reduced for buggy devices. >> retries: 3 # How many times to retry a failed request, defaults to >> 3. >> timeout: 5s # Timeout for each individual SNMP request, defaults to >> 5s. >> >> auth: >> # Community string is used with SNMP v1 and v2. Defaults to >> "public". >> community: public >> >> # v3 has different and more complex settings. >> # Which are required depends on the security_level. >> # The equivalent options on NetSNMP commands like snmpbulkwalk >> # and snmpget are also listed. See snmpcmd(1). >> username: xxx # Required, no default. -u option to NetSNMP. >> security_level: xxx # Defaults to noAuthNoPriv. -l option to >> NetSNMP. >> # Can be noAuthNoPriv, authNoPriv or >> authPriv. >> password: xxx # Has no default. Also known as authKey, -A option >> to NetSNMP. >> # Required if security_level is authNoPriv or >> authPriv. >> auth_protocol: xxx # MD5, SHA, SHA224, SHA256, SHA384, or SHA512. >> Defaults to MD5. -a option to NetSNMP. >> # Used if security_level is authNoPriv or >> authPriv. >> priv_protocol: xxx # DES, AES, AES192, or AES256. Defaults to DES. >> -x option to NetSNMP. >> # Used if security_level is authPriv. >> priv_password: xxx # Has no default. Also known as privKey, -X >> option to NetSNMP. >> # Required if security_level is authPriv. >> context_name: xxx # Has no default. -n option to NetSNMP. >> # Required if context is configured on the >> device. >> >> >> With this configuration, the scrape is always successful, however the >> only metrics that are returned are as follows: >> >> # HELP snmp_scrape_duration_seconds Total SNMP time scrape took (walk and >> processing). # TYPE snmp_scrape_duration_seconds gauge >> snmp_scrape_duration_seconds 16.188805557 # HELP snmp_scrape_pdus_returned >> PDUs returned from walk. # TYPE snmp_scrape_pdus_returned gauge >> snmp_scrape_pdus_returned 0 # HELP snmp_scrape_walk_duration_seconds Time >> SNMP walk/bulkwalk took. # TYPE snmp_scrape_walk_duration_seconds gauge >> snmp_scrape_walk_duration_seconds 16.18876831 >> >> Whereas I'm expecting to see more information here. No errors in debug >> output of the exporter, simply: >> >> module=main target=xxxx msg="Walking subtree" >> oid=1.3.6.1.4.1.318.1.1.26.4.3.1.5 >> module=main target=xxxx msg="Walk of subtree completed" >> oid=1.3.6.1.4.1.318.1.1.26.4.3.1.5 duration_seconds=17.972985349s >> module=main target=xxxx msg="Finished scrape" >> duration_seconds=17.979233908 >> >> I'm wondering if I'm missing a step or something obvious here. If anyone >> could provide any tips I would be greatly appreciative. I'm new to SNMP and >> related concepts. I've also tried with a few other OIDs and Object Names to >> no avail. >> > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/d7ba4b48-a535-4069-93be-7352203178aan%40googlegroups.com.

