diff --git a/Cargo.toml b/Cargo.toml index 074df37c..ea9ee8d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,9 @@ clap = "2.33.3" regex = "1" procfs = "0.8.1" actix-web = "3" +riemann_client = "0.7.0" +hostname = "0.3.1" +protobuf = "^1.0.0" [profile.release] lto = true diff --git a/docs/404.html b/docs/404.html index 5e2e39a9..c9c24a3f 100644 --- a/docs/404.html +++ b/docs/404.html @@ -6,7 +6,7 @@ - + @@ -97,7 +97,7 @@ @@ -190,21 +190,6 @@

- - - diff --git a/docs/compatibility.html b/docs/compatibility.html index fe71eece..6dffd0f1 100644 --- a/docs/compatibility.html +++ b/docs/compatibility.html @@ -95,7 +95,7 @@ @@ -211,21 +211,6 @@

Compatibility - - - diff --git a/docs/contributing.html b/docs/contributing.html index a712f94d..639956ea 100644 --- a/docs/contributing.html +++ b/docs/contributing.html @@ -95,7 +95,7 @@ @@ -222,21 +222,6 @@

- var socket = new WebSocket("ws://localhost:3001/__livereload"); - socket.onmessage = function (event) { - if (event.data === "reload") { - socket.close(); - location.reload(); - } - }; - - window.onbeforeunload = function() { - socket.close(); - } - - diff --git a/docs/explanations/about-containers.html b/docs/explanations/about-containers.html index 21a9e401..1af4fefc 100644 --- a/docs/explanations/about-containers.html +++ b/docs/explanations/about-containers.html @@ -95,7 +95,7 @@ @@ -208,21 +208,6 @@

About conta - - - diff --git a/docs/explanations/how-scaph-computes-per-process-power-consumption.html b/docs/explanations/how-scaph-computes-per-process-power-consumption.html index 75f2d7d6..bba634ae 100644 --- a/docs/explanations/how-scaph-computes-per-process-power-consumption.html +++ b/docs/explanations/how-scaph-computes-per-process-power-consumption.html @@ -95,7 +95,7 @@ @@ -214,21 +214,6 @@

- var socket = new WebSocket("ws://localhost:3001/__livereload"); - socket.onmessage = function (event) { - if (event.data === "reload") { - socket.close(); - location.reload(); - } - }; - - window.onbeforeunload = function() { - socket.close(); - } - - diff --git a/docs/explanations/internal-structure.html b/docs/explanations/internal-structure.html index 0a4ae6df..f3c27ba1 100644 --- a/docs/explanations/internal-structure.html +++ b/docs/explanations/internal-structure.html @@ -95,7 +95,7 @@ @@ -221,21 +221,6 @@

Exporters

- - - diff --git a/docs/how-to_guides/get-process-level-power-in-grafana.html b/docs/how-to_guides/get-process-level-power-in-grafana.html index 8155ae39..1a18563a 100644 --- a/docs/how-to_guides/get-process-level-power-in-grafana.html +++ b/docs/how-to_guides/get-process-level-power-in-grafana.html @@ -95,7 +95,7 @@ @@ -221,21 +221,6 @@

- var socket = new WebSocket("ws://localhost:3001/__livereload"); - socket.onmessage = function (event) { - if (event.data === "reload") { - socket.close(); - location.reload(); - } - }; - - window.onbeforeunload = function() { - socket.close(); - } - - diff --git a/docs/how-to_guides/propagate-metrics-hypervisor-to-vm_qemu-kvm.html b/docs/how-to_guides/propagate-metrics-hypervisor-to-vm_qemu-kvm.html index 20ce199d..f7d57abe 100644 --- a/docs/how-to_guides/propagate-metrics-hypervisor-to-vm_qemu-kvm.html +++ b/docs/how-to_guides/propagate-metrics-hypervisor-to-vm_qemu-kvm.html @@ -95,7 +95,7 @@ @@ -238,21 +238,6 @@

How to

- - - diff --git a/docs/index.html b/docs/index.html index 14d0d033..06d85876 100644 --- a/docs/index.html +++ b/docs/index.html @@ -95,7 +95,7 @@ @@ -203,21 +203,6 @@

Introduction - - - diff --git a/docs/print.html b/docs/print.html index d16fa185..f6ceb139 100644 --- a/docs/print.html +++ b/docs/print.html @@ -97,7 +97,7 @@ @@ -461,8 +461,41 @@

Usage

-

Stdout exporter

+

Riemann exporter

+

riemann exporter

Usage

+

You can launch the Riemann exporter this way (running the default powercap_rapl sensor):

+
scaphandre riemann
+
+

As always exporter's options can be displayed with -h:

+
scaphandre-riemann
+Riemann exporter sends power consumption metrics to a Riemann server
+
+USAGE:
+    scaphandre riemann [FLAGS] [OPTIONS]
+
+FLAGS:
+    -h, --help       Prints help information
+    -q, --qemu       Instruct that scaphandre is running on an hypervisor
+    -V, --version    Prints version information
+
+OPTIONS:
+    -a, --address <address>               Riemann ipv6 or ipv4 address [default: localhost]
+    -d, --dispatch <dispatch_duration>    Duration between metrics dispatch [default: 5]
+    -p, --port <port>                     Riemann TCP port number [default: 5555]
+
+
+

