Esempio n. 1
0
def host_view_post(hostname):
  dt_start = post_dt_start(request)
  dt_end = post_dt_end(request, dt_start)
  last_update = datetime.datetime.now()
  hostlist = query.hostlist()
  ping_table = query.host_mapreduce(hostname, 'ping', 'avg', dt_start, dt_end)
  iperf_table = query.host_mapreduce(hostname, 'iperf', 'bandwidth', dt_start, dt_end)
  return template('host_template', title=hostname, hostname=hostname, hostlist=hostlist, last_update=last_update, dt_start=query.dt_to_timestamp(dt_start), dt_end=query.dt_to_timestamp(dt_end), ping_table=ping_table, iperf_table=iperf_table)
Esempio n. 2
0
def host_view(hostname):
  last_update = datetime.datetime.now()
  dt_start = datetime.datetime.now() - config.DT_QUERY
  dt_end = datetime.datetime.now()
  hostlist = query.hostlist()
  ping_table = query.host_mapreduce(hostname, 'ping', 'avg', dt_start, dt_end)
  iperf_table = query.host_mapreduce(hostname, 'iperf', 'bandwidth', dt_start, dt_end)
  logging.error(iperf_table)
  return template('host_template', title=hostname, hostname=hostname, hostlist=hostlist, last_update=last_update, dt_start=query.dt_to_timestamp(dt_start), dt_end=query.dt_to_timestamp(dt_end), ping_table=ping_table, iperf_table=iperf_table)
Esempio n. 3
0
def index_view():
    last_update = datetime.datetime.now()
    hostlist = query.hostlist()
    graph = json.dumps(query.graph_force())
    logging.error(graph)
    return template('index_template',
                    title="Overlord Monitoring",
                    graph=graph,
                    hostlist=hostlist,
                    last_update=last_update)
Esempio n. 4
0
def host_view_post(hostname):
    dt_start = post_dt_start(request)
    dt_end = post_dt_end(request, dt_start)
    last_update = datetime.datetime.now()
    hostlist = query.hostlist()
    ping_table = query.host_mapreduce(hostname, 'ping', 'avg', dt_start,
                                      dt_end)
    iperf_table = query.host_mapreduce(hostname, 'iperf', 'bandwidth',
                                       dt_start, dt_end)
    return template('host_template',
                    title=hostname,
                    hostname=hostname,
                    hostlist=hostlist,
                    last_update=last_update,
                    dt_start=query.dt_to_timestamp(dt_start),
                    dt_end=query.dt_to_timestamp(dt_end),
                    ping_table=ping_table,
                    iperf_table=iperf_table)
Esempio n. 5
0
def host_view(hostname):
    last_update = datetime.datetime.now()
    dt_start = datetime.datetime.now() - config.DT_QUERY
    dt_end = datetime.datetime.now()
    hostlist = query.hostlist()
    ping_table = query.host_mapreduce(hostname, 'ping', 'avg', dt_start,
                                      dt_end)
    iperf_table = query.host_mapreduce(hostname, 'iperf', 'bandwidth',
                                       dt_start, dt_end)
    logging.error(iperf_table)
    return template('host_template',
                    title=hostname,
                    hostname=hostname,
                    hostlist=hostlist,
                    last_update=last_update,
                    dt_start=query.dt_to_timestamp(dt_start),
                    dt_end=query.dt_to_timestamp(dt_end),
                    ping_table=ping_table,
                    iperf_table=iperf_table)
Esempio n. 6
0
def api_hostlist():
    hostlist = query.hostlist()
    return {"result": hostlist}
Esempio n. 7
0
def api_hostlist():
  hostlist = query.hostlist()
  return {"result" : hostlist}
Esempio n. 8
0
def index_view():
  last_update = datetime.datetime.now()
  hostlist = query.hostlist()
  graph = json.dumps(query.graph_force())
  logging.error(graph)
  return template('index_template', title="Overlord Monitoring" ,graph=graph, hostlist=hostlist, last_update=last_update)