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)

| 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 :)


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.


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
  name: user-management
  namespace: user-domain
    app: user-management
    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 :)

7  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 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.

Leave a comment

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