Ejemplo n.º 1
0
from datetime import datetime
import socket

from elasticsearch import Elasticsearch
from elasticsearch import helpers

import logging

debug=False

if debug:
    logging.basicConfig(level=logging.DEBUG)
else:
    logging.basicConfig(level=logging.ERROR)

statuslist = agis.get_site_status(activity='DDMFT')
downtimes_ongoing = agis.list_downtimes(ongoing_time=datetime.utcnow())


outputdir=sys.argv[1]
if debug:
    print 'output will be stored in:', outputdir

global messages
messages=[]

hostalias='dashb-mb.cern.ch'
queue = '/queue/faxmon.costMatrix'

d = datetime.now()
ind = "faxcost-" + str(d.year) + "." + str(d.month).zfill(2)