collector.dn42 customisations
This commit is contained in:
parent
f3699a3b61
commit
7bf648a932
34
lg.cfg
34
lg.cfg
@ -1,42 +1,32 @@
|
|||||||
|
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
LOG_FILE="/var/log/lg.log"
|
LOG_FILE="/var/log/glass/glass.log"
|
||||||
LOG_LEVEL="WARNING"
|
LOG_LEVEL="WARNING"
|
||||||
|
UNIFIED_DAEMON = True
|
||||||
|
|
||||||
DOMAIN = "tetaneutral.net"
|
DOMAIN = "collector.dn42"
|
||||||
|
|
||||||
BIND_IP = "0.0.0.0"
|
BIND_IP = "::"
|
||||||
BIND_PORT = 5000
|
BIND_PORT = 5001
|
||||||
|
|
||||||
PROXY = {
|
PROXY = {
|
||||||
"gw": "gw.some.network:5000",
|
"grc": "localhost:5000"
|
||||||
"h3": "h3.some.network:5000"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# set a timeout (in seconds) on lgproxy requests
|
# set a timeout (in seconds) on lgproxy requests
|
||||||
PROXY_TIMEOUT = {
|
PROXY_TIMEOUT = {
|
||||||
"bird": 10,
|
"bird": 5,
|
||||||
"traceroute": 60
|
"traceroute": 60
|
||||||
}
|
}
|
||||||
|
|
||||||
# If True, queries are always done with the "ipv4" backend,
|
# Used for bgpmap, not currently supported
|
||||||
# and the distinction between IPv4 and IPv6 is removed from the UI.
|
ROUTER_IP = { }
|
||||||
UNIFIED_DAEMON = True
|
AS_NUMBER = { }
|
||||||
|
|
||||||
# Used for bgpmap
|
|
||||||
ROUTER_IP = {
|
|
||||||
"gw" : [ "91.224.148.2", "2a01:6600:8000::175" ],
|
|
||||||
"h3" : [ "91.224.148.3", "2a01:6600:8000::131" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
AS_NUMBER = {
|
WHOIS_SERVER = "whois.dn42"
|
||||||
"gw" : "197422",
|
|
||||||
"h3" : "197422"
|
|
||||||
}
|
|
||||||
|
|
||||||
#WHOIS_SERVER = "whois.foo.bar"
|
|
||||||
|
|
||||||
# DNS zone to query for ASN -> name mapping
|
# DNS zone to query for ASN -> name mapping
|
||||||
ASN_ZONE = "asn.cymru.com"
|
#ASN_ZONE = "asn.dn42"
|
||||||
|
|
||||||
SESSION_KEY = '\xd77\xf9\xfa\xc2\xb5\xcd\x85)`+H\x9d\xeeW\\%\xbe/\xbaT\x89\xe8\xa7'
|
SESSION_KEY = '\xd77\xf9\xfa\xc2\xb5\xcd\x85)`+H\x9d\xeeW\\%\xbe/\xbaT\x89\xe8\xa7'
|
||||||
|
5
lg.py
5
lg.py
@ -169,7 +169,6 @@ def bird_proxy(host, proto, service, query):
|
|||||||
@app.context_processor
|
@app.context_processor
|
||||||
def inject_commands():
|
def inject_commands():
|
||||||
commands = [
|
commands = [
|
||||||
("traceroute", "traceroute ..."),
|
|
||||||
("summary", "show protocols"),
|
("summary", "show protocols"),
|
||||||
("detail", "show protocols ... all"),
|
("detail", "show protocols ... all"),
|
||||||
("prefix", "show route for ..."),
|
("prefix", "show route for ..."),
|
||||||
@ -177,9 +176,7 @@ def inject_commands():
|
|||||||
("prefix_bgpmap", "show route for ... (bgpmap)"),
|
("prefix_bgpmap", "show route for ... (bgpmap)"),
|
||||||
("where", "show route where net ~ [ ... ]"),
|
("where", "show route where net ~ [ ... ]"),
|
||||||
("where_detail", "show route where net ~ [ ... ] all"),
|
("where_detail", "show route where net ~ [ ... ] all"),
|
||||||
("where_bgpmap", "show route where net ~ [ ... ] (bgpmap)"),
|
|
||||||
("adv", "show route ..."),
|
("adv", "show route ..."),
|
||||||
("adv_bgpmap", "show route ... (bgpmap)"),
|
|
||||||
]
|
]
|
||||||
commands_dict = {}
|
commands_dict = {}
|
||||||
for id, text in commands:
|
for id, text in commands:
|
||||||
@ -232,7 +229,7 @@ def whois():
|
|||||||
return jsonify(output=output, title=query)
|
return jsonify(output=output, title=query)
|
||||||
|
|
||||||
# Array of protocols that will be filtered from the summary listing
|
# Array of protocols that will be filtered from the summary listing
|
||||||
SUMMARY_UNWANTED_PROTOS = ["Kernel", "Static", "Device", "BFD", "Direct", "RPKI"]
|
SUMMARY_UNWANTED_PROTOS = ["Kernel", "Static", "Device", "BFD", "Direct", "RPKI","RAdv", "OSPF"]
|
||||||
# Array of regular expressions to match against protocol names,
|
# Array of regular expressions to match against protocol names,
|
||||||
# and filter them from the summary view
|
# and filter them from the summary view
|
||||||
SUMMARY_UNWANTED_NAMES = []
|
SUMMARY_UNWANTED_NAMES = []
|
||||||
|
@ -3,3 +3,15 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-size: 0.85rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table td, .table th {
|
||||||
|
padding: .4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link {
|
||||||
|
padding: 0.1rem 0.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<p>bird looking glass, <a href="https://github.com/sileht/bird-lg/">source code</a> under GPL 3.0, powered by <a href="http://flask.pocoo.org">Flask</a>, <a href="http://jquery.com/">jQuery</a> and <a href="https://getbootstrap.com/">Bootstrap</a></p>
|
<p><a href="https://dn42.burble.com/">burble.dn42 Network Details</a><br/>bird looking glass, <a href="https://github.com/sesa-me/bird-lg/">source code</a> under GPL 3.0, powered by <a href="http://flask.pocoo.org">Flask</a>, <a href="http://jquery.com/">jQuery</a> and <a href="https://getbootstrap.com/">Bootstrap</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="progress progress-info progress-striped active" style="position:fixed;bottom:0px;right:10px;display:none;height:10px;width:200px;">
|
<div class="progress progress-info progress-striped active" style="position:fixed;bottom:0px;right:10px;display:none;height:10px;width:200px;">
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
{% for host in detail %}
|
{% for host in detail %}
|
||||||
<h3>
|
<h3>
|
||||||
{{host}}: {{command}}
|
{{host}}: {{command}}
|
||||||
<small><a class="pull-right" href="/{{session.request_type|replace("_detail","")}}_bgpmap/{{session.hosts}}{% if not config.UNIFIED_DAEMON %}/{{session.proto}}{% endif %}?q={{session.request_args|urlencode}}">View the BGP map</a></small>
|
|
||||||
</h3>
|
</h3>
|
||||||
{% if session.request_args != expression|replace("/32","")|replace("/128","") %}
|
{% if session.request_args != expression|replace("/32","")|replace("/128","") %}
|
||||||
<i>DNS: <a href="/whois/{{session.request_args}}" class="whois">{{session.request_args}}</a> => <a href="/whois/{{ expression|replace("/32","")|replace("/128","") }}" class="whois">{{expression|replace("/32","")|replace("/128","")}}</a></i><br />
|
<i>DNS: <a href="/whois/{{session.request_args}}" class="whois">{{session.request_args}}</a> => <a href="/whois/{{ expression|replace("/32","")|replace("/128","") }}" class="whois">{{expression|replace("/32","")|replace("/128","")}}</a></i><br />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user