Setting up Nuclio with AKS, Application Insights, and Grafana

On This Page

Application Insights overview

Microsoft Azure Application Insights is an extensible Application Performance Management (APM) service for web developers on multiple platforms. Use it to monitor your live web application. It will automatically detect performance anomalies. It includes powerful analytics tools to help you diagnose issues and to understand what users actually do with your app. It’s designed to help you continuously improve performance and usability. It works for apps on a wide variety of platforms including .NET, Node.js and J2EE, hosted on-premises or in the cloud. For more information about Application Insights, see Microsoft’s product overview.

Create a new Application Insights account and obtain the instrumentation key

See the Application Insights documentation for information on how to set up a new Application Insights account, and obtain your instrumentation key, as you’ll use it later in the guide.

Set up Nuclio on Microsoft’s Azure Container Service (AKS)

Send metrics telemetry to Azure Application Insights

Nuclio abstracts the metrics sink. You inject into the platform config which metric implementation to use, and the Nuclio internal communicates with the abstract layer of the metrics sink, agnostic to the implementation.

Configuring the platform

In Kubernetes, a platform configuration is stored as a ConfigMap named platform-config in the namespace of the function.

You’ll create a ConfigMap in the Nuclio namespace from a local file called platform.yaml.
Create a new file on your computer called platform.yaml. The system expects this specific name.

Visualize your Application Insights using Grafana

Grafana is the leading tool for querying and visualizing time series and metrics.

To use Grafana, you first need to install it in your cluster.
You’ll do this by using helm, the package manager for Kubernetes, and the Grafana chart.
If you are unfamiliar with helm, read more about it here.

To allow Grafana to display data from Application Insights, the Azure Monitor plugin, developed by Grafana, is required.

To add the plugin, create a new file named values.yaml. Copy the following values to this file, and edit relevant values, such as persistence, adminUser, adminPassword, and plugins.

Finally, see the provided sample Grafana JSON file (grafana-sample-dashboard.json), which you can import from the Grafana dashboard: from the menu (plus icon — +) select Create > Import and upload the sample JSON file.

Further metric analysis using Application Insights

Go to your Application Insights account. You’ll be able to query your tables for information. The query language is using Kusto.