Skip to content

Commit

Permalink
Merge pull request #291 from microsoft/develop
Browse files Browse the repository at this point in the history
AppManifest threshold for RG Memory
  • Loading branch information
sidhant012 authored Jan 19, 2024
2 parents e22e37e + f853f44 commit 9d4f5dd
Show file tree
Hide file tree
Showing 27 changed files with 497 additions and 66 deletions.
8 changes: 4 additions & 4 deletions Build-SFPkgs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ function Build-SFPkg {
try {
Push-Location $scriptPath

Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Linux.SelfContained.3.2.12" "$scriptPath\bin\release\FabricObserver\linux-x64\self-contained\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Linux.FrameworkDependent.3.2.12" "$scriptPath\bin\release\FabricObserver\linux-x64\framework-dependent\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Linux.SelfContained.3.2.13" "$scriptPath\bin\release\FabricObserver\linux-x64\self-contained\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Linux.FrameworkDependent.3.2.13" "$scriptPath\bin\release\FabricObserver\linux-x64\framework-dependent\FabricObserverType"

Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained.3.2.12" "$scriptPath\bin\release\FabricObserver\win-x64\self-contained\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Windows.FrameworkDependent.3.2.12" "$scriptPath\bin\release\FabricObserver\win-x64\framework-dependent\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained.3.2.13" "$scriptPath\bin\release\FabricObserver\win-x64\self-contained\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Windows.FrameworkDependent.3.2.13" "$scriptPath\bin\release\FabricObserver\win-x64\framework-dependent\FabricObserverType"
}
finally {
Pop-Location
Expand Down
2 changes: 1 addition & 1 deletion ClusterObserver/PackageRoot/Data/Plugins/Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ cd C:\Users\me\source\repos\service-fabric-observer
./Build-FabricObserver
./Build-NugetPackages

The output from the above commands, FabricObserver platform-specific nupkgs and a package you have to use for plugin authoring named Microsoft.ServiceFabricApps.FabricObserver.Extensibility.3.2.12.nupkg, would be located in
The output from the above commands, FabricObserver platform-specific nupkgs and a package you have to use for plugin authoring named Microsoft.ServiceFabricApps.FabricObserver.Extensibility.3.2.13.nupkg, would be located in
C:\Users\me\source\repos\service-fabric-observer\bin\release\FabricObserver\Nugets.
6 changes: 3 additions & 3 deletions Documentation/Deployment/service-fabric-observer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
},
"applicationTypeVersionFabricObserver": {
"type": "string",
"defaultValue": "3.2.12",
"defaultValue": "3.2.13",
"metadata": {
"description": "Provide the app version number of FabricObserver. This must be identical to the version, 3.2.12, in the referenced sfpkg specified in packageUrlFabricObserver."
"description": "Provide the app version number of FabricObserver. This must be identical to the version, 3.2.13, in the referenced sfpkg specified in packageUrlFabricObserver."
}
},
"packageUrlFabricObserver": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "This has to be a public accessible URL for the sfpkg file which contains the FabricObserver app package. Example: https://github.com/microsoft/service-fabric-observer/releases/download/[xxxxxxxx]/Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained.3.2.12.sfpkg"
"description": "This has to be a public accessible URL for the sfpkg file which contains the FabricObserver app package. Example: https://github.com/microsoft/service-fabric-observer/releases/download/[xxxxxxxx]/Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained.3.2.13.sfpkg"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"clusterName": {
"value": "<YOUR-CLUSTER-RESOURCE-NAME>"
},
"applicationTypeVersionFabricObserver": {
"value": "3.2.12"
},
"packageUrlFabricObserver": {
"value": "<PUBLIC-ACCESSIBLE-URL-FOR-FABRICOBSERVER-SFPKG>"
}
}
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"clusterName": {
"value": "<YOUR-CLUSTER-RESOURCE-NAME>"
},
"applicationTypeVersionFabricObserver": {
"value": "3.2.13"
},
"packageUrlFabricObserver": {
"value": "<PUBLIC-ACCESSIBLE-URL-FOR-FABRICOBSERVER-SFPKG>"
}
}
}
4 changes: 2 additions & 2 deletions Documentation/OperationalTelemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ As with most of FabricObserver's application settings, you can also do this with
Connect-ServiceFabricCluster ...
$appParams = @{ "ObserverManagerEnableOperationalFOTelemetry" = "false"; }
Start-ServiceFabricApplicationUpgrade -ApplicationName fabric:/FabricObserver -ApplicationParameter $appParams -ApplicationTypeVersion 3.2.12 -UnMonitoredAuto
Start-ServiceFabricApplicationUpgrade -ApplicationName fabric:/FabricObserver -ApplicationParameter $appParams -ApplicationTypeVersion 3.2.13 -UnMonitoredAuto
```

Expand All @@ -44,7 +44,7 @@ Here is a full example of exactly what is sent in one of these telemetry events,
"ClusterId": "00000000-1111-1111-0000-00f00d000d",
"ClusterType": "SFRP",
"NodeNameHash": "3e83569d4c6aad78083cd081215dafc81e5218556b6a46cb8dd2b183ed0095ad",
"FOVersion": "3.2.12",
"FOVersion": "3.2.13",
"HasPlugins": "False",
"SFRuntimeVersion":"9.0.1028.9590"
"UpTime": "1.00:30:18.8058379",
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ cd C:\Users\me\source\repos\service-fabric-observer
./Build-FabricObserver
./Build-NugetPackages
```
The output from the above commands contains FabricObserver platform-specific nupkgs and a nupkg you have to use for plugin authoring named Microsoft.ServiceFabricApps.FabricObserver.Extensibility.3.2.12.nupkg. Nuget packages will be located in
The output from the above commands contains FabricObserver platform-specific nupkgs and a nupkg you have to use for plugin authoring named Microsoft.ServiceFabricApps.FabricObserver.Extensibility.3.2.13.nupkg. Nuget packages will be located in
C:\Users\me\source\repos\service-fabric-observer\bin\release\FabricObserver\Nugets.
4 changes: 2 additions & 2 deletions Documentation/Using.md
Original file line number Diff line number Diff line change
Expand Up @@ -710,15 +710,15 @@ $appParams = @{ "FabricSystemObserverEnabled" = "true"; "FabricSystemObserverMem
Then execute the application upgrade with

```Powershell
Start-ServiceFabricApplicationUpgrade -ApplicationName fabric:/FabricObserver -ApplicationTypeVersion 3.2.12 -ApplicationParameter $appParams -Monitored -FailureAction rollback
Start-ServiceFabricApplicationUpgrade -ApplicationName fabric:/FabricObserver -ApplicationTypeVersion 3.2.13 -ApplicationParameter $appParams -Monitored -FailureAction rollback
```

**Important**: This action will overwrite previous app paramemter changes that were made in an earlier application upgrade, for example. If you want to preserve any earlier changes, then you will need to
supply those parameter values again along with the new ones. You do this in the following, simple way:

```PowerShell
$appName = "fabric:/FabricObserver"
$appVersion = "3.2.12"
$appVersion = "3.2.13"
$application = Get-ServiceFabricApplication -ApplicationName $appName
$appParamCollection = $application.ApplicationParameters
$applicationParameterMap = @{}
Expand Down
6 changes: 2 additions & 4 deletions FabricObserver.Extensibility.nuspec.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="3.3.0">
<id>%PACKAGE_ID%</id>
<version>3.2.12</version>
<version>3.2.13</version>
<releaseNotes>
Note: This is library is required for observer plugins that target FabricObserver 3.2.12.
- Updated LVID count monitor to support ESE database performance category change in SF 10.x versions.
- Adding a warning health event to inform customer if there is an issue with loading plugins.
Note: This is library is required for observer plugins that target FabricObserver 3.2.13.
</releaseNotes>
<authors>Microsoft</authors>
<license type="expression">MIT</license>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<RootNamespace>FabricObserver</RootNamespace>
<Copyright>Copyright © 2023</Copyright>
<Product>FabricObserver</Product>
<Version>3.2.12</Version>
<FileVersion>3.2.12</FileVersion>
<Version>3.2.13</Version>
<FileVersion>3.2.13</FileVersion>
<NoWarn>CA1416</NoWarn>
</PropertyGroup>
<ItemGroup>
Expand Down
28 changes: 28 additions & 0 deletions FabricObserver.Extensibility/Utilities/ObserverConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,5 +193,33 @@ public sealed class ObserverConstants
public const string DefaultValue = "DefaultValue";
public const string Parameter = "Parameter";
public const string Parameters = "Parameters";

// AppManifest Thresholds
public const string AppManifestMemoryWarningLimitMb = "FabricObserver_MemoryWarningLimitMb";
public const string AppManifestMemoryErrorLimitMb = "FabricObserver_MemoryErrorLimitMb";
public const string AppManifestMemoryWarningLimitPercent = "FabricObserver_MemoryWarningLimitPercent";
public const string AppManifestMemoryErrorLimitPercent = "FabricObserver_MemoryErrorLimitPercent";
public const string AppManifestCpuErrorLimitPercent = "FabricObserver_CpuErrorLimitPercent";
public const string AppManifestCpuWarningLimitPercent = "FabricObserver_CpuWarningLimitPercent";
public const string AppManifestNetworkErrorActivePorts = "FabricObserver_NetworkErrorActivePorts";
public const string AppManifestNetworkWarningActivePorts = "FabricObserver_NetworkWarningActivePorts";
public const string AppManifestNetworkErrorEphemeralPorts = "FabricObserver_NetworkErrorEphemeralPorts";
public const string AppManifestNetworkWarningEphemeralPorts = "FabricObserver_NetworkWarningEphemeralPorts";
public const string AppManifestNetworkErrorEphemeralPortsPercent = "FabricObserver_NetworkErrorEphemeralPortsPercent";
public const string AppManifestNetworkWarningEphemeralPortsPercent = "FabricObserver_NetworkWarningEphemeralPortsPercent";
public const string AppManifestDumpProcessOnError = "FabricObserver_DumpProcessOnError";
public const string AppManifestDumpProcessOnWarning = "FabricObserver_DumpProcessOnWarning";
public const string AppManifestErrorOpenFileHandles = "FabricObserver_ErrorOpenFileHandles";
public const string AppManifestWarningOpenFileHandles = "FabricObserver_WarningOpenFileHandles";
public const string AppManifestErrorHandleCount = "FabricObserver_ErrorHandleCount";
public const string AppManifestWarningHandleCount = "FabricObserver_WarningHandleCount";
public const string AppManifestErrorThreadCount = "FabricObserver_ErrorThreadCount";
public const string AppManifestWarningThreadCount = "FabricObserver_WarningThreadCount";
public const string AppManifestWarningPrivateBytesMb = "FabricObserver_WarningPrivateBytesMb";
public const string AppManifestErrorPrivateBytesMb = "FabricObserver_ErrorPrivateBytesMb";
public const string AppManifestWarningPrivateBytesPercent = "FabricObserver_WarningPrivateBytesPercent";
public const string AppManifestErrorPrivateBytesPercent = "FabricObserver_ErrorPrivateBytesPercent";
public const string AppManifestWarningRGMemoryLimitPercent = "FabricObserver_WarningRGMemoryLimitPercent";
public const string AppManifestWarningRGCpuLimitPercent = "FabricObserver_WarningRGCpuLimitPercent";
}
}
7 changes: 3 additions & 4 deletions FabricObserver.nuspec.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="3.3.0">
<id>%PACKAGE_ID%</id>
<version>3.2.12</version>
<version>3.2.13</version>
<releaseNotes>
- ESE LVID count monitor updated to support ESE database performance category change in SF 10.x versions.
- Adding a warning health event to inform customer if there is an issue with loading plugins.
- Added feature for applications to set AppObserver thresholds in Application Manifest. This release only allows for specifying RG memory threshold settings for AppObserver in FO's ApplicationManifest. Support for other AppObserver Application Parameter settings will come in future releases.
</releaseNotes>
<authors>Microsoft</authors>
<license type="expression">MIT</license>
Expand All @@ -14,7 +13,7 @@
<icon>icon.png</icon>
<readme>fonuget.md</readme>
<language>en-US</language>
<description>This package contains the FabricObserver(FO) Application - built for .NET 6.0 and SF Runtime 9.x. FO a highly configurable and extensible resource usage watchdog service that is designed to be run in Azure Service Fabric Windows and Linux clusters. This package contains the entire application and can be used to build .NET Standard 2.0 observer plugins. NOTE: If you want to target .NET 6 for your plugins, then you must use Microsoft.ServiceFabricApps.FabricObserver.Extensibility.3.2.12 nuget package to build them.</description>
<description>This package contains the FabricObserver(FO) Application - built for .NET 6.0 and SF Runtime 9.x. FO a highly configurable and extensible resource usage watchdog service that is designed to be run in Azure Service Fabric Windows and Linux clusters. This package contains the entire application and can be used to build .NET Standard 2.0 observer plugins. NOTE: If you want to target .NET 6 for your plugins, then you must use Microsoft.ServiceFabricApps.FabricObserver.Extensibility.3.2.13 nuget package to build them.</description>
<contentFiles>
<files include="**" buildAction="None" copyToOutput="true" />
</contentFiles>
Expand Down
4 changes: 2 additions & 2 deletions FabricObserver.sln
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
README.md = README.md
SECURITY.md = SECURITY.md
Documentation\Deployment\service-fabric-cluster-observer.json = Documentation\Deployment\service-fabric-cluster-observer.json
Documentation\Deployment\service-fabric-observer.json = Documentation\Deployment\service-fabric-observer.json
Documentation\Deployment\service-fabric-cluster-observer.v2.2.7.parameters.json = Documentation\Deployment\service-fabric-cluster-observer.v2.2.7.parameters.json
Documentation\Deployment\service-fabric-observer.v3.2.12.parameters.json = Documentation\Deployment\service-fabric-observer.v3.2.12.parameters.json
Documentation\Deployment\service-fabric-observer.json = Documentation\Deployment\service-fabric-observer.json
Documentation\Deployment\service-fabric-observer.v3.2.13.parameters.json = Documentation\Deployment\service-fabric-observer.v3.2.13.parameters.json
Documentation\Using.md = Documentation\Using.md
EndProjectSection
EndProject
Expand Down
4 changes: 2 additions & 2 deletions FabricObserver/FabricObserver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<TargetLatestRuntimePatch>True</TargetLatestRuntimePatch>
<Copyright>Copyright © 2022</Copyright>
<Product>FabricObserver</Product>
<Version>3.2.12</Version>
<FileVersion>3.2.12</FileVersion>
<Version>3.2.13</Version>
<FileVersion>3.2.13</FileVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<IsServiceFabricServiceProject>true</IsServiceFabricServiceProject>
<StartupObject>FabricObserver.Program</StartupObject>
Expand Down
Loading

0 comments on commit 9d4f5dd

Please sign in to comment.