Using nornir/napalm to populate elasticsearch

I am assigned to a project that will replace the snmp based monitoring system. We opted to choose the Elastic stack as the replacement.

I’m posting this because someone might already done this or perhaps there could be a better route to take to achieve this goal.

What I have in mind is to use nornir/napalm to get the desired data in json since elasticsearch supports ingesting json data.

getting information can be done with:

r = task.run(task=napalm_get,getters=['facts','interfaces_counters','interfaces'])

sample output(omitted):

{ 'facts': { 'fqdn': 'junos-vsrx',
             'hostname': 'junos-vsrx',
             'interface_list': [ 'ge-0/0/0',
                                 'gr-0/0/0',
                                 'ip-0/0/0',
                                 'lsq-0/0/0',
                                 'lt-0/0/0',
                                 'mt-0/0/0',
                                 'sp-0/0/0',
                                 'ge-0/0/1',
                                 'dsc',
                                 'fti0',
                                 'fxp0',
                                 'gre',
                                 'ipip',
                                 'irb',
                                 'lo0',
                                 'lsi',
                                 'mtun',
                                 'pimd',
                                 'pime',
                                 'pp0',
                                 'ppd0',
                                 'ppe0',
                                 'st0',
                                 'tap',
                                 'vlan'],
             'model': 'VSRX',
             'os_version': '19.2R1.8',
             'serial_number': '0b99de0bc009',
             'uptime': 216444,
             'vendor': 'Juniper'}

However, i realized that its possible to standardize the structure to Yang model before shipping it to elasticsearch. I’m new to yang and just read yangify documentation but not sure how to integrate it the output i’m getting from nornir/napalm. Some help/recommendation on how to connect the dots would be much appreciated.