diff --git a/lambda_code/AWS_AmazonSNS.py b/lambda_code/AWS_AmazonSNS.py index daa4a3f..0e5772f 100644 --- a/lambda_code/AWS_AmazonSNS.py +++ b/lambda_code/AWS_AmazonSNS.py @@ -103,7 +103,10 @@ def __check_event_type(self, record): return "Other" def send_to_zabbix(self): - send_data = json.loads('{"request":"sender data","data":[]}') + now = "%.9f" % time.time() + sec = now.split(".")[0] + ns = now.split(".")[1] + send_data = json.loads('{"request":"sender data","data":[],"clock":%s,"ns":%s }' % (sec, ns)) send_data["data"] = self.send_items send_data_string = json.dumps(send_data) zbx_client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) diff --git a/scripts/AWS_Service_Health_Dashboard.py b/scripts/AWS_Service_Health_Dashboard.py index 72de2bb..6c43a36 100755 --- a/scripts/AWS_Service_Health_Dashboard.py +++ b/scripts/AWS_Service_Health_Dashboard.py @@ -29,7 +29,10 @@ def __init__(self, base_url, block, zabbix_host='localhost', zabbix_port=10051): def get_rss(self, url): - send_data = json.loads('{"request":"sender data","data":[]}') + now = "%.9f" % time.time() + sec = now.split(".")[0] + ns = now.split(".")[1] + send_data = json.loads('{"request":"sender data","data":[],"clock":%s,"ns":%s }' % (sec, ns)) response = feedparser.parse(url) send_items = [] diff --git a/scripts/cloudwatch_zabbix.py b/scripts/cloudwatch_zabbix.py index 90c86d3..cc17817 100755 --- a/scripts/cloudwatch_zabbix.py +++ b/scripts/cloudwatch_zabbix.py @@ -169,7 +169,10 @@ def __send_to_zabbix(self, send_data): def send_metric_data_to_zabbix(self): - send_data = json.loads('{"request":"sender data","data":[]}') + now = "%.9f" % time.time() + sec = now.split(".")[0] + ns = now.split(".")[1] + send_data = json.loads('{"request":"sender data","data":[],"clock":%s,"ns":%s }' % (sec, ns)) metric_list = self.__get_metric_list() all_metric_stats = [] servicename = self.service