Skip to content

Commit

Permalink
Readme (#84)
Browse files Browse the repository at this point in the history
* chore(exporter): delete the corresponding metrics with result deletion

Signed-off-by: shubhamchaudhary <[email protected]>

* update(readme): update metrics example based on new changes

Signed-off-by: shubhamchaudhary <[email protected]>
  • Loading branch information
ispeakc0de authored Jan 12, 2021
1 parent 2648864 commit 4815cf4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,40 +51,40 @@
```
# HELP litmuschaos_awaited_experiments Total number of awaited experiments
# TYPE litmuschaos_awaited_experiments gauge
litmuschaos_awaited_experiments{chaosresult_name="engine-nginx-pod-delete",chaosresult_namespace="litmus"} 0
litmuschaos_awaited_experiments{chaosresult_name="engine-nginx-container-kill",chaosresult_namespace="litmus"} 0
# HELP litmuschaos_cluster_scoped_awaited_experiments Total number of awaited experiments in all namespaces
# TYPE litmuschaos_cluster_scoped_awaited_experiments gauge
litmuschaos_cluster_scoped_awaited_experiments 0
# HELP litmuschaos_cluster_scoped_experiments_installed_count Total number of experiments in all namespaces
# TYPE litmuschaos_cluster_scoped_experiments_installed_count gauge
litmuschaos_cluster_scoped_experiments_installed_count 1
# HELP litmuschaos_cluster_scoped_experiments_run_count Total experiments run in all namespaces
# TYPE litmuschaos_cluster_scoped_experiments_run_count gauge
litmuschaos_cluster_scoped_experiments_run_count 1
# HELP litmuschaos_cluster_scoped_failed_experiments Total number of failed experiments in all namespaces
# TYPE litmuschaos_cluster_scoped_failed_experiments gauge
litmuschaos_cluster_scoped_failed_experiments 0
# HELP litmuschaos_cluster_scoped_passed_experiments Total number of passed experiments in all namespaces
# TYPE litmuschaos_cluster_scoped_passed_experiments gauge
litmuschaos_cluster_scoped_passed_experiments 1
# HELP litmuschaos_experiment_chaos_injected_time chaos injected time of the experiments
# TYPE litmuschaos_experiment_chaos_injected_time gauge
litmuschaos_experiment_chaos_injected_time{chaosresult_name="engine-nginx-pod-delete",chaosresult_namespace="litmus"} 1.609783037e+09
litmuschaos_experiment_chaos_injected_time{chaosresult_name="engine-nginx-container-kill",chaosresult_namespace="litmus"} 0
# HELP litmuschaos_experiment_end_time end time of the experiments
# TYPE litmuschaos_experiment_end_time gauge
litmuschaos_experiment_end_time{chaosresult_name="engine-nginx-pod-delete",chaosresult_namespace="litmus"} 1.609783055e+09
litmuschaos_experiment_end_time{chaosresult_name="engine-nginx-container-kill",chaosresult_namespace="litmus"} 1.61038553e+09
# HELP litmuschaos_experiment_start_time start time of the experiments
# TYPE litmuschaos_experiment_start_time gauge
litmuschaos_experiment_start_time{chaosresult_name="engine-nginx-pod-delete",chaosresult_namespace="litmus"} 1.609783003e+09
litmuschaos_experiment_start_time{chaosresult_name="engine-nginx-container-kill",chaosresult_namespace="litmus"} 1.610385446e+09
# HELP litmuschaos_failed_experiments Total number of failed experiments
# TYPE litmuschaos_failed_experiments gauge
litmuschaos_failed_experiments{chaosresult_name="engine-nginx-pod-delete",chaosresult_namespace="litmus"} 0
# HELP litmuschaos_overall_awaited_experiments Total number of awaited experiments
# TYPE litmuschaos_overall_awaited_experiments gauge
litmuschaos_overall_awaited_experiments{chaosresult_namespace=""} 0
# HELP litmuschaos_overall_experiments_installed_count Total number of experiments
# TYPE litmuschaos_overall_experiments_installed_count gauge
litmuschaos_overall_experiments_installed_count{chaosresult_namespace=""} 1
# HELP litmuschaos_overall_experiments_run_count Total experiments run
# TYPE litmuschaos_overall_experiments_run_count gauge
litmuschaos_overall_experiments_run_count{chaosresult_namespace=""} 4
# HELP litmuschaos_overall_failed_experiments Total number of failed experiments
# TYPE litmuschaos_overall_failed_experiments gauge
litmuschaos_overall_failed_experiments{chaosresult_namespace=""} 0
# HELP litmuschaos_overall_passed_experiments Total number of passed experiments
# TYPE litmuschaos_overall_passed_experiments gauge
litmuschaos_overall_passed_experiments{chaosresult_namespace=""} 4
litmuschaos_failed_experiments{chaosresult_name="engine-nginx-container-kill",chaosresult_namespace="litmus"} 0
# HELP litmuschaos_passed_experiments Total number of passed experiments
# TYPE litmuschaos_passed_experiments gauge
litmuschaos_passed_experiments{chaosresult_name="engine-nginx-pod-delete",chaosresult_namespace="litmus"} 4
litmuschaos_passed_experiments{chaosresult_name="engine-nginx-container-kill",chaosresult_namespace="litmus"} 1
# HELP litmuschaos_probe_success_percentage ProbeSuccesPercentage for the experiments
# TYPE litmuschaos_probe_success_percentage gauge
litmuschaos_probe_success_percentage{chaosresult_name="engine-nginx-pod-delete",chaosresult_namespace="litmus"} 100
litmuschaos_probe_success_percentage{chaosresult_name="engine-nginx-container-kill",chaosresult_namespace="litmus"} 100
```


Expand Down
3 changes: 3 additions & 0 deletions pkg/log/log.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package log

import (
"fmt"

logrus "github.com/sirupsen/logrus"
)

Expand Down Expand Up @@ -30,6 +32,7 @@ func Info(msg interface{}) {
// It also print the extra key values pairs
func InfoWithValues(msg interface{}, val map[string]interface{}) {
logrus.WithFields(val).Infoln(msg)
fmt.Print("\n")
}

// ErrorWithValues log the Error entries happening inside the code
Expand Down

0 comments on commit 4815cf4

Please sign in to comment.