Page 1 of 1
SNMP Monitoring from Multiple Collectors
Posted: Mon Dec 11, 2023 1:42 pm
by PrimeYeti
I have a device that we monitor that another company also wants to collect information from via SNMP. My immediate thought was to create another Community for the other company and have both active but ofcourse this isn't possible.
Is the only way to do it on a Mikrotik to have both agents use the same Community credentials and my agent to just have the one community for both companies? I'm not sure if I have misunderstood something but this seems like a bit of an oversight and quite a simple one at that, which is what makes me think it isn't an oversight and this is how it should work. Could someone please clarify?
Re: SNMP Monitoring from Multiple Collectors
Posted: Mon Dec 11, 2023 2:47 pm
by blingblouw2
Can't you just add a new community?
/snmp community
set [ find default=yes ] read-access=no
add addresses=1.1.1.1/32 name=COMPANY_1
add addresses=2.2.2.2/32 name=COMPANY_2
Re: SNMP Monitoring from Multiple Collectors
Posted: Mon Dec 11, 2023 4:04 pm
by PrimeYeti
Yeah you can create as many communities as you want but when actually putting them in use under IP > SNMP > Trap Community you can only have 1 active at a time.
Re: SNMP Monitoring from Multiple Collectors
Posted: Tue Dec 12, 2023 5:36 am
by LdB
If they give you multiple trap communities then technically you need multiple source IPs and interfaces so it probably gets more complex than that.
Re: SNMP Monitoring from Multiple Collectors
Posted: Tue Dec 12, 2023 11:23 am
by PrimeYeti
You can add multiple source IPs though this is sort of what confuses me. So from my understanding if I wanted to have two separate collectors I would need them to both have the exact same setup which seems strange and somewhat insecure.
Re: SNMP Monitoring from Multiple Collectors
Posted: Tue Dec 12, 2023 11:33 am
by pe1chl
Probably most users of SNMP use polling rather than traps...
Maybe there exists some software that can work as a trap relay/multiplier? (running on another system or in a container)
Re: SNMP Monitoring from Multiple Collectors
Posted: Tue Dec 12, 2023 2:55 pm
by PrimeYeti
Say if I wasn't using traps in that case, how would I set it up so that both collectors can use V3? Because as far as I can tell you can only set the SNMP version under Trap Version. And in doing so you can only define authentication and encryption with a Trap Community.
Re: SNMP Monitoring from Multiple Collectors
Posted: Tue Dec 12, 2023 3:33 pm
by blingblouw2
you dont set snmp version under trap. Trap is for traps. You make communities, you just create multiple snmpv3 communities, each one will work
Re: SNMP Monitoring from Multiple Collectors
Posted: Tue Dec 12, 2023 4:12 pm
by PrimeYeti
So with Mikrotik will all communities be v1 or v2 unless the Auth and Encryption details are entered?
Further to this, that makes more sense, but still how can you have multiple active Communities if you have multiple collectors? And if you can't what would be the best way of achieving this?
Re: SNMP Monitoring from Multiple Collectors [SOLVED]
Posted: Wed Dec 13, 2023 12:55 pm
by blingblouw2
Just add the communities you want, they will all be "usable"
/snmp community
set [ find default=yes ] disabled=yes
add addresses=::/0 authentication-password=password authentication-protocol=SHA1 encryption-password=PASSWORD_1 encryption-protocol=AES name=COMPANY_2_V3 security=authorized
add addresses=::/0 authentication-password=password authentication-protocol=SHA1 encryption-password=PASSWORD_2 encryption-protocol=AES name=COMPANY_1_V3 security=authorized
add addresses=::/0 name=SOME_V2_COMMUNITY
add addresses=::/0 name=ANOTHER_V2_COMMUNITY
/snmp
set contact=some@email.com enabled=yes location=MY_LOCATION
Re: SNMP Monitoring from Multiple Collectors
Posted: Fri Dec 22, 2023 6:28 pm
by PrimeYeti
Managed to work this out but I appreciate the confirmation! I think my confusion came from the fact that you can have as many active communities as you want but you can only have a single
trap community active. That still seems strange to me but I've got what I need. Thanks!