-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IMPROVEMENT:: ADD TIMESTAMP TO MANAGER STATS (#208)
- add RFC3339 'timestamp' field to stats generated from manager.py
- Loading branch information
Showing
1 changed file
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
__email__ = "[email protected]" | ||
__doc__ = 'The unix socket administration server class' | ||
|
||
import datetime | ||
import socket | ||
import logging | ||
import redis | ||
|
@@ -188,7 +189,9 @@ def report_stats(self, services, reports_conf, cv): | |
if not self._continue: | ||
logger.debug("Reporter: stopping") | ||
break | ||
stats = json.dumps(services.monitor_all()) | ||
jsonStats = services.monitor_all() | ||
jsonStats['timestamp'] = datetime.datetime.utcnow().strftime("%FT%TZ") | ||
stats = json.dumps(jsonStats) | ||
logger.debug("reporting stats: {}".format(stats)) | ||
|
||
if self._stats_redis: | ||
|