mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-26 02:31:36 +03:00
Statsd export module is Ok
This commit is contained in:
parent
37a3fcf0de
commit
237f9fb0c9
3
NEWS
3
NEWS
@ -5,7 +5,8 @@ Glances Version 2.x
|
|||||||
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)
|
* 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
|
* 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)
|
* Add the RAID plugins (issue #447)
|
||||||
|
@ -206,7 +206,7 @@ And RTFM, always.
|
|||||||
Gateway to others services
|
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
|
Documentation
|
||||||
=============
|
=============
|
||||||
|
@ -150,3 +150,8 @@ port=8086
|
|||||||
user=root
|
user=root
|
||||||
password=root
|
password=root
|
||||||
db=glances
|
db=glances
|
||||||
|
|
||||||
|
[statsd]
|
||||||
|
host=localhost
|
||||||
|
port=8125
|
||||||
|
#prefix=glances
|
||||||
|
@ -150,3 +150,8 @@ port=8086
|
|||||||
user=root
|
user=root
|
||||||
password=root
|
password=root
|
||||||
db=glances
|
db=glances
|
||||||
|
|
||||||
|
[statsd]
|
||||||
|
host=localhost
|
||||||
|
port=8125
|
||||||
|
#prefix=glances
|
||||||
|
@ -96,6 +96,8 @@ class GlancesMain(object):
|
|||||||
dest='export_csv', help=_('export stats to a CSV file'))
|
dest='export_csv', help=_('export stats to a CSV file'))
|
||||||
parser.add_argument('--export-influxdb', action='store_true', default=False,
|
parser.add_argument('--export-influxdb', action='store_true', default=False,
|
||||||
dest='export_influxdb', help=_('export stats to an InfluxDB server'))
|
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
|
# Client/Server option
|
||||||
parser.add_argument('-c', '--client', dest='client',
|
parser.add_argument('-c', '--client', dest='client',
|
||||||
help=_('connect to a Glances server by IPv4/IPv6 address or hostname'))
|
help=_('connect to a Glances server by IPv4/IPv6 address or hostname'))
|
||||||
|
@ -24,7 +24,6 @@ from influxdb import InfluxDBClient, client
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
# Import Glances lib
|
# Import Glances lib
|
||||||
from glances.core.glances_globals import is_py3
|
|
||||||
from glances.core.glances_logging import logger
|
from glances.core.glances_logging import logger
|
||||||
from ConfigParser import NoSectionError, NoOptionError
|
from ConfigParser import NoSectionError, NoOptionError
|
||||||
from glances.exports.glances_export import GlancesExport
|
from glances.exports.glances_export import GlancesExport
|
||||||
@ -35,7 +34,7 @@ class Export(GlancesExport):
|
|||||||
"""This class manages the InfluxDB export module."""
|
"""This class manages the InfluxDB export module."""
|
||||||
|
|
||||||
def __init__(self, config=None, args=None):
|
def __init__(self, config=None, args=None):
|
||||||
"""Init the CSV export IF."""
|
"""Init the InfluxDB export IF."""
|
||||||
GlancesExport.__init__(self, config=config, args=args)
|
GlancesExport.__init__(self, config=config, args=args)
|
||||||
|
|
||||||
# Load the InfluxDB configuration file
|
# Load the InfluxDB configuration file
|
||||||
|
@ -67,9 +67,15 @@ enable the history mode
|
|||||||
B \-\-path-history PATH_HISTORY
|
B \-\-path-history PATH_HISTORY
|
||||||
set the export path for graph history
|
set the export path for graph history
|
||||||
.TP
|
.TP
|
||||||
.B \-\-output-csv OUTPUT_CSV
|
.B \-\-export-csv CSV_FILE
|
||||||
export stats to a CSV file
|
export stats to a CSV file
|
||||||
.TP
|
.TP
|
||||||
|
.B \-\-export-influxdb
|
||||||
|
export stats to an InfluxDB server
|
||||||
|
.TP
|
||||||
|
.B \-\-export-statsd
|
||||||
|
export stats to a Statsd server
|
||||||
|
.TP
|
||||||
.B \-s, \-\-server
|
.B \-s, \-\-server
|
||||||
run Glances in server mode
|
run Glances in server mode
|
||||||
.TP
|
.TP
|
||||||
|
3
setup.py
3
setup.py
@ -66,7 +66,8 @@ setup(
|
|||||||
'SNMP': ['pysnmp'],
|
'SNMP': ['pysnmp'],
|
||||||
'CHART': ['matplotlib'],
|
'CHART': ['matplotlib'],
|
||||||
'BROWSER': ['zeroconf>=0.16', 'netifaces'],
|
'BROWSER': ['zeroconf>=0.16', 'netifaces'],
|
||||||
'RAID': ['pymdstat']
|
'RAID': ['pymdstat'],
|
||||||
|
'EXPORT': ['influxdb', 'statsd']
|
||||||
},
|
},
|
||||||
packages=['glances'],
|
packages=['glances'],
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
|
Loading…
Reference in New Issue
Block a user