Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained
3.2.0.831
Prefix Reserved
See the version list below for details.
Requires NuGet 3.3.0 or higher.
dotnet add package Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained --version 3.2.0.831
NuGet\Install-Package Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained -Version 3.2.0.831
<PackageReference Include="Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained" Version="3.2.0.831" />
paket add Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained --version 3.2.0.831
#r "nuget: Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained, 3.2.0.831"
// Install Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained as a Cake Addin #addin nuget:?package=Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained&version=3.2.0.831 // Install Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained as a Cake Tool #tool nuget:?package=Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained&version=3.2.0.831
FabricObserver 3.2.0.831
This version is built for .NET Core 3.1 and SF Runtime >= 8.0
FabricObserver (FO) is a complete implementation of a production-ready, generic resource usage watchdog service written as a stateless, singleton Service Fabric .NET Core 3.1 application that
- Monitors a broad range of machine resources that tend to be very important to all Service Fabric applications, like disk space consumption, CPU use, memory use, endpoint availability, ephemeral TCP port use, and app/cluster certificate health out-of-the-box.
- Runs on multiple versions of Windows Server and Ubuntu 16.04 and 18.04
- Provides an easy-to-use extensibility model for creating custom Observers out of band (so, you don't need to clone the repo to build an Observer). See ContainerObserver for a complete plugin impl that extends FO with SF container app resource monitoring and alerting (note that this observer is built into FO as of version 3.1.17).
- Supports Configuration Setting Application Updates for any observer for any supported setting.
- Is actively developed completely in the open. The latest code (generally in flight and not meant for production) lives in the develop branch. It is highly recommended that you only deploy code built from the main branch into your production clusters.
FO is a Stateless Service Fabric Application composed of a single service that runs on every node in your cluster, so it can be deployed and run alongside your applications without any changes to them. Each FO service instance knows nothing about other FO instances in the cluster, by design.
If you run your apps on Service Fabric, then you should definitely consider deploying FabricObserver to all of your clusters (Test, Staging, Production).
Using FabricObserver
To quickly learn how to use FO, please see the simple scenario-based examples.
How it works
Application Level Warnings:
Node Level Warnings:
Node Level Machine Info:
When FabricObserver gracefully exits or updates, it will clear all of the health events it created.
FabricObserver comes with a number of Observers that run out-of-the-box. Observers are specialized objects that monitor, point in time, specific resources in use by user service processes, SF system service processes, containers, virtual/physical machines. They emit Service Fabric health reports, diagnostic telemetry and ETW events, then go away until the next round of monitoring. The resource metric thresholds supplied in the configurations of the built-in observers must be set to match your specific monitoring and alerting needs. These settings are housed in Settings.xml and ApplicationManifest.xml. The default settings are useful without any modifications, but you should design your resource usage thresholds according to your specific needs.
When a Warning threshold is reached or exceeded, an observer will send a Health Report to Service Fabric's Health management system (either as a Node or Application Health Report, depending on the observer). This Warning state and related reports are viewable in SFX, the Service Fabric EventStore, and Azure's Application Insights/LogAnalytics/ETW, if enabled and configured.
Most observers will remove the Warning state in cases where the issue is transient, but others will maintain a long-running Warning for applications/services/nodes/security problems observed in the cluster. For example, high CPU usage above the user-assigned threshold for a VM or App/Service will put a Node into Warning State (NodeObserver) or Application Warning state (AppObserver), for example, but will soon go back to Healthy if it is a transient spike or after you mitigate the specific problem 😃. An expiring certificate Warning from CertificateObsever, however, will remain until you update your application's certificates (Cluster certificates are already monitored by the SF runtime. This is not the case for Application certificates, so use CertificateObserver for this, if necessary).
Read more about Service Fabric Health Reports
FO ships with both an Azure ApplicationInsights and Azure LogAnalytics telemetry implementation. Other providers can be used by implementing the ITelemetryProvider interface.
For more information about the design of FabricObserver, please see the Design readme.
Note: By default, FO runs as NetworkUser on Windows and sfappsuser on Linux. If you want to monitor SF service processes that run as elevated (System) on Windows, then you must also run FO as System on Windows. There is no reason to run as root on Linux under any circumstances (see the Capabilities binaries implementations, which allow for FO to run as sfappsuser and successfully execute specific commands that require elevated privilege).
For Linux deployments, we have ensured that FO will work as expected as normal user (non-root user). In order for us to do this, we had to implement a setup script that sets Capabilities on three proxy binaries which can only run specific commands as root.
Configuration Change Support
When a new version of FabricObserver ships, often (not always) there will be new configuration settings, which requires customers to manually update the latest ApplicationManifest.xml and Settings.xml files with their preferred/established settings (current). In order to remove this manual step when upgrading, we wrote a simple tool that will diff/patch FO config (XML-only) automatically, which will be quite useful in devops workflows. Please try out XmlDiffPatchSF and use it in your pipelines or other build automation systems. It should save you some time.
Observer Model
FO is composed of Observer objects (instance types) that are designed to observe, record, and report on several machine-level environmental conditions inside a Windows or Linux (Ubuntu) VM hosting a Service Fabric node.
Here are the current observers and what they monitor:
Resource | Observer |
---|---|
Application (services) resource usage health monitoring across CPU, File Handles, Memory, Ports (TCP), Threads | AppObserver |
Looks for dmp and zip files in AppObserver's MemoryDumps folder, compresses (if necessary) and uploads them to your specified Azure storage account (blob only, AppObserver only, and still Windows only in this version of FO) | AzureStorageUploadObserver |
Application (user) and cluster certificate health monitoring | CertificateObserver |
Container resource usage health monitoring across CPU and Memory | ContainerObserver |
Disk (local storage disk health/availability, space usage, IO) | DiskObserver |
SF System Services resource usage health monitoring across CPU, File Handles, Memory, Ports (TCP), Threads | FabricSystemObserver |
Networking - general health and monitoring of availability of user-specified, per-app endpoints | NetworkObserver |
CPU/Memory/File Handles(Linux)/Firewalls(Windows)/TCP Ports usage at machine level | NodeObserver |
OS/Hardware - OS install date, OS health status, list of hot fixes, hardware configuration, AutoUpdate configuration, Ephemeral TCP port range, TCP ports in use, memory and disk space usage | OSObserver |
Service Fabric Configuration information | SFConfigurationObserver |
Another resource you find important | Observer that you implement |
To learn more about the current Observers and their configuration, please see the Observers readme.
Just observe it.
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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- Microsoft.ApplicationInsights (>= 2.20.0)
- Microsoft.ApplicationInsights.DependencyCollector (>= 2.20.0)
- Microsoft.ApplicationInsights.NLogTarget (>= 2.20.0)
- Microsoft.ApplicationInsights.PerfCounterCollector (>= 2.20.0)
- Microsoft.ApplicationInsights.WindowsServer (>= 2.20.0)
- Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel (>= 2.20.0)
- Microsoft.AspNet.WebApi.Client (>= 5.2.9)
- Microsoft.Extensions.DependencyInjection (>= 5.0.2)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 5.0.0)
- Microsoft.ServiceFabric.Services (>= 5.0.516)
- Microsoft.Win32.Registry (>= 5.0.0)
- NLog (>= 5.0.0)
-
.NETStandard 2.0
- No dependencies.
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.3.0 | 224 | 8/7/2024 |
3.2.15 | 583 | 3/20/2024 |
3.2.14 | 784 | 1/31/2024 |
3.2.13 | 746 | 1/19/2024 |
3.2.12 | 1,182 | 12/21/2023 |
3.2.11 | 1,573 | 9/25/2023 |
3.2.10.2 | 1,377 | 9/8/2023 |
3.2.10 | 1,480 | 9/7/2023 |
3.2.9 | 1,825 | 8/14/2023 |
3.2.8 | 1,972 | 5/15/2023 |
3.2.7 | 1,979 | 4/27/2023 |
3.2.6 | 2,107 | 3/17/2023 |
3.2.5 | 1,997 | 3/7/2023 |
3.2.4.960 | 2,117 | 12/8/2022 |
3.2.4.831 | 1,930 | 12/8/2022 |
3.2.3.960 | 2,031 | 10/19/2022 |
3.2.3.831 | 2,103 | 10/19/2022 |
3.2.2.960 | 1,983 | 9/27/2022 |
3.2.2.831 | 2,135 | 9/27/2022 |
3.2.1.960 | 2,240 | 8/22/2022 |
3.2.1.831 | 2,316 | 8/22/2022 |
3.2.0.960 | 2,257 | 7/13/2022 |
3.2.0.831 | 2,353 | 7/12/2022 |
- This is a relatively major release with significant changes. Many of these will be transparent to you except for the new service deployment model (removal of DefaultServices from ApplicationManifest.xml to support ARM deployment).
- Support for ARM deployment, including "one-click" ARM deployments (Deploy to Azure button).
- For CLI/PowerShell deployments, you must now create an instance of fabric:/FabricObserver/FabricObserver service as the last step.
- IMPORTANT: This version requires SF runtime versions 8.0 and above and .NET Core 3.1.x. Note that 3.2.0.831 will be the last major release of FO to support .NET Core 3.1, which will hit its EOL in 12/2022.
- AppObserver now generates ServiceHealthReport health reports, which will put service entities into Error or Warning depending upon your configuration thresholds. There are breaking changes to FO's health reporter API. See below.
- ObserverLogger.LogEtw now supports TelemetryData type (so, you don't have to duplicate its members in an anonymous type).
- ObserverHealthReporter no longer takes a FabricClient parameter (breaking change).
- HealthReport.ReportType has been replaced with HealthReport.EntityType (breaking change). HealthReportType enum no longer exists. It has been replaced with EntityType enum.
- Substantial performance improvements and protection against most issues related to Windows Defender process scanning behavior.
- Several code improvements and some refactorings or complete rewrites.
- Some important bug fixes.