We currently use gnmic on our netflow* VMs to collect statistics from network devices using gnmic. The gnmic config on each VM is built by puppet, and includes an entry for each device under profile::netbox::data::network_devices for the local site. The code that builds this list is in modules/profile/manifests/gnmi_telemetry.pp:
Hash[String[3], Netbox::Device::Network] $infra_devices = lookup('profile::netbox::data::network_devices'),$targets = Hash($infra_devices.filter |$device, $attributes| {
$attributes['role'] in ['asw', 'cr', 'cloudsw'] and $attributes['site'] == $::site
}.values.map |$device| {
["${device['primary_fqdn']}:${ports[$device['manufacturer']]}",
{'subscriptions' => $targets_sub[$device['manufacturer']]}]
})That works well for the most part, however we have two "network POPs", which only have a single router on site, and no other infra thus no netflow VM. As a result we don't collect stats for either of those two routers from any of the existing netflow VMs.
So we need to modify the above code so that we can somehow manually add devices from specific non-local sites to certain VMs. For instance we should collect the eqord (Chicago) stats on netflow1002, and the eqdfw ones on netflow2003. Hopefully this won't be too easy though I'm not sure on the simplest way to structure the data/pupeptcode to do it.
