sample-chaos-exporter

module
v0.0.0-...-110f534 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2019 License: Apache-2.0

README

Sample-chaos-exporter

  • This is a custom prometheus exporter to expose litmus chaos metrics

  • The exporter is typically tied to a given chaosengine custom resource, which, in-turn is associated with a given application deployment

  • Two types of metrics are exposed:

    • Fixed: TotalExperimentCount, TotalPassedTests, TotalFailedTests
    • Dymanic: Individual experiment status. The list of experiments may vary across chaos engines. The exporter reports experiment status as per list in the chaosengine
  • The metrics are of type Gauge, w/ each of the status metrics mapped to a numeric value(not-executed:0, running:1, fail:2, pass:3)

  • The metrics carry the application_uuid as label (this has to be passed as ENV)

Steps:

Local Machine (test purposes)
On Kubernetes Cluster
  • Install the RBAC (serviceaccount, role, rolebinding) as per deploy/rbac.md

  • Deploy the chaos-exporter.yaml

  • From a cluster node, execute curl <exporter-service-ip>:8080/metrics

  • (Optional) Deploy prometheus with desired scrape interval & grafana deployments

Example Metrics
c_engine_experiment_count{app_uid="3f2092f8-6400-11e9-905f-42010a800131"} 2
# HELP c_engine_failed_experiments Total number of failed experiments
# TYPE c_engine_failed_experiments gauge
c_engine_failed_experiments{app_uid="3f2092f8-6400-11e9-905f-42010a800131"} 1
# HELP c_engine_passed_experiments Total number of passed experiments
# TYPE c_engine_passed_experiments gauge
c_engine_passed_experiments{app_uid="3f2092f8-6400-11e9-905f-42010a800131"} 1
# HELP c_exp_engine_nginx_container_kill 
# TYPE c_exp_engine_nginx_container_kill gauge
c_exp_engine_nginx_container_kill{app_uid="3f2092f8-6400-11e9-905f-42010a800131"} 2
# HELP c_exp_engine_nginx_pod_failure 
# TYPE c_exp_engine_nginx_pod_failure gauge
c_exp_engine_nginx_pod_failure{app_uid="3f2092f8-6400-11e9-905f-42010a800131"} 3

Roadmap

(This will be updated/active)

  • Rethink metric types for status
  • Add more labels
  • Design an overall application resilience metric which is derived based on test run results

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL