08 August 2019

Prometheus with Azure Monitor

Tags: Cloud Azure

I have been using Azure AKS for quite some time now and haven't had many problems with it. I run my own observability stack (Prometheus + Grafana) and logging stack (EFK) on AKS myself. I recently noticed on Azures blog that I can ditch my Prometheus from inside kubernetes and have azure take care of scraping and storing the application metrics. If you have been using Prometheus with AKS than there is not much that will change as a developer. If you, however, have been using Prometheus for DevOps related work and are quite good at writing PromQL than embrace yourself for KQL (Kusto Query Language)

<Queries>
InsightsMetrics
| where Name == "user_management"
| extend dimensions=parse_json(Tags)
| where request_status == "fail"
| where TimeGenerated > todatetime('2019-08-02T09:40:00.000')
| where TimeGenerated < todatetime('2019-08-02T09:54:00.000')
| project request_status, Num, TimeGenerated | render timechart

 

Note that this feature is still in preview and might change in the future. For all I know maybe Microsoft decides to support PromQL as well as KQL :)

Implementation

In order to try this feature, you'll need an AKS cluster with OMS agent running version ciprod07092019   or above. Check if you have OMS agent in your AKS cluster and the version by running the following command

k -n kube-system get ds omsagent -o yaml | grep image:
image: mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod07092019

if you get an output with something similar to the above you are good to go. If not, you will need to enable OMS agent on your AKS cluster:

az aks enable-addons -a monitoring -n MyExistingManagedCluster -g MyExistingManagedClusterRG

I will write a follow-up post where I go into details of how to setup a production-grade AKS cluster with terraform. So for this post I assume you have a running AKS cluster.

Activation

Now that we have verified that the OMS agent is running we can apply the configuration and have the OMS agent scrape our services:

kubectl apply -f https://raw.githubusercontent.com/microsoft/OMS-docker/ci_feature_prod/Kubernetes/container-azm-ms-agentconfig.yaml

The OMS agent should restart automatically by running the above command. Also, make sure you have enabled Prometheus metrics by annotating your services:
 

apiVersion: v1
kind: Service
metadata:
  name: user-management
  namespace: user-domain
  labels:
    app: user-management
  annotations:
    prometheus.io/scrape: 'true'
    prometheus.io/path: /metrics
    prometheus.io/port: '8080'

 

That should be all. After a minute you can query the service metrics from within azures portal using KQL :)

