-
netdisco:db
-
IMAGE postgres:9.6.6-alpine
-
data volume
-
-
netdisco:base
-
IMAGE debian:stable-slim
-
-
netdisco:backend
-
IMAGE netdisco:base
-
config volume
-
MIBs
-
-
netdisco:web
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # find files | |
| g grep -cP "% [a-z][a-z._\(\/\)']+ %" share/views/ | |
| # vim command | |
| .,$s:\(% \l[a-z._('/)]\+\) %:\1 | hmtl_entity %:cgI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Device | |
| GET /device??q={search}&{params} # Lists ALL devices OR filters by search and/or params, if present | |
| # params: vendor, dns, name, location, ip, description | |
| # these can hopefully be autogenerated/parsed | |
| POST /device # Creates a device. | |
| GET /device/{ip} # Gets Device Generic Info | |
| GET /device/{ip}/{query} | |
| # query is one of: | |
| # Details |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Search | |
| Device | |
| Port | |
| VLAN | |
| Node | |
| Device | |
| Details | |
| Ports | |
| Modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # the default is hourly | |
| schedule: | |
| macwalk: | |
| when: '20 8,14,21 * * *' | |
| arpwalk: | |
| when: '50 8,14,21 * * *' | |
| # the default is 50 minutes | |
| jobs_stale_after: '6 hours' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| m/^\D{2}/; | |
| m/[^a-z]+$/i; | |
| s/^(\D{2}).+[a-z]([^a-z]+)$/$1$2/; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd submodule_name | |
| git checkout master && git pull | |
| cd .. | |
| git add submodule_name | |
| git commit -m "updating submodule to latest" | |
| (from https://github.com/tj/git-extras/pull/80#issuecomment-3992323) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '2.3' | |
| services: | |
| netdisco-postgresql: | |
| image: netdisco/netdisco:latest-postgresql | |
| volumes: | |
| - "./netdisco/pgdata:/var/lib/postgresql/data" | |
| # build: | |
| # context: netdisco-postgresql | |
| # netdisco-base: | |
| # image: netdisco/netdisco:latest-base |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # stitch together STRINGs that are broken over multiple lines | |
| perl -0777 -pe 's/\n(?!\.1\.3\.6)//g' | |
| # put quotes around STRINGs where they are missing | |
| perl -pe 's/= STRING: (?!")(.*)/= STRING: "\1"/g' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -s https://api.github.com/repos/netdisco/netdisco-mibs/tags | \ | |
| jq '.[]|.tarball_url|select(test("tarball/\\d+\\.\\d+$"))' | \ | |
| sort -rg | head -n1 | xargs -n1 curl -L | tar --strip-components=1 -zxf - | |
| curl -s https://api.github.com/repos/netdisco/netdisco/tags | \ | |
| jq '.[]|.name|select(test("^\\d+\\.\\d+$"))|"git://github.com/netdisco/netdisco.git@"+.' | \ | |
| sort -rg | head -n1 | xargs -n1 cpanm --notest --local-lib $NETDISCO_HOME/perl5 |