Changes

Openshift - HAproxy metrics EN

10 bytes added, 21:02, 19 November 2019
Using HAproxy Metric Endpoint
A Let's look at the logs in the side card container running on the Promethues pod-ban futó side card konténerbe nézzük meg a logokat (ez felelős a konfiguráció újra töltéséértresponsible for reloading the configuration). Látnunk kell, hogy újra töltötte a konfigurációtYou should see that you have reloaded the configuration.
<pre>
# kubectl logs -c prometheus-server-configmap-reload prometheus-server-75c9d576c9-gjlcr -n mynamespace
Ugyan ezt látni kell, ha a The same thing is to be seen when looking at the promethues server konténerének a logját nézzükcontainer log: <prePre># kubectl logs -c prometheus-server prometheus-server-75c9d576c9-gjlcr -n mynamespace
...
level=info ts=2019-07-22T20:25:36.016Z caller=main.go:730 msg="Loading configuration file" filename=/etc/config/prometheus.yml</prePre>
Ezek utánNext, ha megnyitjuk a open the Promethues target oldalt a konzolonpage on the console: http://mon.192.168.42.185.nip.io/targets:[[File:ClipCapIt-190722-233253.PNG]]Ha több router lenne a klaszterbenIf there were more routers in the cluster, akkor azok mind feltűnnének itt mint külön végpontokthey would all appear here as separate endpoints.
<br>
<br>
==Metrika fajtákMetric varieties ==http://people.redhat.com/jrivera/openshift-docs_preview/openshift-origin/glusterfs-review/architecture/networking/haproxy-router.html<br>
Első ránézésre két értelmes metrikát találhatunk a At first glance, there are two meaningful metrics in HAproxy repertoárjában's repertoire. Ezek az alábbiakThese are:
<br>
===haproxy_server_http_responses_total===Megmutatja Shows per backend-enként hogy hángy how many women responded with 200-as és hány and 500-as with http státuszú választ adott egy adott status for a given service. Itt nincs There is no pod alapú bontásbased breakdown here. Sajnos a Unfortunately, we do not receive information on http 300 és and 400-as hibákról nem kapunk információterrors. Ezeket is majd az We will also get these from the access log-ból tudjuk kinyerni
<br>
<br>
Generáljuk Let's generate a teszt alkalmazással egy 200-as választanswer using the test application. Látunk kell, hogy a We need to see the counter egyel megnőgrow by one: http://test-app-service-mynamespace.192.168.42.185.nip.io/test/slowresponse/1/200<prePre>haproxy_server_http_responses_total{code="2xx",jobJob ="openshift-router",namespace="mynamespace",pod="testbody-app",route="testbody-app-service",service="testbody-app-service"} 1</prePre>
<br>
Generáljuk Let's generate a teszt alkalmazással egy 500-as választanswer using the test application. Látunk kell, hogy a We need to see the counter egyel megnőgrow by one: http://test-app-service-mynamespace.192.168.42.185.nip.io/test/slowresponse/1/500<prePre>haproxy_server_http_responses_total{code="5xx",job="openshift-router",namespace="mynamespace",pod="testbody-app",route="testbody-app-service",service="testbody-app-service"} 1</prePre>
<br>
<br>
===haproxy_server_response_errors_total===
<pre>