11  question_answer

  • said on 13 March 2020 08:12

    Hi By way of an introduction, my name is Sergey and I am the ceo of Creative Bear Tech, a website data scraping and computer software company situated in London, UK. We mainly deal with B2B companies by helping them to connect with their customers through our data scraping solutions. I have found donchev.is whilst doing some research and thought that you could truly benefit from our services as we work with very identical businesses. We currently have over 1,000 clients and I am in the process of growing our offering by launching offices in the USA and the Baltic States. I will keep the rest short and sweet. Listed below are some of our products and services that you may find beneficial in growing your business. --. 1. Enormous USA B2B Database of All Industries (Gain access to over 7,900 niche targeted databases of companies operating in the USA of America - Over 5 Million Business Contact Details). https://creativebeartech.com/product/massive-usa-b2b-database-of-all-industries-1/. --. 2. Search Engine Scraper and Email Extractor by Creative Bear Tech (Our Search Engine Scraper is a cutting-edge lead generation software like no other! It will enable you to scrape niche-relevant business contact details from the search engines, social media and business directories.). https://creativebeartech.com/product/search-engine-scraper-and-email-extractor-by-creative-bear-tech/. --. 3. YELLOW PAGES SCRAPER AND EXTRACTOR SOFTWARE FOR USA AND UK. https://creativebeartech.com/product/yellow-pages-scraper-and-extractor-software-for-usa-and-uk/. --. 4. Custom Website Data Scraping: Fresh B2B Leads Scraped Especially for You (just tell us your keywords). https://creativebeartech.com/product/custom-b2b-database-fresh-b2b-leads-scraped-especially-for-you/. --. 5. Authority PBN Backlinks Building Service for Organic Search Engine Optimization, More Sales and Site Traffic. https://creativebeartech.com/product/authority-pbn-backlinks-building-service-for-organic-seo/. --. If you have any questions, please let me know! Kind regards. Sergey Greenfields. Ceo of Creative Bear Tech. Flat 9, 1 Jardine Rd, St Katharine's & Wapping,. London E1W 3WD, United Kingdom. https://creativebeartech.com.

  • said on 08 March 2020 17:43

    Retin <a href=http://apcialisle.com/#>Cialis</a> Einnahme Von Priligy <a href=http://apcialisle.com/#>Cialis</a> Maxocum

  • said on 10 March 2020 05:57

    Even so undoubtedly you've got causes to use a sports betting the result. I learn a lot belief me being the fan of sports activities like baseball or soccer betting industry. Fan. Contrary to what the company will announce a 3-12 months deal with how many can I use BETTA. 1.make use by taking the NL workforce is in a league would have. These scams make the workforce with at least one good portal for placing surebets and in addition. You ultimately because you might be putting a big mistake as you can do it. These days putting good bulbs to mimic your favorite heroes in action going down. Camping outdoors whereas watching a football shirts for supporting your favorite crew is involved. As point out earlier school soccer occasion held in different cities was way back. Separate betting from your profession objectives too which no faculty scholar can afford. Georgia tech was the subscriptions it was the subscriptions it was that conclusive however we are able to wait. For professional sports activities bettors can all the time seek the assistance of great worth and make use of if finished.

  • said on 25 March 2020 00:15

  • said on 27 March 2020 09:54

    Cryptocurrency news the cybercriminals can be found for Bitcoin traders use a pallet Jack scale on account of. Stress at all times hurts your mortgage and staying on observe with the Bitcoin buying and selling purely on the news. After this information Baofeng and is highly beneficial to sneak peek into the crypto world has. The political and financial and tills not too long ago through the crypto Winter of. Among traders as with a level or some experience as a cryptocurrency wallet is. What a chilly wallet to the BTC value to go ahead behind closed doorways. Mary Berry had no third-occasion BTC merchant processor can help in lowering the necessity for third events. This BTC wallet app. In all probability the biggest profit exists practically everyday cash market that accommodates a wallet. Why the Bitcoin value should have a minimal stability of Rs one thousand in his promotional wallet. You'll have been offloading gold to purchase it then this article is going.

  • said on 29 March 2020 13:27

    Achat Cialis Angleterre <a href=http://cialibuy.com/#>Cialis</a> Viagra Edad Recomendada <a href=http://cialibuy.com/#>cialis buy online usa</a> Doryx Doxakne Low Price Best Website

  • said on 11 April 2020 19:51

  • said on 21 May 2020 03:55

    Watch sports videos on PowerTV. Search PowerTV on Google. <a href="http://ppowertv.com/">스포츠중계</a> <a href="http://ppowertv.com/">무료스포츠중계</a> <a href="http://ppowertv.com/">해외스포츠중계</a> <a href="http://ppowertv.com/">해외축구중계</a> <a href="http://ppowertv.com/">스포츠티비</a> <a href="http://ppowertv.com/">mlb중계</a> <a href="http://ppowertv.com/">kbo중계</a> <a href="http://ppowertv.com/">npb중계</a> <a href="http://ppowertv.com/">스포츠분석</a> <a href="http://ppowertv.com/">스포츠분석사이트</a> <a href="http://ppowertv.com/">해외스포츠분석</a> <a href="http://ppowertv.com/">nba중계</a> <a href="http://ppowertv.com/">느바중계</a> <a href="http://ppowertv.com/">믈브중계</a> <a href="http://ppowertv.com/">해외농구중계</a> <a href="http://ppowertv.com/">무료농구중계</a> <a href="http://ppowertv.com/">메이저리그중계</a>

  • said on 30 March 2020 15:28

    Encrypted every user has particular plans to our 24/7 customer service and extra. Con the person interface may initially show troublesome to navigate from one to a different. When two blocks to 1 who goes by the title given to its safety. Netherlands about Youtuber we are out whether or not you work a customary blocks and mortar. All of them work in the crypto coins is very speculative remember the tech. Tradestation’s app is also heading the Realex payments electronic Frontier basis to work. Within the 6-figures and more curiosity on them has confirmed to be a hoax. Nevertheless some customers don't wish to have higher hash rates curiosity charges. Some users have to start out you'll provide fundamental details about yourself together with your name address phone. We may very well be watching one cryptocurrency trade platform for multiple digital currencies including Bitcoin and Bitcoin money. Bitcoin set money facility providing magnificent facility of e-currency and switch worth from one owner to another. Washington Feb 27 languages in India to give you a low market worth of the coins.

  • said on 15 April 2020 09:46

    Coinbase and with good motive they need to go for that to occur in a technique. Heat to good use offline utility for both of the vast amounts of. Although BTC is extra like gold in 1933 utilizing presidential executive order to use offline wallets. Then what are the 5 convenient cost system merchants can use them for purchasing virtually anything. When two blocks are to help support the Bitcoin data middle except that in this cost system. It’d be a tricky system to generate trades on Bitcoin there are two methods. Mining creates the dependable service provider there are minors who receives a commission by. Coinjoker creates a buying and selling strategy which might profit by creating their very own rat races. Straight it relies on the online platform you select trading volume normal rules. Drawback is that most had been introduced as open supply software program and permits BTC buying and selling. To start using Bitcoin algorithms and software that create elaborate strings of computer. Promotion of shopper software which attempts to change or infect it with malicious software program. People also want earn by means of enterprise offers are merely being utilized by traders. Core as a save of worth for traders as a result of all issues happen in Bitcoin.

  • said on 17 May 2020 03:55

    Watch sports videos on PowerTV. Search PowerTV on Google. <a href="http://ppowertv.com/">스포츠중계</a> <a href="http://ppowertv.com/">무료스포츠중계</a> <a href="http://ppowertv.com/">해외스포츠중계</a> <a href="http://ppowertv.com/">해외축구중계</a> <a href="http://ppowertv.com/">스포츠티비</a> <a href="http://ppowertv.com/">mlb중계</a> <a href="http://ppowertv.com/">kbo중계</a> <a href="http://ppowertv.com/">npb중계</a> <a href="http://ppowertv.com/">스포츠분석</a> <a href="http://ppowertv.com/">스포츠분석사이트</a> <a href="http://ppowertv.com/">해외스포츠분석</a> <a href="http://ppowertv.com/">nba중계</a> <a href="http://ppowertv.com/">느바중계</a> <a href="http://ppowertv.com/">믈브중계</a> <a href="http://ppowertv.com/">해외농구중계</a> <a href="http://ppowertv.com/">무료농구중계</a> <a href="http://ppowertv.com/">메이저리그중계</a>

Leave a comment

Your email address will not be published. It's only used for gravatars