I think you might be on to something, Brian.  I looked in my snmp.yml file 
and found no reference at all to the community string. I tried adding 

community: 
  - unifi 

to the top of the file immediately following ubiquiti_unifi: but when 
restarting the snmp service, it fails stating msg="Error parsing config 
file" err="yaml: unmarshal errors:\n  line 2: field community not found in 
type config.plain".

On Saturday, June 25, 2022 at 11:54:37 AM UTC-4 Brian Candler wrote:

> And if that's not it, it's probably that the community string is wrong.  
> The supplied snmp.yml uses "public" as the community string; if you need 
> something else, you need to modify snmp.yml or generate a completely new 
> one from generator.yml
>
> On Saturday, 25 June 2022 at 15:43:02 UTC+1 [email protected] wrote:
>
>> Your target IPs don't match.
>>
>> On Sat, Jun 25, 2022 at 4:41 PM 'John Fox' via Prometheus Users <
>> [email protected]> wrote:
>>
>>> Hello all!
>>>
>>> I've been pulling my hair out trying to get snmp_exporter to crawl my 
>>> Unifi devices. The error that it comes back with is:
>>>
>>> An error has occurred while serving metrics: error collecting metric 
>>> Desc{fqName: "snmp_error", help: "Error scraping target", constLabels: {}, 
>>> variableLabels: []}: error getting target 192.168.8.1: request timeout 
>>> (after 3 retries)
>>>
>>> Yet I can snmpwalk without issue - for example:  snmpwalk -v 2c -c 
>>> unifi -On 192.168.8.17 1.3.6.1.2.1.1.3.0 - returning:
>>>
>>> .1.3.6.1.2.1.1.3.0 = Timeticks: (9931546) 1 day, 3:35:15.46
>>>
>>> I'm not really sure what to make of this issue or how to solve it. When 
>>> I see a timeout message, I thought to increase the scrape and timeout 
>>> parameters to 5m, however that just results in an Error 500 message in 
>>> Prometheus after about 2 minutes.
>>>
>>> Wondering what I'm doing wrong here.
>>>
>>> -- 
>>> 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/9d0dc146-cd37-4a7c-8051-e92ba3d47530n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/prometheus-users/9d0dc146-cd37-4a7c-8051-e92ba3d47530n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
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/74787bbe-bafb-4dc9-b22b-b3da0bac1905n%40googlegroups.com.

Reply via email to