<commit_before>= Hawkular Alerts with OpenTracing
<NAME>
2017-09-06
:jbake-type: post
:jbake-status: published
:jbake-tags: blog, alerts, opentracing, jaeger
:figure-caption!:

Two recent blogs discuss how OpenTracing instrumentation can be used to collect application metrics:

* http://www.hawkular.org/blog/2017/06/26/opentracing-appmetrics.html
* http://www.hawkular.org/blog/2017/08/opentracing-appmetrics-canary.html

A further interesting integration can be the addition of Hawkular Alerts to the environment.

As the previous http://www.hawkular.org/blog/2017/08/alerts-multiple-sources.html[blog] and https://www.youtube.com/watch?v=mM1mwJneKO4[demo] discuss, Hawkular Alerts is a generic, federated alerts system that can trigger events, alerts, and notifications from different, independent systems such as Prometheus, ElasticSearch, and Kafka.

Here we can combine the two. Let's follow the directions for the OpenTracing demo (using the Jaeger implementation) and add Hawkular Alerts.

What this can show is OpenTracing application metrics triggering alerts when (as in this example) OpenTracing spans encounter a larger-than-expected error rates.

(Note: these instructions assume you are using Kubernetes / Minikube - see the Hawkular OpenTracing blogs linked above for more details on these instructions)

=== START KUBERNETES

Here we start minikube giving it enough resources to run all of the pods necessary for this demo. We also start up a browser pointing to the Kubernetes dashboard, so you can follow the progress of the remaining instructions.

```
minikube start --cpus 4 --memory 8192

minikube dashboard
```

=== DEPLOY PROMETHEUS

```
kubectl create -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/bundle.yaml
<commit_msg>use fixed version for bundle.yaml<commit_after>= Hawkular Alerts with OpenTracing
<NAME>
2017-09-06
:jbake-type: post
:jbake-status: published
:jbake-tags: blog, alerts, opentracing, jaeger
:figure-caption!:

Two recent blogs discuss how OpenTracing instrumentation can be used to collect application metrics:

* http://www.hawkular.org/blog/2017/06/26/opentracing-appmetrics.html
* http://www.hawkular.org/blog/2017/08/opentracing-appmetrics-canary.html

A further interesting integration can be the addition of Hawkular Alerts to the environment.

As the previous http://www.hawkular.org/blog/2017/08/alerts-multiple-sources.html[blog] and https://www.youtube.com/watch?v=mM1mwJneKO4[demo] discuss, Hawkular Alerts is a generic, federated alerts system that can trigger events, alerts, and notifications from different, independent systems such as Prometheus, ElasticSearch, and Kafka.

Here we can combine the two. Let's follow the directions for the OpenTracing demo (using the Jaeger implementation) and add Hawkular Alerts.

What this can show is OpenTracing application metrics triggering alerts when (as in this example) OpenTracing spans encounter a larger-than-expected error rates.

(Note: these instructions assume you are using Kubernetes / Minikube - see the Hawkular OpenTracing blogs linked above for more details on these instructions)

=== START KUBERNETES

Here we start minikube giving it enough resources to run all of the pods necessary for this demo. We also start up a browser pointing to the Kubernetes dashboard, so you can follow the progress of the remaining instructions.

```
minikube start --cpus 4 --memory 8192

minikube dashboard
```

=== DEPLOY PROMETHEUS

```
kubectl create -f https://raw.githubusercontent.com/coreos/prometheus-operator/v0.11.0/bundle.yaml

{'fraction_non_alphanumeric': 0.07537125245166713, 'fraction_numerical': 0.020734099187447463, 'mean_word_length': 5.030405405405405, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3748264', 'n_tokens_mistral': 1095, 'n_tokens_neox': 989, 'n_words': 404}