Add export message for statsd

This commit is contained in:
nicolargo 2017-03-28 22:44:28 +02:00
parent 1b8f955ec8
commit a997733fc3
2 changed files with 4 additions and 1 deletions

View File

@ -422,7 +422,7 @@ countmax=20
[amp_nginx]
# Use the NGinx AMP
# Nginx status page should be enable (https://easyengine.io/tutorials/nginx/status-page/)
enable=true
enable=false
regex=\/usr\/sbin\/nginx
refresh=60
one_line=false

View File

@ -61,6 +61,9 @@ class Export(GlancesExport):
"""Init the connection to the Statsd server."""
if not self.export_enable:
return None
logger.info(
"Stats will be exported to StatsD server: {}:{}".format(self.host,
self.port))
return StatsClient(self.host,
int(self.port),
prefix=prefix)