With default options values, the metrics are sent to http://localhost:5555 every 5 seconds

+

Use -q or --qemu option if you are running scaphandre on a hypervisor. In that case a label with the vm name will be added to all qemu-system* processes. +This will allow to easily create charts consumption for each vm and defined which one is the top contributor.

+

Metrics exposed

+

Typically the Riemann exporter is working in the same way as the prometheus exporter regarding metrics. Please look at details in Prometheus exporter documentations.

+

There is only one exception about process_power_consumption_microwatts each process has a service name process_power_consumption_microwatts_pid_exe.

+

As an example, process consumption can be retrieved using the following Riemann query:

+
(service =~ "process_power_consumption_microwatts_%_firefox") or (service =~ "process_power_consumption_microwatts_%_scaphandre")
+
+

Stdout exporter

+

Usage

You can launch the stdout exporter this way (running the default powercap_rapl sensor):

scaphandre stdout
 
@@ -502,7 +535,7 @@

Pre-requesites< and 5.11 for family 19h.

Energy consumption data can be directly collected on a physical machine only.

To collect energy consumption on a virtual machine, you may first collect power consumption data from the hypervisor thanks to the qemu exporter and then collect those metrics in the virtual machine thanks to this sensor, with --vm flag enabled.

-

Usage

+

Usage

To explicitely call the powercap_rapl sensor from the command line use:

scaphandre -s powercap_rapl EXPORTER # EXPORTER being the exporter name you want to use
 
@@ -624,21 +657,6 @@

T - - - diff --git a/docs/references/exporter-prometheus.html b/docs/references/exporter-prometheus.html index 6ae5d1c7..3c93d515 100644 --- a/docs/references/exporter-prometheus.html +++ b/docs/references/exporter-prometheus.html @@ -95,7 +95,7 @@ @@ -282,21 +282,6 @@

- var socket = new WebSocket("ws://localhost:3001/__livereload"); - socket.onmessage = function (event) { - if (event.data === "reload") { - socket.close(); - location.reload(); - } - }; - - window.onbeforeunload = function() { - socket.close(); - } - - diff --git a/docs/references/exporter-qemu.html b/docs/references/exporter-qemu.html index 002733a1..b67d8dc3 100644 --- a/docs/references/exporter-qemu.html +++ b/docs/references/exporter-qemu.html @@ -95,7 +95,7 @@ @@ -226,7 +226,7 @@

Usage

- @@ -244,7 +244,7 @@

Usage

- @@ -253,21 +253,6 @@

Usage

- - - diff --git a/docs/references/exporter-riemann.html b/docs/references/exporter-riemann.html new file mode 100644 index 00000000..14d645c2 --- /dev/null +++ b/docs/references/exporter-riemann.html @@ -0,0 +1,277 @@ + + + + + + Riemann exporter - Scaphandre documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+
+

Riemann exporter

+

riemann exporter

+

Usage

+

You can launch the Riemann exporter this way (running the default powercap_rapl sensor):

+
scaphandre riemann
+
+

As always exporter's options can be displayed with -h:

+
scaphandre-riemann
+Riemann exporter sends power consumption metrics to a Riemann server
+
+USAGE:
+    scaphandre riemann [FLAGS] [OPTIONS]
+
+FLAGS:
+    -h, --help       Prints help information
+    -q, --qemu       Instruct that scaphandre is running on an hypervisor
+    -V, --version    Prints version information
+
+OPTIONS:
+    -a, --address <address>               Riemann ipv6 or ipv4 address [default: localhost]
+    -d, --dispatch <dispatch_duration>    Duration between metrics dispatch [default: 5]
+    -p, --port <port>                     Riemann TCP port number [default: 5555]
+
+
+

With default options values, the metrics are sent to http://localhost:5555 every 5 seconds

+

Use -q or --qemu option if you are running scaphandre on a hypervisor. In that case a label with the vm name will be added to all qemu-system* processes. +This will allow to easily create charts consumption for each vm and defined which one is the top contributor.

+

Metrics exposed

+

Typically the Riemann exporter is working in the same way as the prometheus exporter regarding metrics. Please look at details in Prometheus exporter documentations.

+

There is only one exception about process_power_consumption_microwatts each process has a service name process_power_consumption_microwatts_pid_exe.

+

As an example, process consumption can be retrieved using the following Riemann query:

+
(service =~ "process_power_consumption_microwatts_%_firefox") or (service =~ "process_power_consumption_microwatts_%_scaphandre")
+
+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/references/exporter-stdout.html b/docs/references/exporter-stdout.html index e616ed8b..88c566b3 100644 --- a/docs/references/exporter-stdout.html +++ b/docs/references/exporter-stdout.html @@ -95,7 +95,7 @@ @@ -196,7 +196,7 @@

Usage