more Transit-removal changes
This commit is contained in:
parent
d87792a7c7
commit
7e17dcfef1
|
@ -11,5 +11,3 @@ include misc/munin/wormhole_errors
|
|||
include misc/munin/wormhole_event_rate
|
||||
include misc/munin/wormhole_events
|
||||
include misc/munin/wormhole_events_alltime
|
||||
include misc/munin/wormhole_transit
|
||||
include misc/munin/wormhole_transit_alltime
|
||||
|
|
|
@ -184,6 +184,8 @@ addresses of each client with the other (inside the encrypted message), and
|
|||
both clients first attempt to connect directly. If this fails, they fall back
|
||||
to using the transit relay. As before, the host/port of a public server is
|
||||
baked into the library, and should be sufficient to handle moderate traffic.
|
||||
Code for the Transit Relay is provided a separate package named
|
||||
`magic-wormhole-transit-relay`.
|
||||
|
||||
The protocol includes provisions to deliver notices and error messages to
|
||||
clients: if either relay must be shut down, these channels will be used to
|
||||
|
|
|
@ -22,12 +22,6 @@ mailboxes.type GAUGE
|
|||
messages.label Messages
|
||||
messages.draw LINE1
|
||||
messages.type GAUGE
|
||||
transit_waiting.label Transit Waiting
|
||||
transit_waiting.draw LINE1
|
||||
transit_waiting.type GAUGE
|
||||
transit_connected.label Transit Connected
|
||||
transit_connected.draw LINE1
|
||||
transit_connected.type GAUGE
|
||||
"""
|
||||
|
||||
if len(sys.argv) > 1 and sys.argv[1] == "config":
|
||||
|
@ -45,6 +39,3 @@ ra = data["rendezvous"]["active"]
|
|||
print "nameplates.value", ra["nameplates_total"]
|
||||
print "mailboxes.value", ra["mailboxes_total"]
|
||||
print "messages.value", ra["messages_total"]
|
||||
ta = data["transit"]["active"]
|
||||
print "transit_waiting.value", ta["waiting"]
|
||||
print "transit_connected.value", ta["connected"]
|
||||
|
|
|
@ -22,9 +22,6 @@ mailboxes.type GAUGE
|
|||
mailboxes_scary.label Mailboxes (scary)
|
||||
mailboxes_scary.draw LINE1
|
||||
mailboxes_scary.type GAUGE
|
||||
transit.label Transit
|
||||
transit.draw LINE1
|
||||
transit.type GAUGE
|
||||
"""
|
||||
|
||||
if len(sys.argv) > 1 and sys.argv[1] == "config":
|
||||
|
@ -44,5 +41,3 @@ print "nameplates.value", (r["nameplates_total"]
|
|||
print "mailboxes.value", (r["mailboxes_total"]
|
||||
- r["mailbox_moods"].get("happy", 0))
|
||||
print "mailboxes_scary.value", r["mailbox_moods"].get("scary", 0)
|
||||
t = data["transit"]["since_reboot"]
|
||||
print "transit.value", (t["total"] - t["moods"].get("happy", 0))
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
#! /usr/bin/env python
|
||||
|
||||
"""
|
||||
Use the following in /etc/munin/plugin-conf.d/wormhole :
|
||||
|
||||
[wormhole_*]
|
||||
env.serverdir /path/to/your/wormhole/server
|
||||
"""
|
||||
|
||||
import os, sys, time, json
|
||||
|
||||
CONFIG = """\
|
||||
graph_title Magic-Wormhole Transit Usage (since reboot)
|
||||
graph_vlabel Bytes Since Reboot
|
||||
graph_category network
|
||||
bytes.label Transit Bytes
|
||||
bytes.draw LINE1
|
||||
bytes.type GAUGE
|
||||
"""
|
||||
|
||||
if len(sys.argv) > 1 and sys.argv[1] == "config":
|
||||
print CONFIG.rstrip()
|
||||
sys.exit(0)
|
||||
|
||||
serverdir = os.environ["serverdir"]
|
||||
fn = os.path.join(serverdir, "stats.json")
|
||||
with open(fn) as f:
|
||||
data = json.load(f)
|
||||
if time.time() > data["valid_until"]:
|
||||
sys.exit(1) # expired
|
||||
|
||||
t = data["transit"]["since_reboot"]
|
||||
print "bytes.value", t["bytes"]
|
|
@ -1,33 +0,0 @@
|
|||
#! /usr/bin/env python
|
||||
|
||||
"""
|
||||
Use the following in /etc/munin/plugin-conf.d/wormhole :
|
||||
|
||||
[wormhole_*]
|
||||
env.serverdir /path/to/your/wormhole/server
|
||||
"""
|
||||
|
||||
import os, sys, time, json
|
||||
|
||||
CONFIG = """\
|
||||
graph_title Magic-Wormhole Transit Usage (all time)
|
||||
graph_vlabel Bytes Since DB Creation
|
||||
graph_category network
|
||||
bytes.label Transit Bytes
|
||||
bytes.draw LINE1
|
||||
bytes.type GAUGE
|
||||
"""
|
||||
|
||||
if len(sys.argv) > 1 and sys.argv[1] == "config":
|
||||
print CONFIG.rstrip()
|
||||
sys.exit(0)
|
||||
|
||||
serverdir = os.environ["serverdir"]
|
||||
fn = os.path.join(serverdir, "stats.json")
|
||||
with open(fn) as f:
|
||||
data = json.load(f)
|
||||
if time.time() > data["valid_until"]:
|
||||
sys.exit(1) # expired
|
||||
|
||||
t = data["transit"]["all_time"]
|
||||
print "bytes.value", t["bytes"]
|
Loading…
Reference in New Issue
Block a user