Alright! I hadn't considered go but as long
as it compiles to the
processor on the routers we use then that does simplify things quite a
bit :)
On Mon, Jan 23, 2017 at 6:19 PM, Jehan Tremback
<jehan.tremback(a)gmail.com <mailto:jehan.tremback@gmail.com>> wrote:
Oh yea, here's what it outputs right now:
{
"Interfaces":{
"eth0":{
"Neighbors":{
"10.0.0.2":{
"Routes":{
"10.0.0.2":{
"Protocol":"babel",
"Interface":"eth0",
"Neighbor":"10.0.0.2",
"Destination":"10.0.0.2"
},
"10.0.0.6":{
"Protocol":"babel",
"Interface":"eth0",
"Neighbor":"10.0.0.2",
"Destination":"10.0.0.6"
}
}
},
"10.0.0.3":{
"Routes":{
"10.0.0.1":{
"Protocol":"babel",
"Interface":"eth0",
"Neighbor":"10.0.0.3",
"Destination":"10.0.0.1"
},
"10.0.0.3":{
"Protocol":"babel",
"Interface":"eth0",
"Neighbor":"10.0.0.3",
"Destination":"10.0.0.3"
},
"10.0.1.0/24 <http://10.0.1.0/24>":{
"Protocol":"babel",
"Interface":"eth0",
"Neighbor":"10.0.0.3",
"Destination":"10.0.1.0/24
<http://10.0.1.0/24
"
},
"10.0.1.2":{
"Protocol":"babel",
"Interface":"eth0",
"Neighbor":"10.0.0.3",
"Destination":"10.0.1.2"
},
"default":{
"Protocol":"babel",
"Interface":"eth0",
"Neighbor":"10.0.0.3",
"Destination":"default"
}
}
},
"10.0.0.5":{
"Routes":{
"10.0.0.5":{
"Protocol":"babel",
"Interface":"eth0",
"Neighbor":"10.0.0.5",
"Destination":"10.0.0.5"
}
}
}
}
}
}
}
On Mon, Jan 23, 2017 at 6:15 PM, Jehan Tremback
<jehan.tremback(a)gmail.com <mailto:jehan.tremback@gmail.com>> wrote:
As part of the new node dashboards, we need to gather info from
the nodes and pass it to the frontend dashboard app. There were
some shell scripts but they weren't very complete and I couldn't
find them yesterday, so I sat down to learn awk. Awk is very
graceful for parsing data out of text, but I found it cumbersome
generating json from the data in its memory.
SO I just did it with Go. Go compiles to machine code that will
run easily on the routers (unlike js). Also, it will be good for
doing other things to build up the data, like pinging endpoints
etc. Here is the repo:
https://github.com/sudomesh/node-info-go
<https://github.com/sudomesh/node-info-go>
I will be at the meeting tomorrow to talk about how to harvest
the rest of the data we need to build a full dashboard.
-Jehan
_______________________________________________
mesh mailing list
mesh(a)lists.sudoroom.org <mailto:mesh@lists.sudoroom.org>
https://sudoroom.org/lists/listinfo/mesh
<https://sudoroom.org/lists/listinfo/mesh>
_______________________________________________
mesh mailing list
mesh(a)lists.sudoroom.org
https://sudoroom.org/lists/listinfo/mesh