collector.dn42 customisations
This commit is contained in:
parent
f3699a3b61
commit
7bf648a932
36
lg.cfg
36
lg.cfg
@ -1,42 +1,32 @@
|
||||
|
||||
DEBUG = True
|
||||
LOG_FILE="/var/log/lg.log"
|
||||
LOG_FILE="/var/log/glass/glass.log"
|
||||
LOG_LEVEL="WARNING"
|
||||
UNIFIED_DAEMON = True
|
||||
|
||||
DOMAIN = "tetaneutral.net"
|
||||
DOMAIN = "collector.dn42"
|
||||
|
||||
BIND_IP = "0.0.0.0"
|
||||
BIND_PORT = 5000
|
||||
BIND_IP = "::"
|
||||
BIND_PORT = 5001
|
||||
|
||||
PROXY = {
|
||||
"gw": "gw.some.network:5000",
|
||||
"h3": "h3.some.network:5000"
|
||||
"grc": "localhost:5000"
|
||||
}
|
||||
|
||||
# set a timeout (in seconds) on lgproxy requests
|
||||
PROXY_TIMEOUT = {
|
||||
"bird": 10,
|
||||
"traceroute": 60
|
||||
"bird": 5,
|
||||
"traceroute": 60
|
||||
}
|
||||
|
||||
# If True, queries are always done with the "ipv4" backend,
|
||||
# and the distinction between IPv4 and IPv6 is removed from the UI.
|
||||
UNIFIED_DAEMON = True
|
||||
# Used for bgpmap, not currently supported
|
||||
ROUTER_IP = { }
|
||||
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 = {
|
||||
"gw" : "197422",
|
||||
"h3" : "197422"
|
||||
}
|
||||
|
||||
#WHOIS_SERVER = "whois.foo.bar"
|
||||
WHOIS_SERVER = "whois.dn42"
|
||||
|
||||
# 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'
|
||||
|
5
lg.py
5
lg.py
@ -169,7 +169,6 @@ def bird_proxy(host, proto, service, query):
|
||||
@app.context_processor
|
||||
def inject_commands():
|
||||
commands = [
|
||||
("traceroute", "traceroute ..."),
|
||||
("summary", "show protocols"),
|
||||
("detail", "show protocols ... all"),
|
||||
("prefix", "show route for ..."),
|
||||
@ -177,9 +176,7 @@ def inject_commands():
|
||||
("prefix_bgpmap", "show route for ... (bgpmap)"),
|
||||
("where", "show route where net ~ [ ... ]"),
|
||||
("where_detail", "show route where net ~ [ ... ] all"),
|
||||
("where_bgpmap", "show route where net ~ [ ... ] (bgpmap)"),
|
||||
("adv", "show route ..."),
|
||||
("adv_bgpmap", "show route ... (bgpmap)"),
|
||||
]
|
||||
commands_dict = {}
|
||||
for id, text in commands:
|
||||
@ -232,7 +229,7 @@ def whois():
|
||||
return jsonify(output=output, title=query)
|
||||
|
||||
# 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,
|
||||
# and filter them from the summary view
|
||||
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 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 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 %}
|
||||
<h3>
|
||||
{{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>
|
||||
{% 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 />
|
||||
|
Loading…
x
Reference in New Issue
Block a user