Statsd export module is Ok

This commit is contained in:
Nicolargo 2014-12-30 22:33:54 +01:00
parent 37a3fcf0de
commit 237f9fb0c9
8 changed files with 25 additions and 6 deletions

3
NEWS
View File

@ -5,7 +5,8 @@ Glances Version 2.x
Version 2.X
===========
* Add a new InfluxDB export module (--export-influxdb) (issue #455)
* Add InfluxDB export module (--export-influxdb) (issue #455)
* Add Statsd export module (--export-statsd) (issue #465)
* Refactor export module (CSV export option is now --export-csv). It is now possible to export stats from the Glances client (issue #463)
* The Web inteface is now based on BootStarp / RWD grid (issue #417, #366 and #461) Thanks to Nicolas Hart @nclsHart
* Add the RAID plugins (issue #447)

View File

@ -206,7 +206,7 @@ And RTFM, always.
Gateway to others services
==========================
Glances can export stats to: CSV file and/or InfluxDB server.
Glances can export stats to: CSV file, InfluxDB and Statsd server.
Documentation
=============

View File

@ -150,3 +150,8 @@ port=8086
user=root
password=root
db=glances
[statsd]
host=localhost
port=8125
#prefix=glances

View File

@ -150,3 +150,8 @@ port=8086
user=root
password=root
db=glances
[statsd]
host=localhost
port=8125
#prefix=glances

View File

@ -96,6 +96,8 @@ class GlancesMain(object):
dest='export_csv', help=_('export stats to a CSV file'))
parser.add_argument('--export-influxdb', action='store_true', default=False,
dest='export_influxdb', help=_('export stats to an InfluxDB server'))
parser.add_argument('--export-statsd', action='store_true', default=False,
dest='export_statsd', help=_('export stats to a Statsd server'))
# Client/Server option
parser.add_argument('-c', '--client', dest='client',
help=_('connect to a Glances server by IPv4/IPv6 address or hostname'))

View File

@ -24,7 +24,6 @@ from influxdb import InfluxDBClient, client
import sys
# Import Glances lib
from glances.core.glances_globals import is_py3
from glances.core.glances_logging import logger
from ConfigParser import NoSectionError, NoOptionError
from glances.exports.glances_export import GlancesExport
@ -35,7 +34,7 @@ class Export(GlancesExport):
"""This class manages the InfluxDB export module."""
def __init__(self, config=None, args=None):
"""Init the CSV export IF."""
"""Init the InfluxDB export IF."""
GlancesExport.__init__(self, config=config, args=args)
# Load the InfluxDB configuration file

View File

@ -67,9 +67,15 @@ enable the history mode
B \-\-path-history PATH_HISTORY
set the export path for graph history
.TP
.B \-\-output-csv OUTPUT_CSV
.B \-\-export-csv CSV_FILE
export stats to a CSV file
.TP
.B \-\-export-influxdb
export stats to an InfluxDB server
.TP
.B \-\-export-statsd
export stats to a Statsd server
.TP
.B \-s, \-\-server
run Glances in server mode
.TP

View File

@ -66,7 +66,8 @@ setup(
'SNMP': ['pysnmp'],
'CHART': ['matplotlib'],
'BROWSER': ['zeroconf>=0.16', 'netifaces'],
'RAID': ['pymdstat']
'RAID': ['pymdstat'],
'EXPORT': ['influxdb', 'statsd']
},
packages=['glances'],
include_package_data=True,