In this article, We learn about IcM and kusto. I will try to discuss further as much as I can, and just follow clearly.
For more updates please do Subscribe via Email:
What is IcM?
Microsoft Azure Incident Management System in shorter term is IcM.
IcM is a term describing the activities of an organization to identify, analyze, and correct hazards to prevent a future re-occurrence. If not managed, an incident can escalate into an emergency, crisis or a disaster.
The first goal of the incident management process is to restore a normal service operation as quickly as possible and to minimize the impact on business operations, thus ensuring that the best possible levels of service quality and availability are maintained.
What is Kusto?
Kusto is a query language designed for big data workloads particularly using large amount of data in from things like logs and event sources. Kusto query is a read-only request to process data and return results. KQL is the first party query language for Kusto cluster used by Azure Data Explorer. Kusto Query is only good for pulling or getting data from the data bank.
For more details about kusto just click the link
Data Pull
Let’s Go!.
First you need to install nuget package for kusto connection builder. Just search in nuget package.
to Install this in Package manager console,
Install-Package Microsoft.Azure.Kusto.Data -Version 10.0.1
or refer this link: https://www.nuget.org/packages/Microsoft.Azure.Kusto.Data/
After install this packages, run this code in your IDE.
- Main Code.
ClientRequestProperties clientRequestProperties = new ClientRequestProperties() { ClientRequestId = Guid.NewGuid().ToString() };
string tenantId = "--tenant Identifier-";
string icmClusterServiceURI = "-- IcM Cluster Service URI--";
string clientSecret = "--Client--Secret--";
string icmClusterDatabase = "-- IcM Database --";
string ActiveDirectoryClientId = "AAD Client ID";
string query = "---KUSTO QUERY HERE --";
KustoConnectionStringBuilder connectionStr = new KustoConnectionStringBuilder(icmClusterServiceURI + "/" + icmClusterDatabase)
.WithAadApplicationKeyAuthentication(applicationClientId: ActiveDirectoryClientId,
applicationKey: clientSecret, authority: tenantId);
var queryProvider = Kusto.Data.Net.Client.KustoClientFactory.CreateCslQueryProvider(connectionStr);
var result = queryProvider.ExecuteQuery<IcMModel>(icmClusterDatabase, query, clientRequestProperties).ToList();
Now the result of this code is List, If you want to change the result into DataTable. You need to change the ToList() into ToDataTable().
var result = queryProvider.ExecuteQuery<IcMModel>(icmClusterDatabase, query, clientRequestProperties).ToDataTable();
- IcMModel
public class IcMModel
{
public int Id;
public string Incident;
public string Description;
….
….
….
}
If you have question and clarification, please feel free to comment below.
Thank you for visiting my blog site. Hoping you learn more here. please feel free to comment and suggest if there is need to enhance and update. thank you.
Related Topics
How to Concatenate string in Kusto Query Language (KQL)
In this article, we learn on how to concatenate strings in Kusto Query Language (KQL) , Just follow and ready clearly. For more updates please do Subscribe […]
How to use order operator in Kusto Query Language (KQL)
In this article, we learn on how to use Where Operator in Kusto Query Language (KQL) , Just follow and ready clearly. For more updates […]
How to use extend operator in Kusto Query Language (KQL)
In this article, we learn on how to use Extend Operator in Kusto Query Language (KQL) , Just follow and ready clearly. For more updates […]
How to use “AS” operator in Kusto Query Language (KQL)
In this article, we learn on how to use As Operator in Kusto Query Language (KQL) , Just follow and ready clearly. For more updates […]
How to use Limit Operator in Kusto Query Language (KQL)
In this article, we learn on how to use Limit Operator in Kusto Query Language (KQL) , Just follow and ready clearly. For more updates […]
How to use Distinct Operator in Kusto Query Language (KQL)
In this article, we learn on how to use Distinct Operator in Kusto Query Language (KQL) , Just follow and ready clearly. For more updates […]
How To Use Count Operator In Kusto Query Language (KQL)
In this article, we learn on how to use Count Operator in Kusto Query Language (KQL) , Just follow and ready clearly. For more updates […]
How to implement datetime range in Kusto Query Language (KQL) using Between Operator
In this article, we learn on how to implement datetime range in Kusto Query Language (KQL) , Just follow and ready clearly. For more updates […]
How To Implement Kusto Query Language (KQL) Using Where Operator
In this article, we learn on how to use Where Operator in Kusto Query Language (KQL) , Just follow and ready clearly. For more updates […]
How to connect your Azure Kusto Database in Kusto Explorer Desktop
In this article, We learn how to connect Azure Kusto Database in Kusto Explorer Desktop, I will show how to do it, and just follow […]
Pulling IcM data using kusto query in C#
In this article, We learn about IcM and kusto. I will try to discuss further as much as I can, and just follow clearly. For […]
Join table in Kusto Query Language (KQL)
In this article, We learn how to join two or more tables in Kusto Query Language (KQL). I will show how to do it, and […]
Kusto Query Language (KQL)
In this article, We learn about Kusto Query Language (KQL), I will explain furthered and detailed as I can. Just follow and read clearly about […]
Others
How to create a personal access token in Azure DevOps
In this article, We learn how to create a Personal Access Token in Azure DevOps. I will show how […]
How to save the composed mail into outlook draft using http request in logic apps
In this article, We learn how to saved the composed mail into outlook draft using HTTP request in Logic […]
How to compose email and save email draft in outlook using C#
How to compose email and save email draft in outlook using C# […]
How to convert base64 string format of excel file into DataTable form of data type using C#
In this article, We learn how to convert base64 string format of excel file into Data Table form of […]
How to convert data from Aspose.Cells.Worksheet to DataTable using C#
How to conversion of data from Aspose.Cells.Worksheet to DataTable using C# […]
How to create logic apps in Azure
In this article, We learn how to create logic apps in Azure. I will show how to do it, […]