- new collector instance-config: collation, edition, version, services and
accounts (sys.dm_server_services, 2008 R2 SP1+), Instant File
Initialization and Lock Pages in Memory (where the build has the
columns), tempdb files, default paths; plus a fingerprint of the whole
setup (sp_configure, trace flags, services, version, tempdb files)
- changes are computed against the previous collection, which the agent
restores from the repository after a restart; migration 0008 keeps them
in insight.ConfigurationChanges (as long as resolved findings)
- SQLI-CFG-013 "Konfiguration ændret": information for a day when
sp_configure, a trace flag or a service account changes (account names
are sensitive evidence)
- page /instanser/{navn}/konfiguration: instance, CPU and memory, services,
tempdb, trace flags, non-default sp_configure (default vs. in use vs.
configured) and the change log; linked from the instance page
- the management report lists configuration changes in the period
- trace flag reading shared by trace-flags and instance-config
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
84 lines
2.7 KiB
C#
84 lines
2.7 KiB
C#
using SQLInsight.Rules.Availability;
|
|
using SQLInsight.Rules.Concurrency;
|
|
using SQLInsight.Rules.Configuration;
|
|
using SQLInsight.Rules.Databases;
|
|
using SQLInsight.Rules.Engine;
|
|
using SQLInsight.Rules.Indexes;
|
|
using SQLInsight.Rules.Lifecycle;
|
|
using SQLInsight.Rules.Performance;
|
|
|
|
namespace SQLInsight.Rules;
|
|
|
|
public static class BuiltInRules
|
|
{
|
|
/// <param name="knowledge">The rule pack behind the version rules; the embedded one if null.</param>
|
|
public static IReadOnlyList<IRule> Create(RuleKnowledge? knowledge = null)
|
|
{
|
|
knowledge ??= RuleKnowledge.Embedded();
|
|
return
|
|
[
|
|
// Version
|
|
new SupportLifecycleRule(knowledge),
|
|
new PatchLevelRule(knowledge),
|
|
|
|
// Configuration
|
|
new MaxServerMemoryDefaultRule(),
|
|
new MaxServerMemoryTooHighRule(),
|
|
new CostThresholdRule(),
|
|
new MaxDopRule(),
|
|
new OptimizeForAdHocRule(),
|
|
.. SimpleConfigurationRules.Create(),
|
|
new PendingConfigurationRule(),
|
|
new DeadlockTraceFlagRule(),
|
|
new ConfigurationChangedRule(),
|
|
|
|
// Databases
|
|
new DatabaseStateRule(),
|
|
.. SimpleDatabaseRules.Create(),
|
|
new CompatibilityLevelRule(),
|
|
new FullBackupRule(),
|
|
new LogBackupRule(),
|
|
new CheckDbRule(),
|
|
new SuspectPagesRule(),
|
|
new VirtualLogFileRule(),
|
|
new FileGrowthRule(),
|
|
new FileMaxSizeRule(),
|
|
new QueryStoreStateRule(),
|
|
new TempdbFilesRule(),
|
|
|
|
// Performance
|
|
.. WaitRules.Create(),
|
|
new DataFileReadLatencyRule(),
|
|
new LogFileWriteLatencyRule(),
|
|
new CpuRule(),
|
|
new MemoryGrantsPendingRule(),
|
|
new AnomalyRule(),
|
|
new PlanRegressionRule(),
|
|
new FailedForcedPlanRule(),
|
|
new ParameterSensitivityRule(),
|
|
new ImplicitConversionRule(),
|
|
new NoJoinPredicateRule(),
|
|
new ScalarUdfRule(),
|
|
new SpillRule(),
|
|
new ExcessiveGrantRule(),
|
|
|
|
// Indexes and statistics
|
|
new MissingIndexRule(),
|
|
new UnusedIndexRule(),
|
|
new DuplicateIndexRule(),
|
|
new ForwardedRecordsRule(),
|
|
new StaleStatisticsRule(),
|
|
new AutoStatisticsRule(),
|
|
|
|
// Availability and jobs
|
|
new AvailabilityGroupHealthRule(),
|
|
new AvailabilityGroupLagRule(),
|
|
new FailedJobRule(),
|
|
new AgentStoppedRule(),
|
|
|
|
// Concurrency
|
|
new BlockingRule(),
|
|
new DeadlockRule(),
|
|
];
|
|
}
|
|
}
|