KiBoards.Management
0.1.0
dotnet add package KiBoards.Management --version 0.1.0
NuGet\Install-Package KiBoards.Management -Version 0.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="KiBoards.Management" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add KiBoards.Management --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: KiBoards.Management, 0.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install KiBoards.Management as a Cake Addin #addin nuget:?package=KiBoards.Management&version=0.1.0 // Install KiBoards.Management as a Cake Tool #tool nuget:?package=KiBoards.Management&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
KiBoards.Management
A library for managing Kibana settings and saved objects.
Quick Start
Add the Kibana saved objects file into your project and set it to be copied to the output.
<ItemGroup>
<None Update="Test.ndjson">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
Create a hosted service for the Kibana client that waits for Kibana and imports saved objects from the file.
public class KibanaClientHostedService : BackgroundService
{
private readonly KibanaHttpClient _kibanaClient;
private readonly ILogger<KibanaClientHostedService> _logger;
public KibanaClientHostedService(KibanaHttpClient kibanaClient, ILogger<KibanaClientHostedService> logger)
{
_kibanaClient = kibanaClient;
_logger = logger;
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (true)
{
try
{
var status = await _kibanaClient.GetStatus(stoppingToken);
_logger.LogInformation($"Kibana {status.Version.Number} status is {status.Status.Overall.Level}: {status.Status.Overall.Summary}");
if (string.Equals(status.Status.Overall.Level, "available", StringComparison.OrdinalIgnoreCase))
break;
}
catch (Exception ex)
{
_logger.LogWarning(ex, "Get kibana status failed.");
}
await Task.Delay(TimeSpan.FromSeconds(5), stoppingToken);
}
try
{
_logger.LogInformation("Importing saved objects");
await _kibanaClient.ImportSavedObjectsAsync("Test.ndjson", stoppingToken);
_logger.LogInformation("Saved objects imported successfully");
}
catch (Exception ex)
{
_logger.LogError(ex, "Saved objects import failed.");
}
}
}
Add the Kibana HTTP client and hosted service to the service collection.
builder.Services.AddHttpClient<KibanaHttpClient>(client => client.BaseAddress = new Uri("http://localhost:5601"));
builder.Services.AddHostedService<KibanaClientHostedService>();
Created from JandaBox Box icon created by Freepik - Flaticon
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- System.Net.Http.Json (>= 8.0.0)
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 |
---|---|---|
0.1.0 | 134 | 5/24/2024 |