Ogle.Repository.MySql
1.0.1
See the version list below for details.
dotnet add package Ogle.Repository.MySql --version 1.0.1
NuGet\Install-Package Ogle.Repository.MySql -Version 1.0.1
<PackageReference Include="Ogle.Repository.MySql" Version="1.0.1" />
<PackageVersion Include="Ogle.Repository.MySql" Version="1.0.1" />
<PackageReference Include="Ogle.Repository.MySql" />
paket add Ogle.Repository.MySql --version 1.0.1
#r "nuget: Ogle.Repository.MySql, 1.0.1"
#:package Ogle.Repository.MySql@1.0.1
#addin nuget:?package=Ogle.Repository.MySql&version=1.0.1
#tool nuget:?package=Ogle.Repository.MySql&version=1.0.1
Ogle
Use Ogle with your asp.net core appplication to view logs or analyze custom request metrics to profile your application's health and performance. Ogle searches log files saved on your web server or runs a ditributed search on all of your application's web servers in parallel. The log files do not need to be uploaded to an external log parsing service. Each web application node can save its log files locally.
Ogle is suitable for applications written in .NET 6
Main features
- View log details for a particular request id or a search term

- Browse and download log files on a given server

- Monitor your app's performance and health via log metrics page

Getting Started
- Add
OgleNuGet package to your ASP.NET Core web project - Add Ogle section to your appsettings.json file
"Ogle": {
"LogFolder": "logs",
"LogFilePattern": "Sample-{0:yyyyMMdd}.log",
"AllowedSearchPattern": "\\S{5,}",
"HttpPort": 80,
"HttpsPort": 443,
"Hostnames": [
"localhost"
]
}
- Define
LogGroupKey,LogRecordandLogMetricsclasses (refer to the Example project for details)- LogGroupKey defines the properties to group your logs by. For example: Hostname, endpoint, username or time bucket.
- LogRecord defines the properties that you are interested in harvesting. For example: Number of purchased items, total request time or number of requests in flight
- LogMetrics defines the aggregate metrics that you want to view. For example: Total requests, Failed requests, Maximum requests in flight etc. These metrics are groupped by the LogGroupKey properties.
- In your startup class register Ogle and define all three classes from above as well as the mapping between LogRecord and LogMetrics via a custom
GroupFunction.
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddOgle(builder.Configuration.GetSection("Ogle"), options =>
{
options.GroupKeyType = typeof(LogGroupKey);
options.RecordType = typeof(LogRecord);
options.MetricsType = typeof(LogMetrics);
options.GroupFunction = input => input.Select(i =>
var g = (IGrouping<LogGroupKey,LogRecord>)i;
return new LogMetrics
{
ServerName = g.Key.ServerName,
Endpoint = g.Key.Endpoint,
Timestamp = g.Key.Timestamp,
TotalRequests = g.Count(),
SuccessfulRequests = g.Count(j => j.Succeeded),
MaxRequestsInFlight = g.Max(j => j.RequestsInFlight)
//etc.
};
);
});
- Ogle adds two new endpoints to your application.
- To search and download logs navigate to
/ogle - To view log metrics navigate to
/ogle/metrics
Call to fetch metrics for a given day will be distributed to all web application nodes, which will parse the logs and return the metrics which will then be displayed on the chart and in the table below.
Ogle Repository
Parsing request metrics from the logs is a time consuming task - to shorten metrics response times register one of Ogle Repository NuGet packages.
- Ogle.Repository.File
- Ogle.Repository.MsSqlServer
- Ogle.Repository.MySql
- Ogle.Repository.PostgreSql
- Ogle.Repository.Sqlite
Example repository setting in appsettings.json:
"Ogle": {
"RepositorySettings": {
"ConnectionString": "Data Source=sqlite.db",
"TableName": "RequestMetrics",
"AutoCreateTable": true
}
}
Example repository registration:
var builder = WebApplication.CreateBuilder(args);
var configurationSection = builder.Configuration.GetSection("Ogle:RepositorySettings");
builder.Services.AddOgleSqliteRepository<LogMetrics>(configurationSection);
To save metrics for a given day to a file or database call
/ogle/SaveMetricsFromAllServers?date=yyyy-MM-dd
The endpoint will distribute the request to all web application nodes, the metrics will be collated and saved. The endpoint will respond with a number of metrics saved. Consequtive calls for the same date will overwrite any potential previous data saved for the same date before.
After data is saved, subsequent api calls for log metrics for that date will be read from the repository rather than being calculated on-the-fly from the logs.
Refer to the Example project for details
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- Dapper (>= 2.0.143)
- MySql.Data (>= 8.1.0)
- Ogle.Repository.Sql.Abstractions (>= 1.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 3.0.1 | 158 | 6/6/2025 | |
| 3.0.0 | 179 | 11/22/2024 | |
| 2.1.2 | 156 | 11/20/2024 | |
| 2.1.1 | 158 | 8/7/2024 | |
| 2.1.0 | 131 | 7/31/2024 | |
| 2.0.5 | 147 | 6/10/2024 | |
| 2.0.4 | 162 | 6/6/2024 | |
| 2.0.3 | 155 | 6/6/2024 | |
| 2.0.2 | 159 | 6/3/2024 | |
| 2.0.1 | 162 | 5/31/2024 | |
| 2.0.0 | 168 | 5/29/2024 | |
| 1.3.2 | 166 | 5/15/2024 | |
| 1.3.1 | 167 | 5/15/2024 | |
| 1.3.0 | 144 | 5/15/2024 | |
| 1.2.6 | 183 | 3/8/2024 | |
| 1.2.5 | 279 | 12/12/2023 | |
| 1.2.4 | 193 | 11/6/2023 | |
| 1.2.3 | 176 | 11/1/2023 | |
| 1.2.2 | 186 | 10/25/2023 | |
| 1.2.1 | 200 | 9/19/2023 | |
| 1.2.0 | 184 | 9/6/2023 | |
| 1.1.2 | 182 | 8/29/2023 | |
| 1.1.1 | 198 | 8/23/2023 | |
| 1.1.0 | 205 | 8/22/2023 | |
| 1.0.6 | 223 | 8/15/2023 | |
| 1.0.5 | 224 | 8/8/2023 | |
| 1.0.4 | 246 | 8/7/2023 | |
| 1.0.3 | 247 | 8/7/2023 | |
| 1.0.2 | 269 | 8/7/2023 | |
| 1.0.1 | 266 | 7/25/2023 | |
| 1.0.0 | 240 | 7/20/2023 |