diff --git a/src/exporters/elastic.rs b/src/exporters/elastic.rs new file mode 100644 index 00000000..4351eea3 --- /dev/null +++ b/src/exporters/elastic.rs @@ -0,0 +1,25 @@ +//! # ElasticExporter +//! +//! `ElasticExporter` implementation, exposes metrics to +//! an [ElasticSearch](https://www.elastic.co/fr/elasticsearch/) server. + +use crate::exporters::Exporter; +use crate::sensors::Sensor; +use clap::ArgMatches; + +/// Exporter that pushes metrics to an ElasticSearch endpoint +pub struct ElasticExporter { + /// Sensor instance that is used to generate the Topology and + /// thus get power consumption metrics. + _sensor: Box, +} + +impl Exporter for ElasticExporter { + fn run(&mut self, _parameters: ArgMatches) { + // TODO + } + + fn get_options() -> Vec> { + Vec::new() + } +} diff --git a/src/exporters/mod.rs b/src/exporters/mod.rs index 6cc26d9e..402c6515 100644 --- a/src/exporters/mod.rs +++ b/src/exporters/mod.rs @@ -2,6 +2,7 @@ //! //! `Exporter` is the root for all exporters. It defines the [Exporter] trait //! needed to implement an exporter. +pub mod elastic; pub mod json; pub mod prometheus; pub mod qemu; diff --git a/src/lib.rs b/src/lib.rs index da878f71..462e5f57 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -140,6 +140,10 @@ pub fn get_exporters_options() -> HashMap "Riemann exporter sends power consumption metrics to a Riemann server", "qemu" => "Qemu exporter watches all Qemu/KVM virtual machines running on the host and exposes metrics of each of them in a dedicated folder", "warp10" => "Warp10 exporter sends data to a Warp10 host, through HTTP", + "elastic" => "Elastic exporter sends data to an ElasticSeach host", _ => "Unknown exporter", } );