diff options
author | Kristian Lyngstol <kly@kly.no> | 2016-06-04 19:36:37 +0200 |
---|---|---|
committer | Kristian Lyngstol <kly@kly.no> | 2016-06-04 19:36:37 +0200 |
commit | 546f83cc05d41aed091e8895e42f75f0295ff87d (patch) | |
tree | 66b6e651c1284b8199d7cfa8a866c383fcd2bb47 /extras/tools/lldp/dotnet.sh | |
parent | 24a5282cb63c8aab2531ae3e54c07e2c5bbebea7 (diff) |
tools: redo discovery in the form of lolwhat
what?
lol...
just figure it out for me.
Ok, so the tool isn't entirely done, but it departs from the simple
lldpdiscver.pl method that was very limited when things weren't working as
they should.
The long-term idea of lolwhat is that it should be able to do all sorts of
discovery. Right now it just takes a list of IPs and figures out how things
are connected by SNMP. It uses LLDP info from SNMP, but it does not
_currently_ traverse new hosts based on what it finds.
Diffstat (limited to 'extras/tools/lldp/dotnet.sh')
-rwxr-xr-x | extras/tools/lldp/dotnet.sh | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/extras/tools/lldp/dotnet.sh b/extras/tools/lldp/dotnet.sh index 5c1b369..40e5024 100755 --- a/extras/tools/lldp/dotnet.sh +++ b/extras/tools/lldp/dotnet.sh @@ -1,9 +1,8 @@ #!/usr/bin/env bash - -DATE="$(date +%s)" -if [ -z "$1" ] || [ -z "$2" ]; then - echo "Usage: $0 <ip> <community>" - exit 1; -fi -./lldpdiscover.pl $1 $2 | ./draw-neighbors.pl | dot -Tpng > dotnet-${DATE}.png -echo File name: dotnet-${DATE}.png +set -xe +DATE="$(date --iso-8601=second | sed s/:/./g)" +JSON=lolwhat-${DATE}.json +./lolwhat.pl $* > ${JSON} +./draw-neighbors.pl < ${JSON} | dot -Tpng > lolwhat-${DATE}.png +./draw-neighbors.pl full < ${JSON} | dot -Tpng > lolwhat-${DATE}-full.png +echo File name: lolwhat-${DATE}*png |