├── .github ├── FUNDING.yml ├── CODEOWNERS ├── semantic.yml ├── ISSUE_TEMPLATE │ └── config.yml └── workflows │ ├── ci-container.yml │ └── lint-markdown.yml ├── src ├── Promitor.Tests.Unit │ ├── Files │ │ ├── valid-secret-file │ │ └── valid-sample.yaml │ ├── UnitTest.cs │ ├── Serialization │ │ ├── FieldDeserializationInfoBuilderTests │ │ │ └── TestConfig.cs │ │ ├── YamlUtils.cs │ │ └── AutoMapperTests.cs │ ├── ConfigurationKeys.cs │ ├── Extensions │ │ └── IDictionaryExtensions.cs │ ├── Azure │ │ └── TestCloudEndpoints.cs │ ├── Validation │ │ └── Scraper │ │ │ └── Metrics │ │ │ └── ResourceTypes │ │ │ └── MetricsDeclarationValidationStepsTests.cs │ └── Stubs │ │ └── OptionsMonitorStub.cs ├── Promitor.Agents.Scraper │ ├── .dockerignore │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── Configuration │ │ ├── ConcurrencyConfiguration.cs │ │ ├── ResourceDiscoveryConfiguration.cs │ │ ├── HealthCheckConfiguration.cs │ │ └── Defaults.cs │ ├── Health │ │ └── IScrapeScheduleProvider.cs │ ├── Discovery │ │ └── Interfaces │ │ │ └── IResourceDiscoveryRepository.cs │ ├── Runtime │ │ └── ILastSuccessfulScrapeStore.cs │ └── Scheduling │ │ └── MetricScrapingJob.cs ├── Promitor.Agents.ResourceDiscovery │ ├── .dockerignore │ ├── Configuration │ │ ├── ResourceCriteriaDefinition.cs │ │ ├── CacheConfiguration.cs │ │ ├── AgentRuntimeConfiguration.cs │ │ ├── ResourceDiscoveryGroup.cs │ │ ├── ResourceCriteria.cs │ │ ├── ResourceDeclaration.cs │ │ └── AzureLandscape.cs │ └── Graph │ │ ├── Query │ │ └── ScalarOperator.cs │ │ ├── Model │ │ ├── AzureResourceGroupInformation.cs │ │ ├── AzureSubscriptionInformation.cs │ │ └── Resource.cs │ │ ├── Exceptions │ │ └── ResourceTypeNotSupportedException.cs │ │ └── Interfaces │ │ └── ICachedAzureResourceGraph.cs ├── .dockerignore ├── Promitor.Agents.Core │ ├── HttpHeaders.cs │ ├── Validation │ │ ├── Interfaces │ │ │ └── IValidationStep.cs │ │ └── Steps │ │ │ └── ValidationStep.cs │ ├── Contracts │ │ ├── AgentHealthReport.cs │ │ └── SystemInfo.cs │ ├── Configuration │ │ ├── Telemetry │ │ │ ├── Interfaces │ │ │ │ └── ISinkConfiguration.cs │ │ │ ├── Sinks │ │ │ │ ├── ContainerLogConfiguration.cs │ │ │ │ └── ApplicationInsightsConfiguration.cs │ │ │ └── TelemetryConfiguration.cs │ │ ├── RuntimeConfiguration.cs │ │ └── Server │ │ │ └── ServerConfiguration.cs │ ├── Usability │ │ └── AsciiTableGenerator.cs │ └── Constants.cs ├── Promitor.Core.Contracts │ ├── ResourceDiscoveryFailedDetails.cs │ ├── IAppServiceResourceDefinition.cs │ ├── PageInformation.cs │ ├── ResourceTypes │ │ ├── Enums │ │ │ └── MySqlServerType.cs │ │ ├── CdnResourceDefinition.cs │ │ ├── CosmosDbResourceDefinition.cs │ │ ├── IoTHubResourceDefinition.cs │ │ ├── KeyVaultResourceDefinition.cs │ │ ├── RedisCacheResourceDefinition.cs │ │ ├── LogicAppResourceDefinition.cs │ │ ├── ApplicationInsightsResourceDefinition.cs │ │ ├── MongoClusterResourceDefinition.cs │ │ ├── NatGatewayResourceDefinition.cs │ │ ├── PowerBiDedicatedResourceDefinition.cs │ │ ├── KubernetesServiceResourceDefinition.cs │ │ ├── ContainerRegistryResourceDefinition.cs │ │ ├── DataExplorerClusterResourceDefinition.cs │ │ ├── LoadBalancerResourceDefinition.cs │ │ ├── RedisEnterpriseCacheResourceDefinition.cs │ │ ├── ContainerInstanceResourceDefinition.cs │ │ ├── AzureFirewallResourceDefinition.cs │ │ ├── VirtualMachineResourceDefinition.cs │ │ ├── VirtualNetworkResourceDefinition.cs │ │ ├── VirtualMachineScaleSetsResourceDefinition.cs │ │ ├── NetworkGatewayResourceDefinition.cs │ │ ├── PublicIpAddressResourceDefinition.cs │ │ ├── NetworkInterfaceResourceDefinition.cs │ │ ├── MonitorAutoscaleResourceDefinition.cs │ │ ├── ApplicationGatewayResourceDefinition.cs │ │ ├── ExpressRouteCircuitResourceDefinition.cs │ │ ├── AppPlanResourceDefinition.cs │ │ ├── GenericAzureResourceDefinition.cs │ │ ├── DataShareResourceDefinition.cs │ │ ├── EventHubResourceDefinition.cs │ │ ├── LogAnalyticsResourceDefinition.cs │ │ ├── DataFactoryResourceDefinition.cs │ │ ├── CognitiveServicesAccountResourceDefinition.cs │ │ ├── DeviceProvisioningServiceResourceDefinition.cs │ │ └── MySqlResourceDefinition.cs │ └── Promitor.Core.Contracts.csproj ├── Promitor.Core │ ├── Serialization │ │ └── Enum │ │ │ ├── SpecVersion.cs │ │ │ └── AzureCloud.cs │ ├── Metrics │ │ ├── MetricAggregationType.cs │ │ └── Sinks │ │ │ ├── MetricSinkType.cs │ │ │ └── IMetricSink.cs │ ├── Extensions │ │ └── IAzureCloudEndpoints.cs │ ├── Defaults.cs │ ├── Configuration │ │ └── AzureEndpoints.cs │ └── EnvironmentVariables.cs ├── Promitor.Core.Scraping │ ├── ScrapeError.cs │ ├── Configuration │ │ ├── Model │ │ │ ├── Aggregation.cs │ │ │ ├── Metrics │ │ │ │ └── AzureResourceDiscoveryGroup.cs │ │ │ ├── MetricAggregation.cs │ │ │ ├── MetricsDeclaration.cs │ │ │ ├── LogAnalyticsConfiguration.cs │ │ │ ├── MetricDefaults.cs │ │ │ └── AzureMetadata.cs │ │ ├── Runtime │ │ │ └── MetricsConfiguration.cs │ │ └── Serialization │ │ │ ├── v1 │ │ │ ├── Model │ │ │ │ ├── LogAnalyticsConfigurationV1.cs │ │ │ │ ├── AzureResourceDefinitionV1.cs │ │ │ │ ├── MetricDimensionV1.cs │ │ │ │ ├── AzureResourceDiscoveryGroupDefinitionV1.cs │ │ │ │ ├── ScrapingV1.cs │ │ │ │ ├── AzureMetadataV1.cs │ │ │ │ ├── ResourceTypes │ │ │ │ │ ├── CdnResourceV1.cs │ │ │ │ │ ├── DnsZoneResourceV1.cs │ │ │ │ │ ├── CosmosDbResourceV1.cs │ │ │ │ │ ├── MongoClusterResourceV1.cs │ │ │ │ │ ├── RedisCacheResourceV1.cs │ │ │ │ │ ├── LogicAppResourceV1.cs │ │ │ │ │ ├── AppPlanResourceV1.cs │ │ │ │ │ ├── IoTHubResourceV1.cs │ │ │ │ │ ├── ContainerInstanceResourceV1.cs │ │ │ │ │ ├── KeyVaultResourceV1.cs │ │ │ │ │ ├── ContainerRegistryResourceV1.cs │ │ │ │ │ ├── SqlManagedInstanceResourceV1.cs │ │ │ │ │ ├── FrontDoorResourceV1.cs │ │ │ │ │ ├── AzureFirewallResourceV1.cs │ │ │ │ │ ├── LoadBalancerResourceV1.cs │ │ │ │ │ ├── NatGatewayResourceV1.cs │ │ │ │ │ ├── NetworkInterfaceResourceV1.cs │ │ │ │ │ ├── VirtualMachineResourceV1.cs │ │ │ │ │ ├── PowerBiDedicatedResourceV1.cs │ │ │ │ │ ├── PublicIpAddressResourceV1.cs │ │ │ │ │ ├── MariaDbResourceV1.cs │ │ │ │ │ ├── NetworkGatewayResourceV1.cs │ │ │ │ │ ├── VirtualNetworkResourceV1.cs │ │ │ │ │ ├── KubernetesServiceResourceV1.cs │ │ │ │ │ ├── TrafficManagerResourceV1.cs │ │ │ │ │ ├── VirtualMachineScaleSetResourceV1.cs │ │ │ │ │ ├── ApplicationInsightsResourceV1.cs │ │ │ │ │ ├── DataExplorerClusterResourceV1.cs │ │ │ │ │ ├── ApplicationGatewayResourceV1.cs │ │ │ │ │ ├── RedisEnterpriseCacheResourceV1.cs │ │ │ │ │ ├── CognitiveServicesAccountResourceV1.cs │ │ │ │ │ ├── ExpressRouteCircuitResourceV1.cs │ │ │ │ │ ├── MonitorAutoscaleResourceV1.cs │ │ │ │ │ ├── LogAnalyticsResourceV1.cs │ │ │ │ │ ├── DeviceProvisioningServiceResourceV1.cs │ │ │ │ │ ├── AutomationAccountResourceV1.cs │ │ │ │ │ ├── BlobStorageResourceV1.cs │ │ │ │ │ ├── FileStorageResourceV1.cs │ │ │ │ │ ├── WebAppResourceV1.cs │ │ │ │ │ ├── DataFactoryResourceV1.cs │ │ │ │ │ └── DataShareResourceV1.cs │ │ │ │ ├── AggregationV1.cs │ │ │ │ └── MetricsDeclarationV1.cs │ │ │ ├── Core │ │ │ │ ├── MetricDimensionDeserializer.cs │ │ │ │ ├── ScrapingDeserializer.cs │ │ │ │ ├── AzureResourceCollectionDeserializer.cs │ │ │ │ └── MetricAggregationDeserializer.cs │ │ │ └── Providers │ │ │ │ ├── CdnDeserializer.cs │ │ │ │ ├── DnsZoneDeserializer.cs │ │ │ │ ├── IoTHubDeserializer.cs │ │ │ │ ├── AppPlanDeserializer.cs │ │ │ │ ├── CosmosDbDeserializer.cs │ │ │ │ ├── MariaDbDeserializer.cs │ │ │ │ ├── KeyVaultDeserializer.cs │ │ │ │ ├── LogicAppDeserializer.cs │ │ │ │ ├── BlobStorageDeserializer.cs │ │ │ │ ├── RedisCacheDeserializer.cs │ │ │ │ ├── FileStorageDeserializer.cs │ │ │ │ ├── MongoClusterDeserializer.cs │ │ │ │ ├── NatGatewayDeserializer.cs │ │ │ │ ├── PowerBiDedicatedDeserializer.cs │ │ │ │ ├── LoadBalancerDeserializer.cs │ │ │ │ ├── StorageAccountDeserializer.cs │ │ │ │ ├── TrafficManagerDeserializer.cs │ │ │ │ ├── AzureFirewallDeserializer.cs │ │ │ │ ├── NetworkGatewayDeserializer.cs │ │ │ │ ├── SynapseWorkspaceDeserializer.cs │ │ │ │ ├── VirtualMachineDeserializer.cs │ │ │ │ ├── VirtualNetworkDeserializer.cs │ │ │ │ ├── WebAppDeserializer.cs │ │ │ │ ├── ContainerRegistryDeserializer.cs │ │ │ │ ├── KubernetesServiceDeserializer.cs │ │ │ │ ├── PublicIpAddressDeserializer.cs │ │ │ │ ├── ApplicationInsightsDeserializer.cs │ │ │ │ ├── ContainerInstanceDeserializer.cs │ │ │ │ ├── EventHubsDeserializer.cs │ │ │ │ ├── MonitorAutoscaleDeserializer.cs │ │ │ │ ├── NetworkInterfaceDeserializer.cs │ │ │ │ ├── DataExplorerClusterDeserializer.cs │ │ │ │ ├── ApplicationGatewayDeserializer.cs │ │ │ │ ├── DataShareDeserializer.cs │ │ │ │ ├── RedisEnterpriseCacheDeserializer.cs │ │ │ │ ├── ExpressRouteCircuitDeserializer.cs │ │ │ │ ├── DataFactoryDeserializer.cs │ │ │ │ ├── FunctionAppDeserializer.cs │ │ │ │ ├── VirtualMachineScaleSetDeserializer.cs │ │ │ │ ├── MySqlDeserializer.cs │ │ │ │ ├── GenericResourceDeserializer.cs │ │ │ │ └── CognitiveServicesAccountDeserializer.cs │ │ │ ├── IFieldDeserializationInfoBuilder.cs │ │ │ └── MessageType.cs │ ├── Defaults.cs │ └── Interfaces │ │ └── IScraper.cs ├── NuGet.config ├── Promitor.Core.Telemetry │ └── Interfaces │ │ └── IExceptionTracker.cs ├── Promitor.Integrations.Sinks.Prometheus │ ├── Configuration │ │ ├── LabelTransformation.cs │ │ ├── LabelConfiguration.cs │ │ ├── ScrapeEndpointConfiguration.cs │ │ └── PrometheusScrapingEndpointSinkConfiguration.cs │ └── Defaults.cs ├── Promitor.Integrations.Sinks.Statsd │ └── Configuration │ │ ├── StatsdFormatterTypesEnum.cs │ │ ├── GenevaConfiguration.cs │ │ └── StatsdSinkConfiguration.cs ├── Promitor.Integrations.Sinks.OpenTelemetry │ └── Configuration │ │ └── OpenTelemetryCollectorSinkConfiguration.cs ├── Promitor.Integrations.Sinks.Atlassian.Statuspage │ ├── IAtlassianStatuspageClient.cs │ └── Configuration │ │ ├── SystemMetricMapping.cs │ │ └── AtlassianStatusPageSinkConfiguration.cs ├── Promitor.Integrations.Azure │ └── Authentication │ │ ├── AuthenticationMode.cs │ │ └── Configuration │ │ └── AuthenticationConfiguration.cs ├── Promitor.Integrations.AzureMonitor │ └── Configuration │ │ ├── AzureMonitorConfiguration.cs │ │ ├── AzureMonitorIntegrationConfiguration.cs │ │ ├── AzureMonitorLoggingConfiguration.cs │ │ ├── AzureMonitorHistoryConfiguration.cs │ │ └── AzureMonitorMetricBatchScrapeConfig.cs ├── Promitor.Integrations.AzureStorage │ ├── AzureStorageConstants.cs │ └── Promitor.Integrations.AzureStorage.csproj ├── Promitor.Tests.Integration │ ├── Services │ │ ├── Scraper │ │ │ └── ScraperIntegrationTest.cs │ │ └── ResourceDiscovery │ │ │ └── ResourceDiscoveryIntegrationTest.cs │ └── Infrastructure │ │ └── ConfigurationFactory.cs └── docker-compose.override.yml ├── changelog ├── themes │ └── hugo-changelog-theme │ │ ├── .gitignore │ │ ├── layouts │ │ ├── partials │ │ │ ├── footer.html │ │ │ └── logo.html │ │ ├── shortcodes │ │ │ └── tag.html │ │ ├── _default │ │ │ ├── list.html │ │ │ ├── baseof.html │ │ │ └── single.html │ │ └── 404.html │ │ ├── assets │ │ └── spectre │ │ │ ├── .hound.yml │ │ │ ├── .gitattributes │ │ │ ├── src │ │ │ ├── mixins │ │ │ │ ├── _transition.scss │ │ │ │ ├── _avatar.scss │ │ │ │ ├── _text.scss │ │ │ │ ├── _clearfix.scss │ │ │ │ ├── _toast.scss │ │ │ │ ├── _shadow.scss │ │ │ │ ├── _label.scss │ │ │ │ └── _color.scss │ │ │ ├── utilities │ │ │ │ ├── _shapes.scss │ │ │ │ └── _cursors.scss │ │ │ ├── _icons.scss │ │ │ ├── _utilities.scss │ │ │ ├── _mixins.scss │ │ │ ├── spectre-icons.scss │ │ │ ├── _animations.scss │ │ │ ├── _empty.scss │ │ │ ├── _panels.scss │ │ │ ├── spectre-exp.scss │ │ │ ├── _navbar.scss │ │ │ ├── _breadcrumbs.scss │ │ │ └── _chips.scss │ │ │ ├── .gitignore │ │ │ └── docs │ │ │ ├── img │ │ │ ├── avatar-1.png │ │ │ ├── avatar-2.png │ │ │ ├── avatar-3.png │ │ │ ├── avatar-4.png │ │ │ ├── avatar-5.png │ │ │ ├── macos-sierra.jpg │ │ │ ├── osx-yosemite.jpg │ │ │ ├── macos-sierra-2.jpg │ │ │ ├── osx-el-capitan.jpg │ │ │ ├── osx-yosemite-2.jpg │ │ │ ├── favicons │ │ │ │ ├── favicon.ico │ │ │ │ └── favicon.png │ │ │ └── osx-el-capitan-2.jpg │ │ │ └── src │ │ │ ├── contents │ │ │ ├── _ad-c.pug │ │ │ ├── experimentals.pug │ │ │ ├── introduction.pug │ │ │ ├── shapes.pug │ │ │ ├── loading.pug │ │ │ └── progress.pug │ │ │ ├── scss │ │ │ └── spectre-rtl.scss │ │ │ └── layout.pug │ │ ├── images │ │ ├── tn.png │ │ └── screenshot.png │ │ ├── exampleSite │ │ ├── config.toml │ │ ├── resources │ │ │ └── _gen │ │ │ │ └── assets │ │ │ │ └── scss │ │ │ │ └── changelog.scss_b95b077eb505d5c0aff8055eaced30ad.json │ │ └── content │ │ │ ├── released │ │ │ ├── 2.md │ │ │ ├── 3.md │ │ │ ├── 4.md │ │ │ ├── 1.md │ │ │ └── 15.md │ │ │ └── experimental │ │ │ ├── ex2.md │ │ │ └── ex.md │ │ ├── .monova.config │ │ ├── archetypes │ │ ├── default.md │ │ └── deprecated.md │ │ ├── .githooks │ │ └── post-merge │ │ ├── theme.toml │ │ └── Makefile ├── config.toml ├── archetypes │ └── default.md └── content │ ├── released │ ├── v0.14.1-resource-discovery.md │ ├── v0.15.0-resource-discovery.md │ ├── v2.11.2-scraper.md │ ├── v0.6.0.md │ ├── v2.9.1-scraper.md │ ├── v0.11.2-resource-discovery.md │ ├── v0.9.1-resource-discovery.md │ ├── v2.1.1-scraper.md │ ├── v2.14.1-scraper.md │ ├── v0.12.0-resource-discovery.md │ ├── v0.4.1-resource-discovery.md │ ├── v0.5.0.md │ ├── v1.5.0.md │ ├── v0.2.1.md │ ├── v0.10.0-resource-discovery.md │ ├── v0.14.0-resource-discovery.md │ ├── v0.4.0-resource-discovery.md │ ├── v0.3.0.md │ ├── v0.7.1-resource-discovery.md │ ├── v2.15.0-scraper.md │ ├── v2.12.0-scraper.md │ ├── v2.14.0-scraper.md │ ├── vx.x.x.md.template │ ├── v2.2.0-scraper.md │ ├── v0.8.0-resource-discovery.md │ └── v2.4.0-scraper.md │ └── experimental │ ├── unreleased.md │ └── unreleased.md.template ├── media ├── logos │ ├── scarf.png │ ├── netlify.png │ ├── cloudflare.png │ ├── codefactor.png │ ├── microsoft.png │ ├── promitor.png │ ├── renovate.jpg │ ├── snyk-dark.png │ ├── snyk-light.png │ ├── azure-pipelines.png │ ├── cla-assistant.png │ └── end-users │ │ ├── adobe.png │ │ ├── axon.png │ │ ├── trynz.png │ │ ├── vsoft.png │ │ ├── adfinis.png │ │ ├── bryte-blue.png │ │ ├── resdiary.png │ │ ├── albert-heijn.png │ │ ├── walmart-labs.jpg │ │ ├── original │ │ ├── adobe.png │ │ ├── vsoft.png │ │ ├── adfinis.png │ │ ├── Trynz horz.png │ │ ├── bryte-blue.png │ │ ├── albert-heijn.png │ │ └── the-trade-desk-logo.png │ │ └── the-trade-desk.png ├── supporters │ ├── locmai.jpg │ ├── nillsf.jpg │ ├── JorTurFer.jpg │ ├── karlgots.jpg │ ├── CarloGarcia.jpg │ ├── RichiCoder1.jpg │ ├── samvanhoutte.png │ └── LovelaceEngineering.png └── schematics │ ├── schematics.pptx │ └── contribution-guide │ ├── scenario-with-reverse-proxy.png │ └── scenario-without-reverse-proxy.png ├── CODEOWNERS ├── RELEASE.md ├── .markdownlint.json ├── config ├── promitor │ ├── resource-discovery │ │ ├── ci-runtime.yaml │ │ └── runtime.yaml │ └── scraper │ │ └── ci-runtime.yaml ├── prometheus │ └── prometheus.yml └── opentelemetry-collector │ └── collector-config.yaml ├── tests └── performance │ └── steady-load-scraper-scrape.yml ├── SUPPORT.md └── SECURITY.md /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [tomkerkhove] 2 | -------------------------------------------------------------------------------- /src/Promitor.Tests.Unit/Files/valid-secret-file: -------------------------------------------------------------------------------- 1 | this-is-a-secret -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # General owners 2 | * @tomkerkhove 3 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/.gitignore: -------------------------------------------------------------------------------- 1 | .monova.history 2 | -------------------------------------------------------------------------------- /src/Promitor.Agents.Scraper/.dockerignore: -------------------------------------------------------------------------------- 1 | bin\ 2 | obj\ 3 | out\ 4 | -------------------------------------------------------------------------------- /src/Promitor.Agents.ResourceDiscovery/.dockerignore: -------------------------------------------------------------------------------- 1 | bin\ 2 | obj\ 3 | out\ 4 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/layouts/partials/logo.html: -------------------------------------------------------------------------------- 1 |

{{ .Site.Title }}

2 | -------------------------------------------------------------------------------- /media/logos/scarf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/scarf.png -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/.hound.yml: -------------------------------------------------------------------------------- 1 | scss: 2 | config_file: .scss-lint.yml -------------------------------------------------------------------------------- /media/logos/netlify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/netlify.png -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/.gitattributes: -------------------------------------------------------------------------------- 1 | **/*.html linguist-documentation 2 | -------------------------------------------------------------------------------- /media/logos/cloudflare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/cloudflare.png -------------------------------------------------------------------------------- /media/logos/codefactor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/codefactor.png -------------------------------------------------------------------------------- /media/logos/microsoft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/microsoft.png -------------------------------------------------------------------------------- /media/logos/promitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/promitor.png -------------------------------------------------------------------------------- /media/logos/renovate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/renovate.jpg -------------------------------------------------------------------------------- /media/logos/snyk-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/snyk-dark.png -------------------------------------------------------------------------------- /media/logos/snyk-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/snyk-light.png -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # These owners will be the default owners for everything in the repo. 2 | * @tomkerkhove 3 | -------------------------------------------------------------------------------- /media/supporters/locmai.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/supporters/locmai.jpg -------------------------------------------------------------------------------- /media/supporters/nillsf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/supporters/nillsf.jpg -------------------------------------------------------------------------------- /changelog/config.toml: -------------------------------------------------------------------------------- 1 | languageCode = "en-us" 2 | title = "Promitor Changelog" 3 | theme = "hugo-changelog-theme" 4 | -------------------------------------------------------------------------------- /media/logos/azure-pipelines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/azure-pipelines.png -------------------------------------------------------------------------------- /media/logos/cla-assistant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/cla-assistant.png -------------------------------------------------------------------------------- /media/logos/end-users/adobe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/end-users/adobe.png -------------------------------------------------------------------------------- /media/logos/end-users/axon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/end-users/axon.png -------------------------------------------------------------------------------- /media/logos/end-users/trynz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/end-users/trynz.png -------------------------------------------------------------------------------- /media/logos/end-users/vsoft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/end-users/vsoft.png -------------------------------------------------------------------------------- /media/supporters/JorTurFer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/supporters/JorTurFer.jpg -------------------------------------------------------------------------------- /media/supporters/karlgots.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/supporters/karlgots.jpg -------------------------------------------------------------------------------- /media/logos/end-users/adfinis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/end-users/adfinis.png -------------------------------------------------------------------------------- /media/schematics/schematics.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/schematics/schematics.pptx -------------------------------------------------------------------------------- /media/supporters/CarloGarcia.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/supporters/CarloGarcia.jpg -------------------------------------------------------------------------------- /media/supporters/RichiCoder1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/supporters/RichiCoder1.jpg -------------------------------------------------------------------------------- /media/supporters/samvanhoutte.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/supporters/samvanhoutte.png -------------------------------------------------------------------------------- /media/logos/end-users/bryte-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/end-users/bryte-blue.png -------------------------------------------------------------------------------- /media/logos/end-users/resdiary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/end-users/resdiary.png -------------------------------------------------------------------------------- /media/logos/end-users/albert-heijn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/end-users/albert-heijn.png -------------------------------------------------------------------------------- /media/logos/end-users/walmart-labs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/end-users/walmart-labs.jpg -------------------------------------------------------------------------------- /media/logos/end-users/original/adobe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/end-users/original/adobe.png -------------------------------------------------------------------------------- /media/logos/end-users/original/vsoft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/end-users/original/vsoft.png -------------------------------------------------------------------------------- /media/logos/end-users/the-trade-desk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/end-users/the-trade-desk.png -------------------------------------------------------------------------------- /media/supporters/LovelaceEngineering.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/supporters/LovelaceEngineering.png -------------------------------------------------------------------------------- /changelog/archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | date: {{ .Date }} 4 | draft: true 5 | --- 6 | 7 | -------------------------------------------------------------------------------- /media/logos/end-users/original/adfinis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/end-users/original/adfinis.png -------------------------------------------------------------------------------- /media/logos/end-users/original/Trynz horz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/end-users/original/Trynz horz.png -------------------------------------------------------------------------------- /media/logos/end-users/original/bryte-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/end-users/original/bryte-blue.png -------------------------------------------------------------------------------- /src/Promitor.Tests.Unit/Files/valid-sample.yaml: -------------------------------------------------------------------------------- 1 | azureMetadata: 2 | tenantId: "" 3 | subscriptionId: "" 4 | resourceGroupName: "" 5 | metrics: -------------------------------------------------------------------------------- /media/logos/end-users/original/albert-heijn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/end-users/original/albert-heijn.png -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/changelog/themes/hugo-changelog-theme/images/tn.png -------------------------------------------------------------------------------- /media/logos/end-users/original/the-trade-desk-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/logos/end-users/original/the-trade-desk-logo.png -------------------------------------------------------------------------------- /src/.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .env 3 | .git 4 | .gitignore 5 | .vs 6 | .vscode 7 | docker-compose.yml 8 | docker-compose.*.yml 9 | */bin 10 | */obj 11 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/exampleSite/config.toml: -------------------------------------------------------------------------------- 1 | baseURL = "https://example.com" 2 | languageCode = "en-us" 3 | title = "Hugo Changelog" 4 | 5 | paginate = 4 6 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/changelog/themes/hugo-changelog-theme/images/screenshot.png -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/mixins/_transition.scss: -------------------------------------------------------------------------------- 1 | // Component transition 2 | @mixin control-transition() { 3 | transition: all .2s ease; 4 | } 5 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/layouts/shortcodes/tag.html: -------------------------------------------------------------------------------- 1 | {{ with .Get 0 }}{{ . }}{{ end }} 2 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | node_modules/ 3 | .* 4 | !.csscomb.json 5 | !.gitignore 6 | !.gitattributes 7 | !.hound.yml 8 | !.scss-lint.yml 9 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/exampleSite/resources/_gen/assets/scss/changelog.scss_b95b077eb505d5c0aff8055eaced30ad.json: -------------------------------------------------------------------------------- 1 | {"Target":"changelog.min.css","MediaType":"text/css","Data":{}} -------------------------------------------------------------------------------- /media/schematics/contribution-guide/scenario-with-reverse-proxy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/schematics/contribution-guide/scenario-with-reverse-proxy.png -------------------------------------------------------------------------------- /RELEASE.md: -------------------------------------------------------------------------------- 1 | # Creating a new release 2 | 3 | 1. Trigger release pipeline 4 | 2. Review & publish GitHub release with GitHub Discussion 5 | 3. Add new container tags to Snyk container scanning 6 | -------------------------------------------------------------------------------- /media/schematics/contribution-guide/scenario-without-reverse-proxy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/media/schematics/contribution-guide/scenario-without-reverse-proxy.png -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/utilities/_shapes.scss: -------------------------------------------------------------------------------- 1 | // Shapes 2 | .s-rounded { 3 | border-radius: $border-radius; 4 | } 5 | 6 | .s-circle { 7 | border-radius: 50%; 8 | } -------------------------------------------------------------------------------- /src/Promitor.Agents.Core/HttpHeaders.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Agents.Core 2 | { 3 | public class HttpHeaders 4 | { 5 | public const string AgentVersion = "X-Version"; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/avatar-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/avatar-1.png -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/avatar-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/avatar-2.png -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/avatar-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/avatar-3.png -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/avatar-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/avatar-4.png -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/avatar-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/avatar-5.png -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/macos-sierra.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/macos-sierra.jpg -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/osx-yosemite.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/osx-yosemite.jpg -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/mixins/_avatar.scss: -------------------------------------------------------------------------------- 1 | // Avatar mixin 2 | @mixin avatar-base($size: $unit-8) { 3 | font-size: $size / 2; 4 | height: $size; 5 | width: $size; 6 | } 7 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/mixins/_text.scss: -------------------------------------------------------------------------------- 1 | // Text Ellipsis 2 | @mixin text-ellipsis() { 3 | overflow: hidden; 4 | text-overflow: ellipsis; 5 | white-space: nowrap; 6 | } 7 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/macos-sierra-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/macos-sierra-2.jpg -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/osx-el-capitan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/osx-el-capitan.jpg -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/osx-yosemite-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/osx-yosemite-2.jpg -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/_icons.scss: -------------------------------------------------------------------------------- 1 | // CSS Icons 2 | @import "icons/icons-core"; 3 | @import "icons/icons-navigation"; 4 | @import "icons/icons-action"; 5 | @import "icons/icons-object"; -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/favicons/favicon.ico -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/favicons/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/favicons/favicon.png -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/osx-el-capitan-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomkerkhove/promitor/HEAD/changelog/themes/hugo-changelog-theme/assets/spectre/docs/img/osx-el-capitan-2.jpg -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/mixins/_clearfix.scss: -------------------------------------------------------------------------------- 1 | // Clearfix mixin 2 | @mixin clearfix() { 3 | &::after { 4 | clear: both; 5 | content: ""; 6 | display: table; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/mixins/_toast.scss: -------------------------------------------------------------------------------- 1 | // Toast variant mixin 2 | @mixin toast-variant($color: $dark-color) { 3 | background: rgba($color, .9); 4 | border-color: $color; 5 | } 6 | -------------------------------------------------------------------------------- /.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "default": true, 3 | "MD013": { "line_length": 120, "code_blocks": false, "tables": false }, 4 | "MD041": false, 5 | "MD026": false, 6 | "MD033": false, 7 | "MD001": false 8 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceDiscoveryFailedDetails.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts 2 | { 3 | public class ResourceDiscoveryFailedDetails 4 | { 5 | public string Details { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /src/Promitor.Core/Serialization/Enum/SpecVersion.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Serialization.Enum 2 | { 3 | // ReSharper disable once InconsistentNaming 4 | public enum SpecVersion 5 | { 6 | v1 7 | } 8 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/ScrapeError.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping 2 | { 3 | public class ScrapeError 4 | { 5 | public string Code { get; set; } 6 | public string Message { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /config/promitor/resource-discovery/ci-runtime.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | httpPort: 99 3 | telemetry: 4 | applicationInsights: 5 | isEnabled: false 6 | containerLogs: 7 | isEnabled: true 8 | verbosity: trace 9 | defaultVerbosity: trace -------------------------------------------------------------------------------- /src/NuGet.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.github/semantic.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Semantic Pull Requests PR validation, see https://github.com/zeke/semantic-pull-requests#configuration for full reference 2 | # Always validate the PR title, and ignore the commits 3 | titleOnly: true 4 | -------------------------------------------------------------------------------- /src/Promitor.Core.Telemetry/Interfaces/IExceptionTracker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Promitor.Core.Telemetry.Interfaces 4 | { 5 | public interface IExceptionTracker 6 | { 7 | void Track(Exception exception); 8 | } 9 | } -------------------------------------------------------------------------------- /src/Promitor.Core/Metrics/MetricAggregationType.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Metrics; 2 | public enum PromitorMetricAggregationType 3 | { 4 | None, 5 | Average, 6 | Count, 7 | Minimum, 8 | Maximum, 9 | Total 10 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/IAppServiceResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts 2 | { 3 | public interface IAppServiceResourceDefinition : IAzureResourceDefinition 4 | { 5 | public string SlotName { get; } 6 | } 7 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Model/Aggregation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Promitor.Core.Scraping.Configuration.Model 4 | { 5 | public class Aggregation 6 | { 7 | public TimeSpan? Interval { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/Promitor.Integrations.Sinks.Prometheus/Configuration/LabelTransformation.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Integrations.Sinks.Prometheus.Configuration 2 | { 3 | public enum LabelTransformation 4 | { 5 | None, 6 | Lowercase 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/Promitor.Integrations.Sinks.Statsd/Configuration/StatsdFormatterTypesEnum.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Integrations.Sinks.Statsd.Configuration 2 | { 3 | public enum StatsdFormatterTypesEnum 4 | { 5 | Default, 6 | Geneva 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/.monova.config: -------------------------------------------------------------------------------- 1 | { 2 | "MajorKeys": [ 3 | ":major:", ":M:" 4 | ], 5 | "MinorKeys": [ 6 | ":minor:", ":m:" 7 | ], 8 | "PatchKeys": [ 9 | ":patch:", ":p:" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/exampleSite/content/released/2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "(2018-08-17)" 3 | date: 2018-09-02T20:46:47+02:00 4 | weight: 2 5 | version: v1.2 6 | --- 7 | 8 | - {{% tag fixed %}} Skip installing postcss due to failure on build server 9 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ partial "head.html" . }} 2 | 4 | 5 | Not Implemented 6 | 7 | {{ partial "footer.html" . }} 8 | -------------------------------------------------------------------------------- /src/Promitor.Agents.Core/Validation/Interfaces/IValidationStep.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Agents.Core.Validation.Interfaces 2 | { 3 | public interface IValidationStep 4 | { 5 | string ComponentName { get; } 6 | ValidationResult Run(); 7 | } 8 | } -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | {{ partial "head.html" . }} 2 | 4 | 5 | Not Implemented 6 | 7 | {{ partial "footer.html" . }} 8 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ partial "head.html" . }} 2 | 4 | 5 | Not Implemented 6 | 7 | {{ partial "footer.html" . }} 8 | -------------------------------------------------------------------------------- /src/Promitor.Agents.Scraper/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Model/Metrics/AzureResourceDiscoveryGroup.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Model.Metrics 2 | { 3 | public class AzureResourceDiscoveryGroup 4 | { 5 | public string Name { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /src/Promitor.Tests.Unit/UnitTest.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using Bogus; 3 | 4 | namespace Promitor.Tests.Unit 5 | { 6 | [Category("Unit")] 7 | public class UnitTest 8 | { 9 | protected Faker BogusGenerator { get; } = new(); 10 | } 11 | } -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/src/contents/_ad-c.pug: -------------------------------------------------------------------------------- 1 | block ad-carbons 2 | .docs-ad.docs-ad-sidebar.text-center 3 | script#_carbonads_js(async="" type="text/javascript" src="https://cdn.carbonads.com/carbon.js?serve=CK7DTKQW&placement=picturepan2githubio") -------------------------------------------------------------------------------- /src/Promitor.Agents.ResourceDiscovery/Configuration/ResourceCriteriaDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Agents.ResourceDiscovery.Configuration 2 | { 3 | public class ResourceCriteriaDefinition 4 | { 5 | public ResourceCriteria Include { get; set; } = new(); 6 | } 7 | } -------------------------------------------------------------------------------- /src/Promitor.Core/Metrics/Sinks/MetricSinkType.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Metrics.Sinks 2 | { 3 | public enum MetricSinkType 4 | { 5 | PrometheusScrapingEndpoint, 6 | StatsD, 7 | AtlassianStatuspage, 8 | OpenTelemetryCollector 9 | } 10 | } -------------------------------------------------------------------------------- /src/Promitor.Core/Serialization/Enum/AzureCloud.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Serialization.Enum 2 | { 3 | public enum AzureCloud 4 | { 5 | Unspecified, 6 | Global, 7 | China, 8 | UsGov, 9 | Germany, 10 | Custom 11 | } 12 | } -------------------------------------------------------------------------------- /src/Promitor.Agents.Core/Contracts/AgentHealthReport.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Diagnostics.HealthChecks; 2 | 3 | namespace Promitor.Agents.Core.Contracts 4 | { 5 | public class AgentHealthReport 6 | { 7 | public HealthStatus Status { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Promitor.Agents.ResourceDiscovery/Graph/Query/ScalarOperator.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Agents.ResourceDiscovery.Graph.Query 2 | { 3 | public enum Operator 4 | { 5 | Equals, 6 | DoesNotEquals, 7 | Contains, 8 | DoesNotContain 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/layouts/404.html: -------------------------------------------------------------------------------- 1 | {{ partial "head.html" . }} 2 | 4 | 5 | Well, a fine little mess. Easy in, easy out. Another triumph. 6 | 7 | {{ partial "footer.html" . }} 8 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Runtime/MetricsConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Runtime 2 | { 3 | public class MetricsConfiguration 4 | { 5 | public string AbsolutePath { get; set; } = Defaults.MetricsConfiguration.AbsolutePath; 6 | } 7 | } -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/exampleSite/content/experimental/ex2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "(2018-09-15)" 3 | date: 2018-09-02T20:46:47+02:00 4 | weight: 1 5 | version: 6 | --- 7 | 8 | - {{% tag fixed %}} Space between `ul` elements 9 | - {{% tag performance %}} It is now 1337 times faster 10 | -------------------------------------------------------------------------------- /src/Promitor.Agents.Core/Contracts/SystemInfo.cs: -------------------------------------------------------------------------------- 1 | using Swashbuckle.AspNetCore.Annotations; 2 | 3 | namespace Promitor.Agents.Core.Contracts 4 | { 5 | public class SystemInfo 6 | { 7 | [SwaggerSchema("Version of the agent")] 8 | public string Version { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/PageInformation.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts 2 | { 3 | public class PageInformation 4 | { 5 | public int PageSize { get; set; } 6 | public int CurrentPage { get; set; } 7 | public long TotalRecords { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Promitor.Integrations.Sinks.Statsd/Configuration/GenevaConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Integrations.Sinks.Statsd.Configuration 2 | { 3 | public class GenevaConfiguration 4 | { 5 | public string Account { get; set; } 6 | public string Namespace { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/src/scss/spectre-rtl.scss: -------------------------------------------------------------------------------- 1 | /*! Spectre.css RTL | MIT License | github.com/picturepan2/spectre */ 2 | $rtl: true; 3 | 4 | // Import Spectre 5 | @import "../../../src/spectre"; 6 | @import "../../../src/spectre-icons"; 7 | @import "../../../src/spectre-exp"; 8 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/exampleSite/content/experimental/ex.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "(2018-09-15)" 3 | date: 2018-09-02T20:46:47+02:00 4 | weight: 1 5 | version: 6 | --- 7 | 8 | - {{% tag added %}} Add a test for template variable overwrite 9 | - {{% tag changed %}} `Update to Go` 1.11 10 | 11 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/exampleSite/content/released/3.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Trusty Tahr" 3 | date: 2018-09-02T20:46:47+02:00 4 | weight: 3 5 | version: v1.3 6 | --- 7 | 8 | - {{% tag fixed %}} Fix .Site.Params case regression 9 | - {{% tag fixed %}} Do not strip IE conditional statements 10 | -------------------------------------------------------------------------------- /src/Promitor.Integrations.Sinks.OpenTelemetry/Configuration/OpenTelemetryCollectorSinkConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Integrations.Sinks.OpenTelemetry.Configuration 2 | { 3 | public class OpenTelemetryCollectorSinkConfiguration 4 | { 5 | public string CollectorUri { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Promitor.Agents.ResourceDiscovery/Configuration/CacheConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Agents.ResourceDiscovery.Configuration 2 | { 3 | public class CacheConfiguration 4 | { 5 | public bool Enabled { get; set; } = true; 6 | public int DurationInMinutes { get; set; } = 5; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/Promitor.Integrations.Sinks.Atlassian.Statuspage/IAtlassianStatuspageClient.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace Promitor.Integrations.Sinks.Atlassian.Statuspage 4 | { 5 | public interface IAtlassianStatuspageClient 6 | { 7 | Task ReportMetricAsync(string id, double value); 8 | } 9 | } -------------------------------------------------------------------------------- /src/Promitor.Integrations.Sinks.Prometheus/Configuration/LabelConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Integrations.Sinks.Prometheus.Configuration 2 | { 3 | public class LabelConfiguration 4 | { 5 | public LabelTransformation Transformation { get; set; } = Defaults.Prometheus.LabelTransformation; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Promitor.Integrations.Sinks.Prometheus/Configuration/ScrapeEndpointConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Integrations.Sinks.Prometheus.Configuration 2 | { 3 | public class ScrapeEndpointConfiguration 4 | { 5 | public string BaseUriPath { get; set; } = Defaults.Prometheus.ScrapeEndpointBaseUri; 6 | } 7 | } -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/_utilities.scss: -------------------------------------------------------------------------------- 1 | @import "utilities/colors"; 2 | @import "utilities/cursors"; 3 | @import "utilities/display"; 4 | @import "utilities/divider"; 5 | @import "utilities/loading"; 6 | @import "utilities/position"; 7 | @import "utilities/shapes"; 8 | @import "utilities/text"; 9 | -------------------------------------------------------------------------------- /src/Promitor.Agents.Scraper/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "Debug": { 5 | "LogLevel": { 6 | "Default": "Warning" 7 | } 8 | }, 9 | "Console": { 10 | "LogLevel": { 11 | "Default": "Warning" 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Defaults.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping 2 | { 3 | public static class Defaults 4 | { 5 | public static class MetricsConfiguration 6 | { 7 | public static string AbsolutePath { get; } = "/config/metrics-declaration.yaml"; 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/performance/steady-load-scraper-scrape.yml: -------------------------------------------------------------------------------- 1 | config: 2 | target: "http://localhost:888" 3 | phases: 4 | - duration: 60 5 | arrivalRate: 5 6 | rampTo: 25 7 | name: Sustained User Growth 8 | 9 | scenarios: 10 | - name: "Scrape" 11 | flow: 12 | - get: 13 | url: "/scrape" -------------------------------------------------------------------------------- /src/Promitor.Integrations.Sinks.Atlassian.Statuspage/Configuration/SystemMetricMapping.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Integrations.Sinks.Atlassian.Statuspage.Configuration 2 | { 3 | public class SystemMetricMapping 4 | { 5 | public string Id { get; set; } 6 | public string PromitorMetricName { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/exampleSite/content/released/4.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "" 3 | subtitle: "released on 2018-08-21" 4 | date: 2018-09-02T20:46:47+02:00 5 | weight: 4 6 | version: v1.4 7 | --- 8 | 9 | - {{% tag removed %}} Remove unused files from Git, Perl, etc. 10 | - {{% tag added %}} Add nodejs to allow PostCSS to work 11 | -------------------------------------------------------------------------------- /src/Promitor.Core/Extensions/IAzureCloudEndpoints.cs: -------------------------------------------------------------------------------- 1 | 2 | using Promitor.Core.Configuration; 3 | using Promitor.Core.Serialization.Enum; 4 | 5 | namespace Promitor.Core.Extensions 6 | { 7 | public interface IAzureCloudEndpoints 8 | { 9 | AzureCloud Cloud { get; } 10 | AzureEndpoints Endpoints { get; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Promitor.Agents.Core/Configuration/Telemetry/Interfaces/ISinkConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | 3 | namespace Promitor.Agents.Core.Configuration.Telemetry.Interfaces 4 | { 5 | public interface ISinkConfiguration 6 | { 7 | LogLevel? Verbosity { get; } 8 | bool IsEnabled { get; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Promitor.Integrations.Azure/Authentication/AuthenticationMode.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Integrations.Azure.Authentication 2 | { 3 | public enum AuthenticationMode 4 | { 5 | ServicePrincipal = 0, 6 | UserAssignedManagedIdentity = 1, 7 | SystemAssignedManagedIdentity = 2, 8 | SdkDefault = 3 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/mixins/_shadow.scss: -------------------------------------------------------------------------------- 1 | // Component focus shadow 2 | @mixin control-shadow($color: $primary-color) { 3 | box-shadow: 0 0 0 .1rem rgba($color, .2); 4 | } 5 | 6 | // Shadow mixin 7 | @mixin shadow-variant($offset) { 8 | box-shadow: 0 $offset ($offset + .05rem) * 2 rgba($dark-color, .3); 9 | } 10 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/mixins/_label.scss: -------------------------------------------------------------------------------- 1 | // Label base style 2 | @mixin label-base() { 3 | border-radius: $border-radius; 4 | line-height: 1.2; 5 | padding: .1rem .2rem; 6 | } 7 | 8 | @mixin label-variant($color: $light-color, $bg-color: $primary-color) { 9 | background: $bg-color; 10 | color: $color; 11 | } 12 | -------------------------------------------------------------------------------- /config/promitor/resource-discovery/runtime.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | httpPort: 88 3 | authentication: 4 | mode: ServicePrincipal 5 | identityId: 7e2355f7-3f11-47fd-9b16-c8f8ec527a48 6 | telemetry: 7 | applicationInsights: 8 | instrumentationKey: ABC 9 | isEnabled: false 10 | containerLogs: 11 | isEnabled: true 12 | defaultVerbosity: information -------------------------------------------------------------------------------- /src/Promitor.Agents.ResourceDiscovery/Configuration/AgentRuntimeConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Promitor.Agents.Core.Configuration; 2 | 3 | namespace Promitor.Agents.ResourceDiscovery.Configuration 4 | { 5 | public class AgentRuntimeConfiguration : RuntimeConfiguration 6 | { 7 | public CacheConfiguration Cache { get; set; } = new(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/LogAnalyticsConfigurationV1.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model 3 | { 4 | public class LogAnalyticsConfigurationV1 5 | { 6 | public string Query { get; set; } 7 | 8 | public AggregationV1 Aggregation { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/exampleSite/content/released/1.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "(2018-08-15)" 3 | date: 2018-09-02T20:46:47+02:00 4 | weight: 1 5 | version: v1.1 6 | --- 7 | 8 | - {{% tag fixed %}} Keep end tags 9 | - {{% tag added %}} Fix permissions when creating new folders 10 | - {{% tag fixed %}} Fix handling of taxonomy terms containing slashes 11 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | @import "mixins/avatar"; 3 | @import "mixins/button"; 4 | @import "mixins/clearfix"; 5 | @import "mixins/color"; 6 | @import "mixins/label"; 7 | @import "mixins/position"; 8 | @import "mixins/shadow"; 9 | @import "mixins/text"; 10 | @import "mixins/toast"; 11 | @import "mixins/transition"; 12 | -------------------------------------------------------------------------------- /src/Promitor.Tests.Unit/Serialization/FieldDeserializationInfoBuilderTests/TestConfig.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Tests.Unit.Serialization.FieldDeserializationInfoBuilderTests 2 | { 3 | public class TestConfig 4 | { 5 | public string Name { get; set; } 6 | public string GetName() 7 | { 8 | return ""; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: Ask a question 💬 4 | url: https://github.com/tomkerkhove/promitor/discussions/new 5 | about: Ask a question or request support for using Promitor. 6 | - name: Sponsor 💘 7 | url: https://github.com/sponsors/tomkerkhove 8 | about: Sponsor Tom to keep on maintaining Promitor. 9 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/src/contents/experimentals.pug: -------------------------------------------------------------------------------- 1 | p 2 | | The Experimentals include experimental elements and features, mostly are not yet ready for wide use. 3 | | These elements and components are limited inside #[code spectre-exp.scss] before browsers fully support them. 4 | | Sometimes, there are some specific browsers targeted components. -------------------------------------------------------------------------------- /src/Promitor.Agents.Scraper/Configuration/ConcurrencyConfiguration.cs: -------------------------------------------------------------------------------- 1 | using DefaultsCore = Promitor.Agents.Core.Configuration.Defaults; 2 | 3 | namespace Promitor.Agents.Scraper.Configuration 4 | { 5 | public class ConcurrencyConfiguration 6 | { 7 | public int MutexTimeoutSeconds { get; set; } = DefaultsCore.Concurrency.MutexTimeoutSeconds; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Promitor.Integrations.AzureMonitor/Configuration/AzureMonitorConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Integrations.AzureMonitor.Configuration 2 | { 3 | public class AzureMonitorConfiguration 4 | { 5 | public AzureMonitorIntegrationConfiguration Integration { get; set; } = new(); 6 | public AzureMonitorLoggingConfiguration Logging { get; set; } = new(); 7 | } 8 | } -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "({{ now.Format "2006-01-02" }})" 3 | subtitle: created on {{ now.Format "2006-01-02" }} 4 | date: {{ .Date }} 5 | weight: 6 | version: 7 | draft: true 8 | --- 9 | 10 | 11 | - {{% tag added %}} New functionality 12 | -------------------------------------------------------------------------------- /src/Promitor.Agents.Core/Validation/Steps/ValidationStep.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | 3 | namespace Promitor.Agents.Core.Validation.Steps 4 | { 5 | public class ValidationStep 6 | { 7 | protected ILogger Logger { get; } 8 | 9 | public ValidationStep(ILogger logger) 10 | { 11 | Logger = logger; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Promitor.Agents.Scraper/Configuration/ResourceDiscoveryConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Agents.Scraper.Configuration 2 | { 3 | public class ResourceDiscoveryConfiguration 4 | { 5 | public string Host { get; set; } 6 | public int? Port { get; set; } = 80; 7 | 8 | public bool IsConfigured => string.IsNullOrWhiteSpace(Host) == false; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/spectre-icons.scss: -------------------------------------------------------------------------------- 1 | // Variables and mixins 2 | @import "variables"; 3 | @import "mixins"; 4 | 5 | /*! Spectre.css Icons v#{$version} | MIT License | github.com/picturepan2/spectre */ 6 | // Icons 7 | @import "icons/icons-core"; 8 | @import "icons/icons-navigation"; 9 | @import "icons/icons-action"; 10 | @import "icons/icons-object"; 11 | -------------------------------------------------------------------------------- /changelog/content/released/v0.14.1-resource-discovery.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2025-07-29" 3 | date: 2025-07-29T19:00:47+02:00 4 | weight: 1037 5 | version: Resource Discovery - v0.14.1 6 | --- 7 | 8 | - {{% tag security %}} Patch for various CVEs 9 | 10 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/ResourceDiscovery-v0.14.1). 11 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/utilities/_cursors.scss: -------------------------------------------------------------------------------- 1 | // Cursors 2 | .c-hand { 3 | cursor: pointer; 4 | } 5 | 6 | .c-move { 7 | cursor: move; 8 | } 9 | 10 | .c-zoom-in { 11 | cursor: zoom-in; 12 | } 13 | 14 | .c-zoom-out { 15 | cursor: zoom-out; 16 | } 17 | 18 | .c-not-allowed { 19 | cursor: not-allowed; 20 | } 21 | 22 | .c-auto { 23 | cursor: auto; 24 | } 25 | -------------------------------------------------------------------------------- /src/Promitor.Core/Defaults.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core 2 | { 3 | public static class Defaults 4 | { 5 | public static class AppServices 6 | { 7 | public static string SlotName { get; } = "production"; 8 | } 9 | 10 | public static class MetricDefaults 11 | { 12 | public static int Limit => 10000; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/src/contents/introduction.pug: -------------------------------------------------------------------------------- 1 | p 2 | strong Spectre.css 3 | | is a lightweight, responsive and modern CSS framework for faster and extensible development. 4 | p 5 | | Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language. -------------------------------------------------------------------------------- /changelog/content/released/v0.15.0-resource-discovery.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2025-11-13" 3 | date: 2025-11-13T19:00:47+02:00 4 | weight: 1039 5 | version: Resource Discovery - v0.15.0 6 | --- 7 | 8 | - {{% tag feature %}} Provide support for discovering Azure DNS zones 9 | 10 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/ResourceDiscovery-v0.15.0). 11 | -------------------------------------------------------------------------------- /changelog/content/released/v2.11.2-scraper.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2024-06-05" 3 | date: 2024-06-05T07:00:47+02:00 4 | weight: 1030 5 | version: Scraper - v2.11.2 6 | --- 7 | 8 | - {{% tag changes %}} Migrate to latest Azure.Monitor SDK 9 | - {{% tag security %}} Patch for various CVEs 10 | 11 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/Scraper-v2.11.2). 12 | -------------------------------------------------------------------------------- /changelog/content/released/v0.6.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2019-02-06" 3 | date: 2019-02-06T20:46:47+02:00 4 | weight: 060 5 | version: Scraper - v0.6.0 6 | --- 7 | 8 | - {{% tag changed %}} Provide capability to opt-out of metric timestamps ([#290](https://github.com/tomkerkhove/promitor/issues/290)) 9 | 10 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/0.6.0). 11 | -------------------------------------------------------------------------------- /src/Promitor.Agents.ResourceDiscovery/Configuration/ResourceDiscoveryGroup.cs: -------------------------------------------------------------------------------- 1 | using Promitor.Core.Contracts; 2 | 3 | namespace Promitor.Agents.ResourceDiscovery.Configuration 4 | { 5 | public class ResourceDiscoveryGroup 6 | { 7 | public string Name { get; set; } 8 | public ResourceType Type { get; set; } 9 | public ResourceCriteriaDefinition Criteria { get; set; } = new(); 10 | } 11 | } -------------------------------------------------------------------------------- /changelog/content/released/v2.9.1-scraper.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2023-03-20" 3 | date: 2023-05-20T07:00:47+02:00 4 | weight: 1022 5 | version: Scraper - v2.9.1 6 | --- 7 | 8 | - {{% tag security %}} Patch for [CVE-2023-28260](https://github.com/advisories/GHSA-w4m3-43gp-x8hx) (High | Base image) 9 | 10 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/Scraper-v2.9.1). 11 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/archetypes/deprecated.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "({{ now.Format "2006-01-02" }})" 3 | subtitle: created on {{ now.Format "2006-01-02" }} 4 | date: {{ .Date }} 5 | removal_date: {{ now.Format "2006-01-02" }} # Set this to the target date of removal (YYYY-MM-DD) 6 | weight: 7 | version: 8 | draft: false 9 | --- 10 | 11 | #### Feature X will be removed 12 | 13 | Description in **Markdown** format 14 | -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | Support 2 | === 3 | 4 | Promitor is actively maintained and developed with best-effort support. 5 | 6 | We do welcome PRs that implement features from our backlog and are always happy 7 | to help you incorporate Promitor in your infrastructure, but do not provide 24/7 8 | support. 9 | 10 | Are you having issues or feature requests? Feel free to [let us know](https://github.com/tomkerkhove/promitor/issues/new/choose)! 11 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/_animations.scss: -------------------------------------------------------------------------------- 1 | // Animations 2 | @keyframes loading { 3 | 0% { 4 | transform: rotate(0deg); 5 | } 6 | 100% { 7 | transform: rotate(360deg); 8 | } 9 | } 10 | 11 | @keyframes slide-down { 12 | 0% { 13 | opacity: 0; 14 | transform: translateY(-$unit-8); 15 | } 16 | 100% { 17 | opacity: 1; 18 | transform: translateY(0); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /config/prometheus/prometheus.yml: -------------------------------------------------------------------------------- 1 | scrape_configs: 2 | - job_name: promitor 3 | scrape_interval: 5s 4 | metrics_path: /metrics 5 | static_configs: 6 | - targets: ['promitor.agents.scraper:88'] 7 | - targets: ['opentelemetry-collector:8889'] 8 | - targets: ['opentelemetry-collector:8888'] 9 | - job_name: traefik 10 | scrape_interval: 5s 11 | static_configs: 12 | - targets: 13 | - traefik-reverse-proxy:8080 14 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/.githooks/post-merge: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | STABLE_BRANCH=master 4 | CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD` 5 | if [ "$CURRENT_BRANCH" = "$STABLE_BRANCH" ] 6 | then 7 | if [ `ls -l site/changelog/content/experimental | wc -l` -gt 1 ] 8 | then 9 | echo -e "\033[0;31mThere are experimental changes. Consider creating a release in develop branch\033[0m" 10 | fi 11 | fi 12 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Model/MetricAggregation.cs: -------------------------------------------------------------------------------- 1 | 2 | using Promitor.Core.Metrics; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Model 5 | { 6 | public class MetricAggregation : Aggregation 7 | { 8 | /// 9 | /// Type of aggregation to query the Azure Monitor metric 10 | /// 11 | public PromitorMetricAggregationType Type { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Integrations.Sinks.Atlassian.Statuspage/Configuration/AtlassianStatusPageSinkConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Promitor.Integrations.Sinks.Atlassian.Statuspage.Configuration 4 | { 5 | public class AtlassianStatusPageSinkConfiguration 6 | { 7 | public string PageId { get; set; } 8 | public List SystemMetricMapping { get; set; } = new(); 9 | } 10 | } -------------------------------------------------------------------------------- /changelog/content/released/v0.11.2-resource-discovery.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2024-02-29" 3 | date: 2024-06-05T07:00:47+02:00 4 | weight: 1029 5 | version: Resource Discovery - v0.11.2 6 | --- 7 | 8 | - {{% tag changes %}} Migrate to latest Azure.Monitor SDK 9 | - {{% tag security %}} Patch for various CVEs 10 | 11 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/ResourceDiscovery-v0.11.2). 12 | -------------------------------------------------------------------------------- /changelog/content/released/v0.9.1-resource-discovery.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2023-03-20" 3 | date: 2023-05-20T07:00:47+02:00 4 | weight: 1021 5 | version: Resource Discovery - v0.9.1 6 | --- 7 | 8 | - {{% tag security %}} Patch for [CVE-2023-28260](https://github.com/advisories/GHSA-w4m3-43gp-x8hx) (High | Base image) 9 | 10 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/ResourceDiscovery-v0.9.1). 11 | -------------------------------------------------------------------------------- /changelog/content/experimental/unreleased.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-11-22T12:46:47+02:00 3 | weight: 1 4 | version: 5 | --- 6 | 7 | #### Scraper 8 | 9 | - {{% tag added %}} Provide support for DocumentDB MongoCluster ([docs](https://docs.promitor.io/scraping/providers/mongo-cluster/)) 10 | 11 | #### Resource Discovery 12 | 13 | - {{% tag added %}} Provide support for DocumentDB MongoCluster ([docs](https://docs.promitor.io/scraping/providers/mongo-cluster/)) 14 | -------------------------------------------------------------------------------- /changelog/content/released/v2.1.1-scraper.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2021-03-03" 3 | date: 2021-03-03T10:38:47+02:00 4 | weight: 1001 5 | version: Scraper - v2.1.1 6 | --- 7 | 8 | - {{% tag fixed %}} Issue when metric (values) where not found causing exceptions to be thrown ([#1545](https://github.com/tomkerkhove/promitor/issues/1545)) 9 | 10 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/2.1.1-scraper). 11 | -------------------------------------------------------------------------------- /changelog/content/released/v2.14.1-scraper.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2025-07-29" 3 | date: 2025-07-29T19:00:47+02:00 4 | weight: 1038 5 | version: Scraper - v2.14.1 6 | --- 7 | 8 | - {{% tag fixed %}} Handle duplicate metric namespaces in Azure Monitor scraping queries 9 | - {{% tag security %}} Patch for various CVEs 10 | 11 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/Scraper-v2.14.1). 12 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/AzureResourceDefinitionV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model 2 | { 3 | /// 4 | /// Represents an Azure resource that can be scraped. 5 | /// 6 | public class AzureResourceDefinitionV1 7 | { 8 | public string SubscriptionId { get; set; } 9 | public string ResourceGroupName { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Promitor.Integrations.AzureMonitor/Configuration/AzureMonitorIntegrationConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Integrations.AzureMonitor.Configuration 2 | { 3 | public class AzureMonitorIntegrationConfiguration 4 | { 5 | public AzureMonitorHistoryConfiguration History { get; set; } = new(); 6 | public bool UseAzureMonitorSdk { get; set; } = true; 7 | public AzureMonitorMetricBatchScrapeConfig MetricsBatching { get; set; } = new(); 8 | } 9 | } -------------------------------------------------------------------------------- /changelog/content/released/v0.12.0-resource-discovery.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2024-11-13" 3 | date: 2024-11-13T07:00:47+02:00 4 | weight: 1031 5 | version: Resource Discovery - v0.12.0 6 | --- 7 | 8 | - {{% tag added %}} Provide support for Azure Firewall ([docs](https://docs.promitor.io/v2.12/scraping/providers/azure-firewall/)) 9 | 10 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/ResourceDiscovery-v0.12.0). 11 | -------------------------------------------------------------------------------- /src/Promitor.Integrations.AzureMonitor/Configuration/AzureMonitorLoggingConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Azure.Management.ResourceManager.Fluent.Core; 2 | 3 | namespace Promitor.Integrations.AzureMonitor.Configuration 4 | { 5 | public class AzureMonitorLoggingConfiguration 6 | { 7 | public HttpLoggingDelegatingHandler.Level InformationLevel { get; set; } = HttpLoggingDelegatingHandler.Level.Basic; 8 | public bool IsEnabled { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /changelog/content/released/v0.4.1-resource-discovery.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2021-05-28" 3 | date: 2021-05-28T10:38:47+02:00 4 | weight: 1006 5 | version: Resource Discovery - v0.4.1 6 | --- 7 | 8 | - {{% tag fixed %}} Support for authenticating to Azure clouds other than public ([#1646](https://github.com/tomkerkhove/promitor/issues/1646)) 9 | 10 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/ResourceDiscovery-v0.4.1). 11 | -------------------------------------------------------------------------------- /changelog/content/released/v0.5.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2019-01-24" 3 | date: 2019-01-24T20:46:47+02:00 4 | weight: 050 5 | version: Scraper - v0.5.0 6 | --- 7 | 8 | - {{% tag added %}} Include timestamp information in metrics ([docs](https://docs.promitor.io/configuration/v0.x/#scraping) 9 | | [#254](https://github.com/tomkerkhove/promitor/issues/254)) 10 | 11 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/0.5.0). 12 | -------------------------------------------------------------------------------- /changelog/content/released/v1.5.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2020-04-06" 3 | date: 2020-04-06T17:38:47+02:00 4 | weight: 150 5 | version: Scraper - v1.5.0 6 | --- 7 | 8 | - {{% tag added %}} Support for scraping multiple subscriptions ([docs](https://docs.promitor.io/configuration/v1.x/metrics/) 9 | | [#761](https://github.com/tomkerkhove/promitor/issues/761)) 10 | 11 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/1.5.0). 12 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/MetricDimensionV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model 2 | { 3 | /// 4 | /// Information about the dimension of an Azure Monitor metric 5 | /// 6 | public class MetricDimensionV1 7 | { 8 | /// 9 | /// Name of the dimension 10 | /// 11 | public string Name { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Integrations.AzureStorage/AzureStorageConstants.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Integrations.AzureStorage 2 | { 3 | public static class AzureStorageConstants 4 | { 5 | public static class Queues 6 | { 7 | public static class Metrics 8 | { 9 | public const string MessageCount = "messagecount"; 10 | public const string TimeSpentInQueue = "timespentinqueue"; 11 | } 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /changelog/content/released/v0.2.1.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2018-09-23" 3 | date: 2018-09-23T20:46:47+02:00 4 | weight: 021 5 | version: Scraper - v0.2.1 6 | --- 7 | 8 | - {{% tag security %}} Mitigation for vulnerability CVE-2018-8409 ([announcement](https://github.com/aspnet/Announcements/issues/316) 9 | | [#167](https://github.com/tomkerkhove/promitor/issues/167)) 10 | 11 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/0.2.1). 12 | -------------------------------------------------------------------------------- /src/Promitor.Integrations.Azure/Authentication/Configuration/AuthenticationConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Integrations.Azure.Authentication.Configuration 2 | { 3 | public class AuthenticationConfiguration 4 | { 5 | public AuthenticationMode Mode { get; set; } = AuthenticationMode.ServicePrincipal; 6 | public string IdentityId { get; set; } 7 | public string SecretFilePath { get; set; } 8 | public string SecretFileName { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/Enums/MySqlServerType.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes.Enums 2 | { 3 | public enum MySqlServerType 4 | { 5 | // Azure Database for MySQL Single Server 6 | // See: https://docs.microsoft.com/en-us/azure/MySQL/single-server/ 7 | Single, 8 | 9 | // Azure Database for MySQL - Flexible Server 10 | // See: https://docs.microsoft.com/en-us/azure/MySQL/flexible-server 11 | Flexible 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/AzureResourceDiscoveryGroupDefinitionV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model 2 | { 3 | /// 4 | /// Represents a resource collection that represent a collection of Azure resource that are automatically discovered and will be scraped. 5 | /// 6 | public class AzureResourceDiscoveryGroupDefinitionV1 7 | { 8 | public string Name { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Promitor.Agents.ResourceDiscovery/Configuration/ResourceCriteria.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Promitor.Agents.ResourceDiscovery.Configuration 4 | { 5 | public class ResourceCriteria 6 | { 7 | public Dictionary Tags { get; set; } = new(); 8 | public List Subscriptions { get; set; } = new(); 9 | public List ResourceGroups { get; set; } = new(); 10 | public List Regions { get; set; } = new(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ScrapingV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model 2 | { 3 | /// 4 | /// Contains settings about how promitor scrapes Azure metrics. 5 | /// 6 | public class ScrapingV1 7 | { 8 | /// 9 | /// A cron expression describing how often scrapes should occur. 10 | /// 11 | public string Schedule { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /changelog/content/released/v0.10.0-resource-discovery.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2023-07-29" 3 | date: 2023-07-29T07:00:47+02:00 4 | weight: 1023 5 | version: Resource Discovery - v0.10.0 6 | --- 7 | 8 | - {{% tag changed %}} Switch to Mariner distroless base images 9 | - {{% tag security %}} Patch for [CVE-2023-29331](https://github.com/advisories/GHSA-555c-2p6r-68mm) (High) 10 | 11 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/ResourceDiscovery-v0.10.0). 12 | -------------------------------------------------------------------------------- /src/Promitor.Agents.ResourceDiscovery/Configuration/ResourceDeclaration.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Promitor.Core.Serialization.Enum; 3 | 4 | namespace Promitor.Agents.ResourceDiscovery.Configuration 5 | { 6 | public class ResourceDeclaration 7 | { 8 | public string Version { get; set; } = SpecVersion.v1.ToString(); 9 | public AzureLandscape AzureLandscape { get; set; } 10 | public List ResourceDiscoveryGroups { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Promitor.Agents.Scraper/Health/IScrapeScheduleProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Promitor.Agents.Scraper.Health 4 | { 5 | /// 6 | /// Provides information about the configured scrape schedules 7 | /// 8 | public interface IScrapeScheduleProvider 9 | { 10 | /// 11 | /// Gets the minimum scrape interval across all configured metrics 12 | /// 13 | TimeSpan GetMinimumScrapeInterval(); 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/CdnResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class CdnResourceDefinition : AzureResourceDefinition 4 | { 5 | public CdnResourceDefinition(string subscriptionId, string resourceGroupName, string cdnName) 6 | : base(ResourceType.Cdn, subscriptionId, resourceGroupName, cdnName) 7 | { 8 | CdnName = cdnName; 9 | } 10 | 11 | public string CdnName { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core/Metrics/Sinks/IMetricSink.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | 4 | namespace Promitor.Core.Metrics.Sinks 5 | { 6 | public interface IMetricSink 7 | { 8 | MetricSinkType Type { get; } 9 | 10 | Task ReportMetricAsync(string metricName, string metricDescription, ScrapeResult scrapeResult); 11 | Task ReportMetricAsync(string metricName, string metricDescription, double metricValue, Dictionary labels); 12 | } 13 | } -------------------------------------------------------------------------------- /config/opentelemetry-collector/collector-config.yaml: -------------------------------------------------------------------------------- 1 | receivers: 2 | otlp: 3 | protocols: 4 | grpc: 5 | 6 | exporters: 7 | prometheus: 8 | endpoint: "0.0.0.0:8889" 9 | namespace: otel 10 | const_labels: 11 | source_app: promitor 12 | send_timestamps: true 13 | 14 | processors: 15 | batch: 16 | 17 | extensions: 18 | 19 | service: 20 | extensions: [] 21 | pipelines: 22 | metrics: 23 | receivers: [otlp] 24 | processors: [batch] 25 | exporters: [prometheus] 26 | -------------------------------------------------------------------------------- /src/Promitor.Agents.ResourceDiscovery/Graph/Model/AzureResourceGroupInformation.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Agents.ResourceDiscovery.Graph.Model 2 | { 3 | public class AzureResourceGroupInformation 4 | { 5 | public string TenantId { get; set; } 6 | public string SubscriptionId { get; set; } 7 | public string Name { get; set; } 8 | public string Region { get; set; } 9 | public string ManagedBy { get; set; } 10 | public string ProvisioningState { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/IFieldDeserializationInfoBuilder.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization 2 | { 3 | /// 4 | /// An object that can build objects. 5 | /// 6 | public interface IFieldDeserializationInfoBuilder 7 | { 8 | /// 9 | /// Builds the deserialization info object. 10 | /// 11 | FieldDeserializationInfo Build(); 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Integrations.Sinks.Statsd/Configuration/StatsdSinkConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Integrations.Sinks.Statsd.Configuration 2 | { 3 | public class StatsdSinkConfiguration 4 | { 5 | public string Host { get; set; } 6 | public int Port { get; set; } = 8125; 7 | public string MetricPrefix { get; set; } 8 | public StatsdFormatterTypesEnum MetricFormat { get; set; } = StatsdFormatterTypesEnum.Default; 9 | public GenevaConfiguration Geneva { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Promitor.Tests.Unit/ConfigurationKeys.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Tests.Unit 2 | { 3 | public class ConfigurationKeys 4 | { 5 | public class Authentication 6 | { 7 | public const string IdentityId = "authentication:IdentityId"; 8 | public const string Mode = "authentication:Mode"; 9 | public const string SecretFilePath = "authentication:SecretFilePath"; 10 | public const string SecretFileName = "authentication:SecretFileName"; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/_empty.scss: -------------------------------------------------------------------------------- 1 | // Empty states (or Blank slates) 2 | .empty { 3 | background: $bg-color; 4 | border-radius: $border-radius; 5 | color: $gray-color-dark; 6 | text-align: center; 7 | padding: $unit-16 $unit-8; 8 | 9 | .empty-icon { 10 | margin-bottom: $layout-spacing-lg; 11 | } 12 | 13 | .empty-title, 14 | .empty-subtitle { 15 | margin: $layout-spacing auto; 16 | } 17 | 18 | .empty-action { 19 | margin-top: $layout-spacing-lg; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/CosmosDbResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class CosmosDbResourceDefinition : AzureResourceDefinition 4 | { 5 | public CosmosDbResourceDefinition(string subscriptionId, string resourceGroupName, string dbName) 6 | : base(ResourceType.CosmosDb, subscriptionId, resourceGroupName, dbName) 7 | { 8 | DbName = dbName; 9 | } 10 | 11 | public string DbName { get; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Model/MetricsDeclaration.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Promitor.Core.Scraping.Configuration.Model.Metrics; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Model 5 | { 6 | public class MetricsDeclaration 7 | { 8 | public AzureMetadata AzureMetadata { get; set; } 9 | public MetricDefaults MetricDefaults { get; set; } = new MetricDefaults(); 10 | public List Metrics { get; set; } = new List(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/Promitor.Tests.Integration/Services/Scraper/ScraperIntegrationTest.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | using Xunit.Abstractions; 3 | 4 | namespace Promitor.Tests.Integration.Services.Scraper 5 | { 6 | [Trait("Agent", "Scraper")] 7 | public class ScraperIntegrationTest : IntegrationTest 8 | { 9 | public ScraperIntegrationTest(ITestOutputHelper testOutput) : base(testOutput) 10 | { 11 | } 12 | 13 | public string ExpectedVersion => Configuration["Agents:Scraper:Expectations:Version"]; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /changelog/content/released/v0.14.0-resource-discovery.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2025-04-10" 3 | date: 2025-04-10T07:00:47+02:00 4 | weight: 1035 5 | version: Resource Discovery - v0.14.0 6 | --- 7 | 8 | - {{% tag added %}} Provide support for Cognitive Services Account ([docs](https://docs.promitor.io/scraping/providers/cognitive-services-account/)) 9 | - {{% tag security %}} Patch for various CVEs 10 | 11 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/ResourceDiscovery-v0.14.0). 12 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/_panels.scss: -------------------------------------------------------------------------------- 1 | // Panels 2 | .panel { 3 | border: $border-width solid $border-color; 4 | border-radius: $border-radius; 5 | display: flex; 6 | flex-direction: column; 7 | 8 | .panel-header, 9 | .panel-footer { 10 | flex: 0 0 auto; 11 | padding: $layout-spacing-lg; 12 | } 13 | 14 | .panel-nav { 15 | flex: 0 0 auto; 16 | } 17 | 18 | .panel-body { 19 | flex: 1 1 auto; 20 | overflow-y: auto; 21 | padding: 0 $layout-spacing-lg; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Promitor.Agents.Scraper/Configuration/HealthCheckConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Agents.Scraper.Configuration 2 | { 3 | public class HealthCheckConfiguration 4 | { 5 | /// 6 | /// Indicates whether the scraper freshness health check is enabled. 7 | /// This health check monitors whether scrapes have been completed recently. 8 | /// Defaults to true. 9 | /// 10 | public bool EnableScraperFreshnessHealthCheck { get; set; } = true; 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /src/Promitor.Agents.Scraper/Discovery/Interfaces/IResourceDiscoveryRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using Promitor.Agents.Core.Contracts; 4 | using Promitor.Core.Contracts; 5 | 6 | namespace Promitor.Agents.Scraper.Discovery.Interfaces 7 | { 8 | public interface IResourceDiscoveryRepository 9 | { 10 | Task> GetResourceDiscoveryGroupAsync(string resourceDiscoveryGroupName); 11 | Task GetHealthAsync(); 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/IoTHubResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class IoTHubResourceDefinition : AzureResourceDefinition 4 | { 5 | public IoTHubResourceDefinition(string subscriptionId, string resourceGroupName, string iotHubName) 6 | : base(ResourceType.IoTHub, subscriptionId, resourceGroupName, iotHubName) 7 | { 8 | IoTHubName = iotHubName; 9 | } 10 | 11 | public string IoTHubName { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/KeyVaultResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class KeyVaultResourceDefinition : AzureResourceDefinition 4 | { 5 | public KeyVaultResourceDefinition(string subscriptionId, string resourceGroupName, string vaultName) 6 | : base(ResourceType.KeyVault, subscriptionId, resourceGroupName, vaultName) 7 | { 8 | VaultName = vaultName; 9 | } 10 | 11 | public string VaultName { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/AzureMetadataV1.cs: -------------------------------------------------------------------------------- 1 | using Promitor.Core.Serialization.Enum; 2 | 3 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model 4 | { 5 | public class AzureMetadataV1 6 | { 7 | public string TenantId { get; set; } 8 | public string SubscriptionId { get; set; } 9 | public string ResourceGroupName { get; set; } 10 | public AzureCloud Cloud { get; set; } 11 | public AzureEndpointsV1 Endpoints { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/CdnResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure CDN. 5 | /// 6 | public class CdnResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure CDN instance. 10 | /// 11 | public string CdnName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/DnsZoneResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Configuration required to scrape an Azure DNS Zone. 5 | /// 6 | public class DnsZoneResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The DNS zone name (e.g., example.com). 10 | /// 11 | public string ZoneName { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /changelog/content/released/v0.4.0-resource-discovery.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2021-05-07" 3 | date: 2021-05-07T10:38:47+02:00 4 | weight: 1005 5 | version: Resource Discovery - v0.4.0 6 | --- 7 | 8 | - {{% tag added %}} Provide scraper for Azure Monitor Autoscale ([docs](https://docs.promitor.io/configuration/v2.x/metrics/monitor-autoscale) 9 | | [#1593](https://github.com/tomkerkhove/promitor/issues/1593)) 10 | 11 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/ResourceDiscovery-v0.4.0). 12 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/spectre-exp.scss: -------------------------------------------------------------------------------- 1 | // Variables and mixins 2 | @import "variables"; 3 | @import "mixins"; 4 | 5 | /*! Spectre.css Experimentals v#{$version} | MIT License | github.com/picturepan2/spectre */ 6 | // Experimentals 7 | @import "autocomplete"; 8 | @import "calendars"; 9 | @import "carousels"; 10 | @import "comparison-sliders"; 11 | @import "filters"; 12 | @import "meters"; 13 | @import "off-canvas"; 14 | @import "parallax"; 15 | @import "progress"; 16 | @import "sliders"; 17 | @import "timelines"; 18 | -------------------------------------------------------------------------------- /src/Promitor.Agents.Core/Configuration/Telemetry/Sinks/ContainerLogConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Agents.Core.Configuration.Telemetry.Interfaces; 3 | 4 | namespace Promitor.Agents.Core.Configuration.Telemetry.Sinks 5 | { 6 | public class ContainerLogConfiguration : ISinkConfiguration 7 | { 8 | public LogLevel? Verbosity { get; set; } = Defaults.Telemetry.ContainerLogs.Verbosity; 9 | public bool IsEnabled { get; set; } = Defaults.Telemetry.ContainerLogs.IsEnabled; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Model/LogAnalyticsConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Model 2 | { 3 | public class LogAnalyticsConfiguration 4 | { 5 | /// 6 | /// Configuration on how to query the log analytics 7 | /// 8 | public string Query { get; set; } 9 | 10 | /// 11 | /// Configuration on how to aggregate the query 12 | /// 13 | public Aggregation Aggregation { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/CosmosDbResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape a Cosmos database. 5 | /// 6 | public class CosmosDbResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The cosmos database name. 10 | /// 11 | public string DbName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/MongoClusterResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape a Mongo cluster. 5 | /// 6 | public class MongoClusterResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The mongo cluster name. 10 | /// 11 | public string ClusterName { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Integrations.AzureMonitor/Configuration/AzureMonitorHistoryConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | namespace Promitor.Integrations.AzureMonitor.Configuration 3 | { 4 | public class AzureMonitorHistoryConfiguration 5 | { 6 | public int StartingFromInHours { get; set; } = 12; 7 | public TimeSpan? StartingFromOffset { get; set; } 8 | 9 | public TimeSpan ResolveEffectiveStartingFrom() 10 | { 11 | return StartingFromOffset ?? TimeSpan.FromHours(StartingFromInHours); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/RedisCacheResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class RedisCacheResourceDefinition : AzureResourceDefinition 4 | { 5 | public RedisCacheResourceDefinition(string subscriptionId, string resourceGroupName, string cacheName) 6 | : base(ResourceType.RedisCache, subscriptionId, resourceGroupName, cacheName) 7 | { 8 | CacheName = cacheName; 9 | } 10 | 11 | public string CacheName { get; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/RedisCacheResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape a redis cache. 5 | /// 6 | public class RedisCacheResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the redis cache. 10 | /// 11 | public string CacheName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/LogicAppResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class LogicAppResourceDefinition : AzureResourceDefinition 4 | { 5 | public LogicAppResourceDefinition(string subscriptionId, string resourceGroupName, string workflowName) 6 | : base(ResourceType.LogicApp, subscriptionId, resourceGroupName, workflowName) 7 | { 8 | WorkflowName = workflowName; 9 | } 10 | 11 | public string WorkflowName { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Interfaces/IScraper.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Promitor.Core.Contracts; 3 | using Promitor.Core.Scraping.Configuration.Model.Metrics; 4 | 5 | namespace Promitor.Core.Scraping.Interfaces 6 | { 7 | public interface IScraper where TResourceDefinition : class, IAzureResourceDefinition 8 | { 9 | Task ScrapeAsync(ScrapeDefinition scrapeDefinition); 10 | Task BatchScrapeAsync(BatchScrapeDefinition batchScrapeDefinition); 11 | } 12 | } -------------------------------------------------------------------------------- /src/Promitor.Agents.ResourceDiscovery/Graph/Model/AzureSubscriptionInformation.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Agents.ResourceDiscovery.Graph.Model 2 | { 3 | public class AzureSubscriptionInformation 4 | { 5 | public string TenantId { get; set; } 6 | public string Name { get; set; } 7 | public string Id { get; set; } 8 | public string State { get; set; } 9 | public string SpendingLimit { get; set; } 10 | public string QuotaId { get; set; } 11 | public string AuthorizationSource { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/AggregationV1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model 4 | { 5 | /// 6 | /// Contains aggregation settings used when querying Azure metrics. 7 | /// 8 | public class AggregationV1 9 | { 10 | /// 11 | /// The interval to use for aggregating the metric data when querying Azure metrics. 12 | /// 13 | public TimeSpan? Interval { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/LogicAppResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure Logic App. 5 | /// 6 | public class LogicAppResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the workflow to scrape. 10 | /// 11 | public string WorkflowName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /changelog/content/experimental/unreleased.md.template: -------------------------------------------------------------------------------- 1 | --- 2 | title: "(2018-09-15)" 3 | date: 2018-09-02T20:46:47+02:00 4 | weight: 1 5 | version: 6 | --- 7 | 8 | - {{% tag added %}} Add a test for template variable overwrite 9 | - {{% tag changed %}} Include language code in REF_NOT_FOUND errors 10 | - {{% tag fixed %}} Improve minifier MIME type resolution 11 | - {{% tag deprecated %}} Set GO111MODULE=on for mage install 12 | - {{% tag removed %}} Add instruction to install PostCSS when missing 13 | - {{% tag security %}} Update snapcraft build config to Go 1.11 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/ApplicationInsightsResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class ApplicationInsightsResourceDefinition : AzureResourceDefinition 4 | { 5 | public ApplicationInsightsResourceDefinition(string subscriptionId, string resourceGroupName, string name) 6 | : base(ResourceType.ApplicationInsights, subscriptionId, resourceGroupName, name) 7 | { 8 | Name = name; 9 | } 10 | 11 | public string Name { get; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/MongoClusterResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class MongoClusterResourceDefinition : AzureResourceDefinition 4 | { 5 | public MongoClusterResourceDefinition(string subscriptionId, string resourceGroupName, string clusterName) 6 | : base(ResourceType.MongoCluster, subscriptionId, resourceGroupName, clusterName) 7 | { 8 | ClusterName = clusterName; 9 | } 10 | 11 | public string ClusterName { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/AppPlanResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape a app plan. 5 | /// 6 | public class AppPlanResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure App Plan to get metrics for. 10 | /// 11 | public string AppPlanName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/IoTHubResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure IoT Hub. 5 | /// 6 | public class IoTHubResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure IoT Hub to get metrics for. 10 | /// 11 | public string IoTHubName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Tests.Unit/Extensions/IDictionaryExtensions.cs: -------------------------------------------------------------------------------- 1 | // ReSharper disable once CheckNamespace 2 | namespace System.Collections.Generic 3 | { 4 | // ReSharper disable once InconsistentNaming 5 | internal static class IDictionaryExtensions 6 | { 7 | public static void ForAll(this IDictionary dictionary, Action> action) 8 | { 9 | foreach (var entry in dictionary) 10 | { 11 | action(entry); 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Model/MetricDefaults.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Promitor.Core.Scraping.Configuration.Model 4 | { 5 | public class MetricDefaults 6 | { 7 | public Aggregation Aggregation { get; set; } = new Aggregation(); 8 | 9 | public int? Limit { get; set; } = Core.Defaults.MetricDefaults.Limit; 10 | 11 | public Scraping Scraping { get; set; } = new Scraping(); 12 | 13 | public Dictionary Labels { get; set; } = new Dictionary(); 14 | } 15 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/NatGatewayResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class NatGatewayResourceDefinition : AzureResourceDefinition 4 | { 5 | public NatGatewayResourceDefinition(string subscriptionId, string resourceGroupName, string natGatewayName) 6 | : base(ResourceType.NatGateway, subscriptionId, resourceGroupName, natGatewayName) 7 | { 8 | NatGatewayName = natGatewayName; 9 | } 10 | 11 | public string NatGatewayName { get; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/PowerBiDedicatedResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class PowerBiDedicatedResourceDefinition : AzureResourceDefinition 4 | { 5 | public PowerBiDedicatedResourceDefinition(string subscriptionId, string resourceGroupName, string capacityName) 6 | : base(ResourceType.PowerBiDedicated, subscriptionId, resourceGroupName, capacityName) 7 | { 8 | CapacityName = capacityName; 9 | } 10 | public string CapacityName { get; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/ContainerInstanceResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape a Container Instance. 5 | /// 6 | public class ContainerInstanceResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The container group name. 10 | /// 11 | public string ContainerGroup { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/KeyVaultResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure Key Vault. 5 | /// 6 | public class KeyVaultResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure Key Vault to get metrics for. 10 | /// 11 | public string VaultName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Tests.Unit/Serialization/YamlUtils.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Linq; 3 | using YamlDotNet.RepresentationModel; 4 | 5 | namespace Promitor.Tests.Unit.Serialization 6 | { 7 | public class YamlUtils 8 | { 9 | public static YamlMappingNode CreateYamlNode(string yamlText) 10 | { 11 | var reader = new StringReader(yamlText); 12 | var stream = new YamlStream(); 13 | stream.Load(reader); 14 | 15 | return (YamlMappingNode)stream.Documents.First().RootNode; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/ContainerRegistryResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape a Container Registry. 5 | /// 6 | public class ContainerRegistryResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the registry to scrape. 10 | /// 11 | public string RegistryName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/SqlManagedInstanceResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Represents an Azure SQL Managed Instance to scrape. 5 | /// 6 | public class SqlManagedInstanceResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure SQL Managed Instance resource. 10 | /// 11 | public string InstanceName { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Integrations.AzureStorage/Promitor.Integrations.AzureStorage.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | 8.0.21 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/Promitor.Agents.Core/Configuration/RuntimeConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Promitor.Agents.Core.Configuration.Server; 2 | using Promitor.Agents.Core.Configuration.Telemetry; 3 | using Promitor.Integrations.Azure.Authentication.Configuration; 4 | 5 | namespace Promitor.Agents.Core.Configuration 6 | { 7 | public class RuntimeConfiguration 8 | { 9 | public ServerConfiguration Server { get; set; } = new(); 10 | public AuthenticationConfiguration Authentication { get; set; } = new(); 11 | public TelemetryConfiguration Telemetry { get; set; } = new(); 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Agents.Core/Configuration/Telemetry/TelemetryConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Agents.Core.Configuration.Telemetry.Sinks; 3 | 4 | namespace Promitor.Agents.Core.Configuration.Telemetry 5 | { 6 | public class TelemetryConfiguration 7 | { 8 | public LogLevel? DefaultVerbosity { get; set; } = Defaults.Telemetry.DefaultVerbosity; 9 | public ContainerLogConfiguration ContainerLogs { get; set; } = new(); 10 | public ApplicationInsightsConfiguration ApplicationInsights { get; set; } = new(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/KubernetesServiceResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class KubernetesServiceResourceDefinition : AzureResourceDefinition 4 | { 5 | public KubernetesServiceResourceDefinition(string subscriptionId, string resourceGroupName, string clusterName) 6 | : base(ResourceType.KubernetesService, subscriptionId, resourceGroupName, clusterName) 7 | { 8 | ClusterName = clusterName; 9 | } 10 | 11 | public string ClusterName { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/FrontDoorResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure Front Door resource. 5 | /// 6 | public class FrontDoorResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure Front Door resource to get metrics for. 10 | /// 11 | public string Name { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/ContainerRegistryResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class ContainerRegistryResourceDefinition : AzureResourceDefinition 4 | { 5 | public ContainerRegistryResourceDefinition(string subscriptionId, string resourceGroupName, string registryName) 6 | : base(ResourceType.ContainerRegistry, subscriptionId, resourceGroupName, registryName) 7 | { 8 | RegistryName = registryName; 9 | } 10 | 11 | public string RegistryName { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/DataExplorerClusterResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class DataExplorerClusterResourceDefinition : AzureResourceDefinition 4 | { 5 | public DataExplorerClusterResourceDefinition(string subscriptionId, string resourceGroupName, string clusterName) 6 | : base(ResourceType.DataExplorerCluster, subscriptionId, resourceGroupName, clusterName) 7 | { 8 | ClusterName = clusterName; 9 | } 10 | 11 | public string ClusterName { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/LoadBalancerResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class LoadBalancerResourceDefinition : AzureResourceDefinition 4 | { 5 | public LoadBalancerResourceDefinition(string subscriptionId, string resourceGroupName, string loadBalancerName) 6 | : base(ResourceType.LoadBalancer, subscriptionId, resourceGroupName, loadBalancerName) 7 | { 8 | LoadBalancerName = loadBalancerName; 9 | } 10 | 11 | public string LoadBalancerName { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/RedisEnterpriseCacheResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class RedisEnterpriseCacheResourceDefinition : AzureResourceDefinition 4 | { 5 | public RedisEnterpriseCacheResourceDefinition(string subscriptionId, string resourceGroupName, string cacheName) 6 | : base(ResourceType.RedisEnterpriseCache, subscriptionId, resourceGroupName, cacheName) 7 | { 8 | CacheName = cacheName; 9 | } 10 | 11 | public string CacheName { get; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Core/MetricDimensionDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Core 5 | { 6 | public class MetricDimensionDeserializer : Deserializer 7 | { 8 | public MetricDimensionDeserializer(ILogger logger) 9 | : base(logger) 10 | { 11 | Map(dimension => dimension.Name); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/AzureFirewallResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure firewall. 5 | /// 6 | public class AzureFirewallResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure firewall to get metrics for. 10 | /// 11 | public string AzureFirewallName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/CdnDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class CdnDeserializer : ResourceDeserializer 7 | { 8 | public CdnDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.CdnName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Model/AzureMetadata.cs: -------------------------------------------------------------------------------- 1 | using Promitor.Core.Configuration; 2 | using Promitor.Core.Extensions; 3 | using Promitor.Core.Serialization.Enum; 4 | 5 | namespace Promitor.Core.Scraping.Configuration.Model 6 | { 7 | public class AzureMetadata : IAzureCloudEndpoints 8 | { 9 | public string ResourceGroupName { get; set; } 10 | public string SubscriptionId { get; set; } 11 | public string TenantId { get; set; } 12 | public AzureCloud Cloud { get; set; } 13 | public AzureEndpoints Endpoints { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/LoadBalancerResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure Load Balancer. 5 | /// 6 | public class LoadBalancerResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure Load Balancer to get metrics for. 10 | /// 11 | public string LoadBalancerName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/NatGatewayResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure Network Gateway. 5 | /// 6 | public class NatGatewayResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure Network Gateway to get metrics for. 10 | /// 11 | public string NatGatewayName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/NetworkInterfaceResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape a Network Interface. 5 | /// 6 | public class NetworkInterfaceResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the network interface to scrape. 10 | /// 11 | public string NetworkInterfaceName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/VirtualMachineResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape a virtual machine. 5 | /// 6 | public class VirtualMachineResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the virtual machine to get metrics for. 10 | /// 11 | public string VirtualMachineName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Tests.Unit/Azure/TestCloudEndpoints.cs: -------------------------------------------------------------------------------- 1 | 2 | using Promitor.Core.Configuration; 3 | using Promitor.Core.Serialization.Enum; 4 | using Promitor.Core.Extensions; 5 | 6 | namespace Promitor.Tests.Unit.Azure 7 | { 8 | internal class TestCloudEndpoints : IAzureCloudEndpoints 9 | { 10 | public TestCloudEndpoints(AzureCloud cloud, AzureEndpoints endpoints) 11 | { 12 | Cloud = cloud; 13 | Endpoints = endpoints; 14 | } 15 | 16 | public AzureCloud Cloud { get; } 17 | public AzureEndpoints Endpoints { get; } 18 | } 19 | } -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/theme.toml: -------------------------------------------------------------------------------- 1 | # theme.toml template for a Hugo theme 2 | # See https://github.com/gohugoio/hugoThemes#themetoml for an example 3 | 4 | name = "Changelog Theme" 5 | license = "MIT" 6 | licenselink = "https://github.com/jsnjack/hugo-changelog-theme/blob/master/LICENSE" 7 | description = "Theme to display a changelog" 8 | homepage = "https://github.com/jsnjack/hugo-changelog-theme" 9 | tags = ["changelog"] 10 | features = [] 11 | min_version = "0.41" 12 | 13 | [author] 14 | name = "Yauhen Shulitski" 15 | homepage = "https://github.com/jsnjack/hugo-changelog-theme" 16 | -------------------------------------------------------------------------------- /src/Promitor.Agents.Core/Configuration/Server/ServerConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Agents.Core.Configuration.Server 2 | { 3 | public class ServerConfiguration 4 | { 5 | public int HttpPort { get; set; } = Defaults.Server.HttpPort; 6 | 7 | /// 8 | /// Upper limit on the number of concurrent threads between all possible scheduled scraping jobs, 9 | /// where 0 or negative is interpreted as unlimited. 10 | /// 11 | public int MaxDegreeOfParallelism { get; set; } = Defaults.Server.MaxDegreeOfParallelism; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Agents.ResourceDiscovery/Graph/Exceptions/ResourceTypeNotSupportedException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Promitor.Core.Contracts; 3 | 4 | namespace Promitor.Agents.ResourceDiscovery.Graph.Exceptions 5 | { 6 | public class ResourceTypeNotSupportedException : NotSupportedException 7 | { 8 | public ResourceTypeNotSupportedException(ResourceType resourceType) 9 | : base($"Resource type '{resourceType}' is not supported") 10 | { 11 | ResourceType = resourceType; 12 | } 13 | 14 | public ResourceType ResourceType { get; } 15 | } 16 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/ContainerInstanceResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class ContainerInstanceResourceDefinition : AzureResourceDefinition 4 | { 5 | public ContainerInstanceResourceDefinition(string subscriptionId, string resourceGroupName, string containerGroup) 6 | : base(ResourceType.ContainerInstance, subscriptionId, resourceGroupName, containerGroup) 7 | { 8 | ContainerGroup = containerGroup; 9 | } 10 | 11 | public string ContainerGroup { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/PowerBiDedicatedResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape PowerBI Dedicated 5 | /// 6 | public class PowerBiDedicatedResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the PowerBI Dedicated Capacity to get metrics for. 10 | /// 11 | public string CapacityName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/PublicIpAddressResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape a Public IP Address. 5 | /// 6 | public class PublicIpAddressResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Public IP Address to get metrics for. 10 | /// 11 | public string PublicIpAddressName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Tests.Integration/Services/ResourceDiscovery/ResourceDiscoveryIntegrationTest.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | using Xunit.Abstractions; 3 | 4 | namespace Promitor.Tests.Integration.Services.ResourceDiscovery 5 | { 6 | [Trait("Agent", "Resource Discovery")] 7 | public class ResourceDiscoveryIntegrationTest : IntegrationTest 8 | { 9 | public ResourceDiscoveryIntegrationTest(ITestOutputHelper testOutput) : base(testOutput) 10 | { 11 | } 12 | 13 | public string ExpectedVersion => Configuration["Agents:ResourceDiscovery:Expectations:Version"]; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Promitor.Agents.Scraper/Runtime/ILastSuccessfulScrapeStore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Promitor.Agents.Scraper.Runtime 4 | { 5 | public interface ILastSuccessfulScrapeStore 6 | { 7 | /// 8 | /// Records the current UTC time as the most recent successful scrape completion time. 9 | /// 10 | void MarkNow(); 11 | 12 | /// 13 | /// Retrieves the last successful scrape completion time in UTC, or null if none recorded. 14 | /// 15 | DateTimeOffset? GetLast(); 16 | } 17 | } 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/AzureFirewallResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class AzureFirewallResourceDefinition : AzureResourceDefinition 4 | { 5 | public AzureFirewallResourceDefinition(string subscriptionId, string resourceGroupName, string azureFirewallName) 6 | : base(ResourceType.AzureFirewall, subscriptionId, resourceGroupName, azureFirewallName) 7 | { 8 | AzureFirewallName = azureFirewallName; 9 | } 10 | 11 | public string AzureFirewallName { get; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/VirtualMachineResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class VirtualMachineResourceDefinition : AzureResourceDefinition 4 | { 5 | public VirtualMachineResourceDefinition(string subscriptionId, string resourceGroupName, string virtualMachineName) 6 | : base(ResourceType.VirtualMachine, subscriptionId, resourceGroupName, virtualMachineName) 7 | { 8 | VirtualMachineName = virtualMachineName; 9 | } 10 | 11 | public string VirtualMachineName { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/VirtualNetworkResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class VirtualNetworkResourceDefinition : AzureResourceDefinition 4 | { 5 | public VirtualNetworkResourceDefinition(string subscriptionId, string resourceGroupName, string virtualNetworkName) 6 | : base(ResourceType.VirtualNetwork, subscriptionId, resourceGroupName, virtualNetworkName) 7 | { 8 | VirtualNetworkName = virtualNetworkName; 9 | } 10 | 11 | public string VirtualNetworkName { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/MariaDbResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure Database for Maria DB instance. 5 | /// 6 | public class MariaDbResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure Database for Maria DB server instance. 10 | /// 11 | public string ServerName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/NetworkGatewayResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure Network Gateway. 5 | /// 6 | public class NetworkGatewayResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure Network Gateway to get metrics for. 10 | /// 11 | public string NetworkGatewayName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/VirtualNetworkResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure Virtual Network. 5 | /// 6 | public class VirtualNetworkResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure Virtual Network to get metrics for. 10 | /// 11 | public string VirtualNetworkName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/DnsZoneDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class DnsZoneDeserializer : ResourceDeserializer 7 | { 8 | public DnsZoneDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.ZoneName) 11 | .IsRequired(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Promitor.Agents.Scraper/Scheduling/MetricScrapingJob.cs: -------------------------------------------------------------------------------- 1 | using GuardNet; 2 | using Microsoft.Extensions.Logging; 3 | 4 | namespace Promitor.Agents.Scraper.Scheduling 5 | { 6 | public class MetricScrapingJob 7 | { 8 | public ILogger Logger { get; } 9 | 10 | public string Name { get; } 11 | 12 | public MetricScrapingJob(string name, ILogger logger) 13 | { 14 | Guard.NotNullOrWhitespace(name, nameof(name)); 15 | Guard.NotNull(logger, nameof(logger)); 16 | 17 | Name = name; 18 | Logger = logger; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/VirtualMachineScaleSetsResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class VirtualMachineScaleSetResourceDefinition : AzureResourceDefinition 4 | { 5 | public VirtualMachineScaleSetResourceDefinition(string subscriptionId, string resourceGroupName, string scaleSetName) 6 | : base(ResourceType.VirtualMachineScaleSet, subscriptionId, resourceGroupName, scaleSetName) 7 | { 8 | ScaleSetName = scaleSetName; 9 | } 10 | 11 | public string ScaleSetName { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/KubernetesServiceResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure Kubernetes Service. 5 | /// 6 | public class KubernetesServiceResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure Kubernetes Service to get metrics for. 10 | /// 11 | public string ClusterName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/TrafficManagerResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure Traffic Manager Profile. 5 | /// 6 | public class TrafficManagerResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure Traffic Manager Profile to get metrics for. 10 | /// 11 | public string Name { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/IoTHubDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class IoTHubDeserializer : ResourceDeserializer 7 | { 8 | public IoTHubDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.IoTHubName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/src/contents/shapes.pug: -------------------------------------------------------------------------------- 1 | p Shape utilities are used for change element shapes. 2 | 3 | .docs-demo.columns 4 | .column.col-6.text-center 5 | .bg-primary.text-light.docs-shape.s-rounded.centered 6 | | s-rounded 7 | .column.col-6.text-center 8 | .bg-primary.text-light.docs-shape.s-circle.centered 9 | | s-circle 10 | 11 | pre.code(data-lang='HTML') 12 | code 13 | :highlight(lang="html") 14 | 15 |
16 | 17 |
-------------------------------------------------------------------------------- /src/Promitor.Agents.ResourceDiscovery/Configuration/AzureLandscape.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Promitor.Core.Configuration; 3 | using Promitor.Core.Extensions; 4 | using Promitor.Core.Serialization.Enum; 5 | 6 | namespace Promitor.Agents.ResourceDiscovery.Configuration 7 | { 8 | public class AzureLandscape : IAzureCloudEndpoints 9 | { 10 | public string TenantId { get; set; } 11 | public List Subscriptions { get; set; } 12 | public AzureCloud Cloud { get; set; } = AzureCloud.Global; 13 | public AzureEndpoints Endpoints { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/NetworkGatewayResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class NetworkGatewayResourceDefinition : AzureResourceDefinition 4 | { 5 | public NetworkGatewayResourceDefinition(string subscriptionId, string resourceGroupName, string networkGatewayName) 6 | : base(ResourceType.NetworkGateway, subscriptionId, resourceGroupName, networkGatewayName) 7 | { 8 | NetworkGatewayName = networkGatewayName; 9 | } 10 | 11 | public string NetworkGatewayName { get; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/VirtualMachineScaleSetResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape a virtual machine scale set. 5 | /// 6 | public class VirtualMachineScaleSetResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the scale set machine to get metrics for. 10 | /// 11 | public string ScaleSetName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/AppPlanDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class AppPlanDeserializer : ResourceDeserializer 7 | { 8 | public AppPlanDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.AppPlanName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/CosmosDbDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class CosmosDbDeserializer : ResourceDeserializer 7 | { 8 | public CosmosDbDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.DbName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/MariaDbDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class MariaDbDeserializer : ResourceDeserializer 7 | { 8 | public MariaDbDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.ServerName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /changelog/content/released/v0.3.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2018-10-23" 3 | date: 2018-10-23T20:46:47+02:00 4 | weight: 030 5 | version: Scraper - v0.3.0 6 | --- 7 | 8 | - {{% tag security %}} Mitigation for vulnerability CVE-2018-8292 ([announcement](https://github.com/dotnet/announcements/issues/88) 9 | | [#189](https://github.com/tomkerkhove/promitor/issues/189)) 10 | - {{% tag changed %}} Metrics filter for generic scraper is now optional ([#192](https://github.com/tomkerkhove/promitor/issues/192)) 11 | 12 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/0.3.0). 13 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/Makefile: -------------------------------------------------------------------------------- 1 | change: init_githooks 2 | cd site/changelog && hugo new experimental/`shuf -i 10000-60000 -n 1`.md 3 | 4 | deprecation: init_githooks 5 | cd site/changelog && hugo new deprecated/`shuf -i 10000-60000 -n 1`.md 6 | 7 | release_create: 8 | python release.py 9 | 10 | release: release_create 11 | git push 12 | git push --tags 13 | 14 | generate_changelog: 15 | cd site/changelog && hugo 16 | 17 | serve_changelog: 18 | cd site/changelog && hugo server --bind 0.0.0.0 --baseURL=http://localhost/changelog/ 19 | 20 | init_githooks: 21 | @git config core.hooksPath .githooks 22 | -------------------------------------------------------------------------------- /src/Promitor.Agents.Core/Usability/AsciiTableGenerator.cs: -------------------------------------------------------------------------------- 1 | using Spectre.Console; 2 | 3 | namespace Promitor.Agents.Core.Usability 4 | { 5 | public class AsciiTableGenerator 6 | { 7 | protected Table CreateAsciiTable(string caption = null) 8 | { 9 | var asciiTable = new Table 10 | { 11 | Border = TableBorder.Rounded 12 | }; 13 | 14 | if(string.IsNullOrWhiteSpace(caption) == false) 15 | { 16 | asciiTable.Caption(caption); 17 | } 18 | 19 | return asciiTable; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/PublicIpAddressResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class PublicIpAddressResourceDefinition : AzureResourceDefinition 4 | { 5 | public PublicIpAddressResourceDefinition(string subscriptionId, string resourceGroupName, string publicIpAddressName) 6 | : base(ResourceType.PublicIpAddress, subscriptionId, resourceGroupName, publicIpAddressName) 7 | { 8 | PublicIpAddressName = publicIpAddressName; 9 | } 10 | 11 | public string PublicIpAddressName { get; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/ApplicationInsightsResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure Application Insights. 5 | /// 6 | public class ApplicationInsightsResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure Application Insights instance to get metrics for. 10 | /// 11 | public string Name { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/DataExplorerClusterResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape a Azure Data Explorer cluster. 5 | /// 6 | public class DataExplorerClusterResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure Data Explorer Cluster to get metrics for. 10 | /// 11 | public string ClusterName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/KeyVaultDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class KeyVaultDeserializer : ResourceDeserializer 7 | { 8 | public KeyVaultDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.VaultName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/LogicAppDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class LogicAppDeserializer : ResourceDeserializer 7 | { 8 | public LogicAppDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.WorkflowName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | | Version | Supported | 6 | | ------- | ------------------ | 7 | | 2.x.x | :white_check_mark: | 8 | | 1.6.x | :white_check_mark: | 9 | | < 1.6.0 | :x: | 10 | 11 | ## Reporting a Vulnerability 12 | 13 | Vulnerabilities should be reported by [sending an email](mailto:kerkhove.tom@gmail.com) 14 | and will be considered. 15 | 16 | In case of a confirmed breach you get full credit and can be keep in the loop if 17 | preferred. 18 | 19 | We do not provide compensations for reporting vulnerabilities except for eternal 20 | gratitude. 21 | -------------------------------------------------------------------------------- /src/Promitor.Agents.Core/Configuration/Telemetry/Sinks/ApplicationInsightsConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Agents.Core.Configuration.Telemetry.Interfaces; 3 | 4 | namespace Promitor.Agents.Core.Configuration.Telemetry.Sinks 5 | { 6 | public class ApplicationInsightsConfiguration : ISinkConfiguration 7 | { 8 | public LogLevel? Verbosity { get; set; } = Defaults.Telemetry.ApplicationInsights.Verbosity; 9 | public bool IsEnabled { get; set; } = Defaults.Telemetry.ApplicationInsights.IsEnabled; 10 | public string InstrumentationKey { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/NetworkInterfaceResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class NetworkInterfaceResourceDefinition : AzureResourceDefinition 4 | { 5 | public NetworkInterfaceResourceDefinition(string subscriptionId, string resourceGroupName, string networkInterfaceName) 6 | : base(ResourceType.NetworkInterface, subscriptionId, resourceGroupName, networkInterfaceName) 7 | { 8 | NetworkInterfaceName = networkInterfaceName; 9 | } 10 | 11 | public string NetworkInterfaceName { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Core/ScrapingDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Core 5 | { 6 | public class ScrapingDeserializer : Deserializer 7 | { 8 | public ScrapingDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(scraping => scraping.Schedule) 11 | .IsRequired() 12 | .ValidateCronExpression(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/ApplicationGatewayResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure Application Gateway. 5 | /// 6 | public class ApplicationGatewayResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure Application Gateway to get metrics for. 10 | /// 11 | public string ApplicationGatewayName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/RedisEnterpriseCacheResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure Cache for Redis (Enterprise). 5 | /// 6 | public class RedisEnterpriseCacheResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure Cache for Redis (Enterprise) instance. 10 | /// 11 | public string CacheName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/BlobStorageDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class BlobStorageDeserializer : ResourceDeserializer 7 | { 8 | public BlobStorageDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.AccountName) 11 | .IsRequired(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/RedisCacheDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class RedisCacheDeserializer : ResourceDeserializer 7 | { 8 | public RedisCacheDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.CacheName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/MonitorAutoscaleResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class MonitorAutoscaleResourceDefinition : AzureResourceDefinition 4 | { 5 | public MonitorAutoscaleResourceDefinition(string subscriptionId, string resourceGroupName, string autoscaleSettingsName) 6 | : base(ResourceType.MonitorAutoscale, subscriptionId, resourceGroupName, autoscaleSettingsName) 7 | { 8 | AutoscaleSettingsName = autoscaleSettingsName; 9 | } 10 | 11 | public string AutoscaleSettingsName { get; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/CognitiveServicesAccountResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Cognitive Services Account. 5 | /// 6 | public class CognitiveServicesAccountResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure firewall to get metrics for. 10 | /// 11 | public string CognitiveServicesAccountName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/ExpressRouteCircuitResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure Express Route circuit. 5 | /// 6 | public class ExpressRouteCircuitResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure Express Route circuit to get metrics for. 10 | /// 11 | public string ExpressRouteCircuitName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/MonitorAutoscaleResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure Monitor Autoscale settings. 5 | /// 6 | public class MonitorAutoscaleResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure Monitor Autoscale settings to get metrics for. 10 | /// 11 | public string AutoscaleSettingsName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/FileStorageDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class FileStorageDeserializer : ResourceDeserializer 7 | { 8 | public FileStorageDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.AccountName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/MongoClusterDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class MongoClusterDeserializer : ResourceDeserializer 7 | { 8 | public MongoClusterDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.ClusterName) 11 | .IsRequired(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/NatGatewayDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class NatGatewayDeserializer : ResourceDeserializer 7 | { 8 | public NatGatewayDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.NatGatewayName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /changelog/content/released/v0.7.1-resource-discovery.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2022-04-08" 3 | date: 2022-04-08T10:38:47+02:00 4 | weight: 1015 5 | version: Resource Discovery - v0.7.1 6 | --- 7 | 8 | - {{% tag fixed %}} Discovered resources are no longer capped at 1000 resources ([#1828](https://github.com/tomkerkhove/promitor/pull/1828)) 9 | - {{% tag fixed %}} Fix "Try it out" capability for end-users in Swagger UI when using reverse proxies ([#1898](https://github.com/tomkerkhove/promitor/pull/1898)) 10 | 11 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/ResourceDiscovery-v0.7.0). 12 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/exampleSite/content/released/15.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Xenial Xerus" 3 | subtitle: "released on 2018-09-02" 4 | date: 2018-09-02T20:46:47+02:00 5 | weight: 15 6 | version: v1.15 7 | --- 8 | 9 | - {{% tag added %}} Add a test for template variable overwrite 10 | - {{% tag changed %}} Include language code in REF_NOT_FOUND errors 11 | - {{% tag fixed %}} Improve minifier MIME type resolution 12 | - {{% tag deprecated %}} Set GO111MODULE=on for mage install 13 | - {{% tag removed %}} Add instruction to install PostCSS when missing 14 | - {{% tag security %}} Update snapcraft build config to Go 1.11 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/PowerBiDedicatedDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class PowerBiDedicatedDeserializer : ResourceDeserializer 7 | { 8 | public PowerBiDedicatedDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.CapacityName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Integrations.Sinks.Prometheus/Configuration/PrometheusScrapingEndpointSinkConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Integrations.Sinks.Prometheus.Configuration 2 | { 3 | public class PrometheusScrapingEndpointSinkConfiguration 4 | { 5 | public string BaseUriPath { get; set; } = Defaults.Prometheus.ScrapeEndpointBaseUri; 6 | public double? MetricUnavailableValue { get; set; } = Defaults.Prometheus.MetricUnavailableValue; 7 | public bool EnableMetricTimestamps { get; set; } = Defaults.Prometheus.EnableMetricTimestamps; 8 | public LabelConfiguration Labels { get; set; } = new(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Promitor.Tests.Unit/Serialization/AutoMapperTests.cs: -------------------------------------------------------------------------------- 1 | using AutoMapper; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Mapping; 3 | using Xunit; 4 | 5 | namespace Promitor.Tests.Unit.Serialization 6 | { 7 | public class AutoMapperTests : UnitTest 8 | { 9 | [Fact] 10 | public void VerifyConfigurationsAreValid() 11 | { 12 | // Arrange 13 | var mapperConfiguration = new MapperConfiguration(c => c.AddProfile()); 14 | 15 | // Act / Assert 16 | mapperConfiguration.AssertConfigurationIsValid(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /changelog/content/released/v2.15.0-scraper.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2025-11-13" 3 | date: 2025-11-13T19:00:47+02:00 4 | weight: 1040 5 | version: Scraper - v2.15.0 6 | --- 7 | 8 | - {{% tag feature %}} Provide capability to configure query lookback in minutes 9 | - {{% tag feature %}} Provide support for scraping Azure DNS zone metrics 10 | - {{% tag feature %}} Provide new health check based on data freshness 11 | - {{% tag fixed %}} Azure Monitor Scraper: batch based on aggregation in addition to existing criteria 12 | 13 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/Scraper-v2.15.0). 14 | -------------------------------------------------------------------------------- /src/Promitor.Agents.ResourceDiscovery/Graph/Model/Resource.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Agents.ResourceDiscovery.Graph.Model 2 | { 3 | public class Resource 4 | { 5 | public Resource(string subscriptionId, string resourceGroup, string type, string name) 6 | { 7 | SubscriptionId = subscriptionId; 8 | ResourceGroup = resourceGroup; 9 | Name = name; 10 | Type = type; 11 | } 12 | 13 | public string SubscriptionId { get; } 14 | public string ResourceGroup { get; } 15 | public string Name { get; } 16 | public string Type { get; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/MessageType.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization 2 | { 3 | /// 4 | /// Defines the type of message reported during deserialization. 5 | /// 6 | public enum MessageType 7 | { 8 | /// 9 | /// The message is a warning, and doesn't prevent Promitor from functioning. 10 | /// 11 | Warning, 12 | 13 | /// 14 | /// The message is an error which means that Promitor cannot use the configuration. 15 | /// 16 | Error 17 | } 18 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/LoadBalancerDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class LoadBalancerDeserializer : ResourceDeserializer 7 | { 8 | public LoadBalancerDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.LoadBalancerName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/StorageAccountDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class StorageAccountDeserializer : ResourceDeserializer 7 | { 8 | public StorageAccountDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.AccountName) 11 | .IsRequired(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/TrafficManagerDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class TrafficManagerDeserializer : ResourceDeserializer 7 | { 8 | public TrafficManagerDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.Name) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Integrations.AzureMonitor/Configuration/AzureMonitorMetricBatchScrapeConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics.CodeAnalysis; 2 | 3 | namespace Promitor.Integrations.AzureMonitor.Configuration 4 | { 5 | public class AzureMonitorMetricBatchScrapeConfig 6 | { 7 | [SuppressMessage("ReSharper", "RedundantDefaultMemberInitializer", Justification = "Explicit initialization to false for better readability")] 8 | public bool Enabled { get; set; } = false; 9 | public int MaxBatchSize { get; set; } 10 | public string AzureRegion { get; set; } // Batch scrape endpoints are deployed by region 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/ApplicationGatewayResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class ApplicationGatewayResourceDefinition : AzureResourceDefinition 4 | { 5 | public ApplicationGatewayResourceDefinition(string subscriptionId, string resourceGroupName, string applicationGatewayName) 6 | : base(ResourceType.ApplicationGateway, subscriptionId, resourceGroupName, applicationGatewayName) 7 | { 8 | ApplicationGatewayName = applicationGatewayName; 9 | } 10 | 11 | public string ApplicationGatewayName { get; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/AzureFirewallDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class AzureFirewallDeserializer : ResourceDeserializer 7 | { 8 | public AzureFirewallDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.AzureFirewallName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/LogAnalyticsResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | public class LogAnalyticsResourceV1 : AzureResourceDefinitionV1 4 | { 5 | /// 6 | /// The workspaceId of the Azure Log Analytics to query metrics for. 7 | /// 8 | public string WorkspaceId { get; set; } 9 | 10 | /// 11 | /// The name of the Azure Log Analytics to query metrics for. 12 | /// 13 | public string WorkspaceName { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/NetworkGatewayDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class NetworkGatewayDeserializer : ResourceDeserializer 7 | { 8 | public NetworkGatewayDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.NetworkGatewayName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/SynapseWorkspaceDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class SynapseWorkspaceDeserializer : ResourceDeserializer 7 | { 8 | public SynapseWorkspaceDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.WorkspaceName) 11 | .IsRequired(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/VirtualMachineDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class VirtualMachineDeserializer : ResourceDeserializer 7 | { 8 | public VirtualMachineDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.VirtualMachineName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/VirtualNetworkDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class VirtualNetworkDeserializer : ResourceDeserializer 7 | { 8 | public VirtualNetworkDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.VirtualNetworkName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Tests.Unit/Validation/Scraper/Metrics/ResourceTypes/MetricsDeclarationValidationStepsTests.cs: -------------------------------------------------------------------------------- 1 | using AutoMapper; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Mapping; 3 | 4 | namespace Promitor.Tests.Unit.Validation.Scraper.Metrics.ResourceTypes 5 | { 6 | public class MetricsDeclarationValidationStepsTests : UnitTest 7 | { 8 | protected IMapper Mapper { get; } 9 | 10 | public MetricsDeclarationValidationStepsTests() 11 | { 12 | var config = new MapperConfiguration(c => c.AddProfile()); 13 | Mapper = config.CreateMapper(); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /changelog/content/released/v2.12.0-scraper.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2024-11-13" 3 | date: 2024-11-13T07:00:47+02:00 4 | weight: 1032 5 | version: Scraper - v2.12.0 6 | --- 7 | 8 | - {{% tag added %}} Provide Batch Scraping Support ([docs](https://docs.promitor.io/v2.12/scraping/batch-scraping)) 9 | - {{% tag added %}} Provide support for Azure Firewall ([docs](https://docs.promitor.io/v2.12/scraping/providers/azure-firewall/)) 10 | - {{% tag fixed %}} Fixed a bug where metrics are no longer properly pushed to OpenTelemetry collector 11 | 12 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/Scraper-v2.12.0). 13 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/src/contents/loading.pug: -------------------------------------------------------------------------------- 1 | p 2 | | Loading indicator is used for loading or updating. 3 | | You can add the #[code loading] class to a container for loading status. 4 | 5 | .docs-demo.columns 6 | .column.col-12.text-center 7 | .loading 8 | 9 | p 10 | | Add the #[code loading-lg] class for large size. 11 | 12 | .docs-demo.columns 13 | .column.col-12.text-center 14 | .loading.loading-lg 15 | 16 | pre.code(data-lang='HTML') 17 | code 18 | :highlight(lang="html") 19 | 20 |
21 |
-------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/ExpressRouteCircuitResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class ExpressRouteCircuitResourceDefinition : AzureResourceDefinition 4 | { 5 | public ExpressRouteCircuitResourceDefinition(string subscriptionId, string resourceGroupName, string expressRouteCircuitName) 6 | : base(ResourceType.ExpressRouteCircuit, subscriptionId, resourceGroupName, expressRouteCircuitName) 7 | { 8 | ExpressRouteCircuitName = expressRouteCircuitName; 9 | } 10 | 11 | public string ExpressRouteCircuitName { get; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/WebAppDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class WebAppDeserializer : ResourceDeserializer 7 | { 8 | public WebAppDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.WebAppName) 11 | .IsRequired(); 12 | Map(resource => resource.SlotName); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/_navbar.scss: -------------------------------------------------------------------------------- 1 | // Navbar 2 | .navbar { 3 | align-items: stretch; 4 | display: flex; 5 | flex-wrap: wrap; 6 | justify-content: space-between; 7 | 8 | .navbar-section { 9 | align-items: center; 10 | display: flex; 11 | flex: 1 0 0; 12 | 13 | &:not(:first-child):last-child { 14 | justify-content: flex-end; 15 | } 16 | } 17 | 18 | .navbar-center { 19 | align-items: center; 20 | display: flex; 21 | flex: 0 0 auto; 22 | } 23 | 24 | .navbar-brand { 25 | font-size: $font-size-lg; 26 | font-weight: 500; 27 | text-decoration: none; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Promitor.Agents.Core/Constants.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Agents.Core 2 | { 3 | public static class Constants 4 | { 5 | public static class Texts 6 | { 7 | public const string Welcome = @"██████╗ ██████╗ ██████╗ ███╗ ███╗██╗████████╗ ██████╗ ██████╗ 8 | ██╔══██╗██╔══██╗██╔═══██╗████╗ ████║██║╚══██╔══╝██╔═══██╗██╔══██╗ 9 | ██████╔╝██████╔╝██║ ██║██╔████╔██║██║ ██║ ██║ ██║██████╔╝ 10 | ██╔═══╝ ██╔══██╗██║ ██║██║╚██╔╝██║██║ ██║ ██║ ██║██╔══██╗ 11 | ██║ ██║ ██║╚██████╔╝██║ ╚═╝ ██║██║ ██║ ╚██████╔╝██║ ██║ 12 | ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝"; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/AppPlanResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class AppPlanResourceDefinition : AzureResourceDefinition 4 | { 5 | public AppPlanResourceDefinition(string subscriptionId, string resourceGroupName, string appPlanName) 6 | : base(ResourceType.AppPlan, subscriptionId, resourceGroupName, appPlanName) 7 | { 8 | AppPlanName = appPlanName; 9 | } 10 | 11 | /// 12 | /// The name of the Azure App Plan to get metrics for. 13 | /// 14 | public string AppPlanName { get; } 15 | } 16 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/GenericAzureResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class GenericAzureResourceDefinition : AzureResourceDefinition 4 | { 5 | public GenericAzureResourceDefinition(string subscriptionId, string resourceGroupName, string filter, string resourceUri) 6 | : base(ResourceType.Generic, subscriptionId, resourceGroupName, resourceUri, resourceUri) 7 | { 8 | Filter = filter; 9 | ResourceUri = resourceUri; 10 | } 11 | 12 | public string Filter { get; } 13 | public string ResourceUri { get; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/ContainerRegistryDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class ContainerRegistryDeserializer : ResourceDeserializer 7 | { 8 | public ContainerRegistryDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.RegistryName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/KubernetesServiceDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class KubernetesServiceDeserializer : ResourceDeserializer 7 | { 8 | public KubernetesServiceDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.ClusterName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/PublicIpAddressDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class PublicIpAddressDeserializer : ResourceDeserializer 7 | { 8 | public PublicIpAddressDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.PublicIpAddressName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Integrations.Sinks.Prometheus/Defaults.cs: -------------------------------------------------------------------------------- 1 | using Promitor.Integrations.Sinks.Prometheus.Configuration; 2 | 3 | namespace Promitor.Integrations.Sinks.Prometheus 4 | { 5 | public static class Defaults 6 | { 7 | public static class Prometheus 8 | { 9 | public static bool EnableMetricTimestamps { get; set; } = false; 10 | public static double MetricUnavailableValue { get; } = double.NaN; 11 | public static string ScrapeEndpointBaseUri { get; } = "/metrics"; 12 | public static LabelTransformation LabelTransformation { get; } = LabelTransformation.None; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Promitor.Agents.ResourceDiscovery/Graph/Interfaces/ICachedAzureResourceGraph.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using Promitor.Agents.ResourceDiscovery.Graph.Model; 4 | 5 | namespace Promitor.Agents.ResourceDiscovery.Graph.Interfaces 6 | { 7 | public interface ICachedAzureResourceGraph 8 | { 9 | Task QueryAsync(string queryName, string query, int pageSize, int currentPage, bool skipCache = false); 10 | Task> QueryForResourcesAsync(string queryName, string query, List targetSubscriptions, int pageSize, int currentPage, bool skipCache = false); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Promitor.Agents.Scraper/Configuration/Defaults.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Agents.Scraper.Configuration 2 | { 3 | public static class Defaults 4 | { 5 | public static class Prometheus 6 | { 7 | public static bool EnableMetricTimestamps { get; set; } = false; 8 | public static double MetricUnavailableValue { get; } = double.NaN; 9 | public static string ScrapeEndpointBaseUri { get; } = "/metrics"; 10 | } 11 | 12 | public static class MetricsConfiguration 13 | { 14 | public static string AbsolutePath { get; } = "/config/metrics-declaration.yaml"; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/ApplicationInsightsDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class ApplicationInsightsDeserializer : ResourceDeserializer 7 | { 8 | public ApplicationInsightsDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.Name) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/ContainerInstanceDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class ContainerInstanceDeserializer : ResourceDeserializer 7 | { 8 | public ContainerInstanceDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.ContainerGroup) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/EventHubsDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class EventHubsDeserializer : ResourceDeserializer 7 | { 8 | public EventHubsDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.Namespace) 11 | .IsRequired(); 12 | Map(resource => resource.TopicName); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/MonitorAutoscaleDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class MonitorAutoscaleDeserializer : ResourceDeserializer 7 | { 8 | public MonitorAutoscaleDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.AutoscaleSettingsName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/NetworkInterfaceDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class NetworkInterfaceDeserializer : ResourceDeserializer 7 | { 8 | public NetworkInterfaceDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.NetworkInterfaceName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/src/contents/progress.pug: -------------------------------------------------------------------------------- 1 | p The Progress indicates the progress completion of a task. 2 | 3 | .docs-demo.columns 4 | .column.col-3.col-xs-12 5 | progress.progress(value="75" max="100") 6 | .column.col-3.col-xs-12 7 | progress.progress(value="50" max="100") 8 | .column.col-3.col-xs-12 9 | progress.progress(value="25" max="100") 10 | .column.col-3.col-xs-12 11 | progress.progress(max="100") 12 | 13 | pre.code(data-lang='HTML') 14 | code 15 | :highlight(lang="html") 16 | 17 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/_breadcrumbs.scss: -------------------------------------------------------------------------------- 1 | // Breadcrumbs 2 | .breadcrumb { 3 | list-style: none; 4 | margin: $unit-1 0; 5 | padding: $unit-1 0; 6 | 7 | .breadcrumb-item { 8 | color: $gray-color-dark; 9 | display: inline-block; 10 | margin: 0; 11 | padding: $unit-1 0; 12 | 13 | &:not(:last-child) { 14 | margin-right: $unit-1; 15 | 16 | a { 17 | color: $gray-color-dark; 18 | } 19 | } 20 | 21 | &:not(:first-child) { 22 | &::before { 23 | color: $gray-color-light; 24 | content: "/"; 25 | padding-right: $unit-2; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/DataShareResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class DataShareResourceDefinition : AzureResourceDefinition 4 | { 5 | public DataShareResourceDefinition(string subscriptionId, string resourceGroupName, string accountName, string shareName) 6 | : base(ResourceType.DataShare, subscriptionId, resourceGroupName, $"{accountName}-{shareName}") 7 | { 8 | AccountName = accountName; 9 | ShareName = shareName; 10 | } 11 | 12 | public string AccountName { get; } 13 | public string ShareName { get; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/EventHubResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class EventHubResourceDefinition : AzureResourceDefinition 4 | { 5 | public EventHubResourceDefinition(string subscriptionId, string resourceGroupName, string @namespace, string topicName) 6 | : base(ResourceType.EventHubs, subscriptionId, resourceGroupName, @namespace, $"{@namespace}-{topicName}") 7 | { 8 | Namespace = @namespace; 9 | TopicName = topicName; 10 | } 11 | 12 | public string Namespace { get; } 13 | public string TopicName { get; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Core/AzureResourceCollectionDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Core 5 | { 6 | public class AzureResourceDiscoveryGroupDeserializer : Deserializer 7 | { 8 | public AzureResourceDiscoveryGroupDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(metadata => metadata.Name) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/DataExplorerClusterDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class DataExplorerClusterDeserializer : ResourceDeserializer 7 | { 8 | public DataExplorerClusterDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.ClusterName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/ApplicationGatewayDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class ApplicationGatewayDeserializer : ResourceDeserializer 7 | { 8 | public ApplicationGatewayDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.ApplicationGatewayName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/DataShareDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class DataShareDeserializer : ResourceDeserializer 7 | { 8 | public DataShareDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.AccountName) 11 | .IsRequired(); 12 | Map(resource => resource.ShareName); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/RedisEnterpriseCacheDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class RedisEnterpriseCacheDeserializer : ResourceDeserializer 7 | { 8 | public RedisEnterpriseCacheDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.CacheName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /changelog/content/released/v2.14.0-scraper.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2025-04-10" 3 | date: 2025-04-10T07:00:47+02:00 4 | weight: 1036 5 | version: Scraper - v2.14.0 6 | --- 7 | 8 | - {{% tag added %}} Provide support for Cognitive Services Account ([docs](https://docs.promitor.io/scraping/providers/cognitive-services-account/)) 9 | - {{% tag fixed %}} Enforce timeout-based mutex release on scrape jobs to avoid resource exhaustion 10 | - {{% tag fixed %}} Make Batch Scrape Job Resilient to Single Failures 11 | - {{% tag security %}} Patch for various CVEs 12 | 13 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/Scraper-v2.14.0). 14 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/docs/src/layout.pug: -------------------------------------------------------------------------------- 1 | extends _docs-layout.pug 2 | 3 | block variables 4 | - var title = 'Layout - Spectre.css CSS Framework' 5 | - var description = '' 6 | - var current = 'layout' 7 | 8 | block docs-content 9 | //- Flexbox grid 10 | +docs-heading('grid', 'Flexbox grid') 11 | include contents/_ad-g.pug 12 | include contents/grid.pug 13 | 14 | //- Responsive 15 | +docs-heading('responsive', 'Responsive') 16 | include contents/_ad-c.pug 17 | include contents/responsive.pug 18 | 19 | //- Navbar 20 | +docs-heading('navbar', 'Navbar') 21 | include contents/navbar.pug 22 | 23 | include _footer.pug -------------------------------------------------------------------------------- /config/promitor/scraper/ci-runtime.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | httpPort: 88 3 | metricSinks: 4 | openTelemetryCollector: 5 | collectorUri: http://#{Container.OpenTelemetryCollector.Name}#:4317 6 | prometheusScrapingEndpoint: 7 | metricUnavailableValue: NaN 8 | enableMetricTimestamps: true # true by default 9 | baseUriPath: /metrics 10 | metricsConfiguration: 11 | absolutePath: /config/metrics-declaration.yaml 12 | telemetry: 13 | containerLogs: 14 | isEnabled: true 15 | verbosity: trace 16 | defaultVerbosity: trace 17 | azureMonitor: 18 | logging: 19 | isEnabled: false 20 | resourceDiscovery: 21 | host: #{Container.ResourceDiscovery.Name}# 22 | port: 99 -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/LogAnalyticsResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class LogAnalyticsResourceDefinition : AzureResourceDefinition 4 | { 5 | public LogAnalyticsResourceDefinition(string subscriptionId, string resourceGroupName, string workspaceName, string workspaceId) 6 | : base(ResourceType.LogAnalytics, subscriptionId, resourceGroupName, workspaceName) 7 | { 8 | WorkspaceName = workspaceName; 9 | WorkspaceId = workspaceId; 10 | } 11 | 12 | public string WorkspaceId { get; } 13 | public string WorkspaceName { get; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Core/MetricAggregationDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Core 5 | { 6 | public class MetricAggregationDeserializer : Deserializer 7 | { 8 | public MetricAggregationDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(aggregation => aggregation.Type) 11 | .IsRequired(); 12 | Map(aggregation => aggregation.Interval); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/ExpressRouteCircuitDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class ExpressRouteCircuitDeserializer : ResourceDeserializer 7 | { 8 | public ExpressRouteCircuitDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.ExpressRouteCircuitName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /changelog/content/released/vx.x.x.md.template: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2018-09-02" 3 | date: 2019-09-18T20:46:47+02:00 4 | weight: 100 5 | version: v1.0.0 6 | --- 7 | 8 | - {{% tag added %}} Add a test for template variable overwrite 9 | - {{% tag changed %}} Include language code in REF_NOT_FOUND errors 10 | - {{% tag fixed %}} Improve minifier MIME type resolution 11 | - {{% tag deprecated %}} Set GO111MODULE=on for mage install 12 | - {{% tag removed %}} Add instruction to install PostCSS when missing 13 | - {{% tag security %}} Update snapcraft build config to Go 1.11 14 | 15 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/0.2.1). 16 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/mixins/_color.scss: -------------------------------------------------------------------------------- 1 | // Background color utility mixin 2 | @mixin bg-color-variant($name: ".bg-primary", $color: $primary-color) { 3 | #{$name} { 4 | background: $color; 5 | 6 | @if (lightness($color) < 60) { 7 | color: $light-color; 8 | } 9 | } 10 | } 11 | 12 | // Text color utility mixin 13 | @mixin text-color-variant($name: ".text-primary", $color: $primary-color) { 14 | #{$name} { 15 | color: $color; 16 | } 17 | 18 | a#{$name} { 19 | &:focus, 20 | &:hover { 21 | color: darken($color, 5%); 22 | } 23 | &:visited { 24 | color: lighten($color, 5%); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/DeviceProvisioningServiceResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure IoT Hub Device Provisioning Service (DPS). 5 | /// 6 | public class DeviceProvisioningServiceResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure IoT Hub Device Provisioning Service (DPS) to get metrics for. 10 | /// 11 | public string DeviceProvisioningServiceName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/DataFactoryDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class DataFactoryDeserializer : ResourceDeserializer 7 | { 8 | public DataFactoryDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.FactoryName) 11 | .IsRequired(); 12 | Map(resource => resource.PipelineName); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/FunctionAppDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class FunctionAppDeserializer : ResourceDeserializer 7 | { 8 | public FunctionAppDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.FunctionAppName) 11 | .IsRequired(); 12 | Map(resource => resource.SlotName); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/VirtualMachineScaleSetDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class VirtualMachineScaleSetDeserializer : ResourceDeserializer 7 | { 8 | public VirtualMachineScaleSetDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.ScaleSetName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /changelog/content/released/v2.2.0-scraper.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2021-04-05" 3 | date: 2021-04-05T10:38:47+02:00 4 | weight: 1002 5 | version: Scraper - v2.2.0 6 | --- 7 | 8 | - {{% tag added %}} Support for Manage Identity authentication ([docs](https://docs.promitor.io/configuration/v2.x/azure-authentication#supported-authentication-mechanisms) 9 | | [walkthrough](https://docs.promitor.io/walkthrough/use-promitor-with-managed-identity) | [#444](https://github.com/tomkerkhove/promitor/issues/444) 10 | | Contributed by [@Mimetis](https://github.com/Mimetis) 🎉) 11 | 12 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/Scraper-v2.2.0). 13 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/Promitor.Core.Contracts.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | 8.0.21 6 | 7 | 8 | 9 | 1701;1702;1591 10 | 11 | 12 | 13 | 1701;1702;1591 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/AutomationAccountResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | public class AutomationAccountResourceV1 : AzureResourceDefinitionV1 4 | { 5 | /// 6 | /// The name of the Azure Automation account to get metrics for. 7 | /// 8 | public string AccountName { get; set; } 9 | 10 | /// 11 | /// The name of the runbook in your Azure Automation Account account to get metrics for. 12 | /// 13 | public string RunbookName { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/MySqlDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class MySqlDeserializer : ResourceDeserializer 7 | { 8 | public MySqlDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.ServerName) 11 | .IsRequired(); 12 | 13 | Map(resource => resource.Type) 14 | .IsRequired(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Promitor.Core/Configuration/AzureEndpoints.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Configuration 2 | { 3 | public class AzureEndpoints 4 | { 5 | public string AuthenticationEndpoint { get; set; } 6 | public string ResourceManagerEndpoint { get; set; } 7 | public string GraphEndpoint { get; set; } 8 | public string ManagementEndpoint { get; set; } 9 | public string StorageEndpointSuffix { get; set; } 10 | public string KeyVaultSuffix { get; set; } 11 | public string MetricsQueryAudience { get; set; } 12 | public string MetricsClientAudience { get; set; } 13 | public string LogAnalyticsEndpoint { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/docker-compose.override.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | promitor.agents.resourcediscovery: 5 | environment: 6 | - "ASPNETCORE_ENVIRONMENT=Development" 7 | - "PROMITOR_CONFIG_FOLDER=/config/" 8 | - "PROMITOR_AUTH_APPKEY=" 9 | ports: 10 | - "777:88" 11 | dns: 12 | - 8.8.8.8 13 | promitor.agents.scraper: 14 | environment: 15 | - ASPNETCORE_ENVIRONMENT=Development 16 | - PROMITOR_CONFIG_FOLDER=/config/ 17 | - PROMITOR_AUTH_APPKEY= 18 | - PROMITOR_ATLASSIAN_STATUSPAGE_APIKEY= 19 | - SECRETS_STORAGEQUEUE_SAS= 20 | ports: 21 | - "888:88" 22 | dns: 23 | - 8.8.8.8 -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/DataFactoryResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class DataFactoryResourceDefinition : AzureResourceDefinition 4 | { 5 | public DataFactoryResourceDefinition(string subscriptionId, string resourceGroupName, string factoryName, string pipelineName) 6 | : base(ResourceType.DataFactory, subscriptionId, resourceGroupName, $"{factoryName}-{pipelineName}") 7 | { 8 | FactoryName = factoryName; 9 | PipelineName = pipelineName; 10 | } 11 | 12 | public string FactoryName { get; } 13 | 14 | public string PipelineName { get; } 15 | } 16 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/GenericResourceDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class GenericResourceDeserializer : ResourceDeserializer 7 | { 8 | public GenericResourceDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.ResourceUri) 11 | .IsRequired(); 12 | Map(resource => resource.Filter); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.github/workflows/ci-container.yml: -------------------------------------------------------------------------------- 1 | name: CI - Container 2 | 3 | on: 4 | workflow_dispatch: 5 | pull_request: 6 | paths: 7 | - .github/workflows/ci-container.yml 8 | - src/** 9 | 10 | jobs: 11 | scan_scaper: 12 | name: Scan Scraper Agent 13 | uses: ./.github/workflows/templates-scan-image.yml 14 | with: 15 | image_name: local/scraper:${{ github.sha }} 16 | project_name: Promitor.Agents.Scraper 17 | scan_resource_discovery: 18 | name: Scan Resource Discovery Agent 19 | uses: ./.github/workflows/templates-scan-image.yml 20 | with: 21 | image_name: local/resource-discovery:${{ github.sha }} 22 | project_name: Promitor.Agents.ResourceDiscovery -------------------------------------------------------------------------------- /changelog/content/released/v0.8.0-resource-discovery.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2022-06-23" 3 | date: 2022-06-23T10:38:47+02:00 4 | weight: 1017 5 | version: Resource Discovery - v0.8.0 6 | --- 7 | 8 | - {{% tag added %}} Provide scraper for Azure Database for MySQL Servers ([docs](https://docs.promitor.io/v2.7/scraping/providers/mysql/) 9 | | [#1880](https://github.com/tomkerkhove/promitor/issues/324)) 10 | - {{% tag fixed %}} Ensure Resource Discovery background jobs handle paging well to reduce CPU usage ([#2018](https://github.com/tomkerkhove/promitor/issues/2018)) 11 | 12 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/ResourceDiscovery-v0.8.0). 13 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/CognitiveServicesAccountResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class CognitiveServicesAccountResourceDefinition : AzureResourceDefinition 4 | { 5 | public CognitiveServicesAccountResourceDefinition(string subscriptionId, string resourceGroupName, string cognitiveServicesAccountName) 6 | : base(ResourceType.CognitiveServicesAccount, subscriptionId, resourceGroupName, cognitiveServicesAccountName) 7 | { 8 | CognitiveServicesAccountName = cognitiveServicesAccountName; 9 | } 10 | 11 | public string CognitiveServicesAccountName { get; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/DeviceProvisioningServiceResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Contracts.ResourceTypes 2 | { 3 | public class DeviceProvisioningServiceResourceDefinition : AzureResourceDefinition 4 | { 5 | public DeviceProvisioningServiceResourceDefinition(string subscriptionId, string resourceGroupName, string deviceProvisioningServiceName) 6 | : base(ResourceType.DeviceProvisioningService, subscriptionId, resourceGroupName, deviceProvisioningServiceName) 7 | { 8 | DeviceProvisioningServiceName = deviceProvisioningServiceName; 9 | } 10 | 11 | public string DeviceProvisioningServiceName { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/MetricsDeclarationV1.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Promitor.Core.Serialization.Enum; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model 5 | { 6 | /// 7 | /// Represents the metrics configuration file. 8 | /// 9 | public class MetricsDeclarationV1 10 | { 11 | public string Version { get; set; } = SpecVersion.v1.ToString(); 12 | public AzureMetadataV1 AzureMetadata { get; set; } 13 | public MetricDefaultsV1 MetricDefaults { get; set; } 14 | public IReadOnlyCollection Metrics { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Promitor.Tests.Unit/Stubs/OptionsMonitorStub.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Extensions.Options; 3 | 4 | namespace Promitor.Tests.Unit.Stubs 5 | { 6 | public class OptionsMonitorStub : IOptionsMonitor 7 | { 8 | public OptionsMonitorStub(TConfig currentValue) 9 | { 10 | CurrentValue = currentValue; 11 | } 12 | 13 | public TConfig Get(string name) 14 | { 15 | return CurrentValue; 16 | } 17 | 18 | public IDisposable OnChange(Action listener) 19 | { 20 | return null; 21 | } 22 | 23 | public TConfig CurrentValue { get; set; } 24 | } 25 | } -------------------------------------------------------------------------------- /.github/workflows/lint-markdown.yml: -------------------------------------------------------------------------------- 1 | name: Lint Markdown 2 | 3 | # Controls when the workflow will run 4 | on: 5 | pull_request: 6 | branches: [ master ] 7 | 8 | # Allows you to run this workflow manually from the Actions tab 9 | workflow_dispatch: 10 | 11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | lint-changelog: 14 | name: Lint Markdown Files 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Check out code 18 | uses: actions/checkout@v4 19 | 20 | - name: Lint Files 21 | uses: avto-dev/markdown-lint@v1 22 | with: 23 | args: '**/*.md --ignore changelog/themes/hugo-changelog-theme/' 24 | -------------------------------------------------------------------------------- /changelog/content/released/v2.4.0-scraper.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "released on 2021-07-15" 3 | date: 2021-07-15T10:38:47+02:00 4 | weight: 1007 5 | version: Scraper - v2.4.0 6 | --- 7 | 8 | - {{% tag added %}} Provide runtime metric to indicate scraping outcome ([docs](https://docs.promitor.io//operations/#performance) 9 | | [#1304](https://github.com/tomkerkhove/promitor/issues/1304)) 10 | - {{% tag added %}} Provide system metric related to HTTP request performance ([docs](https://docs.promitor.io//operations/#performance) 11 | | [#1659](https://github.com/tomkerkhove/promitor/issues/1659)) 12 | 13 | Full release notes can be found [here](https://github.com/tomkerkhove/promitor/releases/tag/Scraper-v2.4.0). 14 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/BlobStorageResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape Azure Storage blobs. 5 | /// 6 | public class BlobStorageResourceV1 : StorageAccountResourceV1 7 | { 8 | public BlobStorageResourceV1() 9 | { 10 | } 11 | 12 | public BlobStorageResourceV1(StorageAccountResourceV1 storageAccountResource) 13 | : base(storageAccountResource?.AccountName, storageAccountResource?.ResourceGroupName) 14 | { 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/FileStorageResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape Azure Storage files. 5 | /// 6 | public class FileStorageResourceV1 : StorageAccountResourceV1 7 | { 8 | public FileStorageResourceV1() 9 | { 10 | } 11 | 12 | public FileStorageResourceV1(StorageAccountResourceV1 storageAccountResource) 13 | : base(storageAccountResource?.AccountName, storageAccountResource?.ResourceGroupName) 14 | { 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/WebAppResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape an Azure Web App. 5 | /// 6 | public class WebAppResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The name of the Azure Web App. 10 | /// 11 | public string WebAppName { get; set; } 12 | 13 | /// 14 | /// The name of the deployment slot. 15 | /// 16 | public string SlotName { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /changelog/themes/hugo-changelog-theme/assets/spectre/src/_chips.scss: -------------------------------------------------------------------------------- 1 | // Chips 2 | .chip { 3 | align-items: center; 4 | background: $bg-color-dark; 5 | border-radius: 5rem; 6 | color: $gray-color-dark; 7 | display: inline-flex; 8 | font-size: 90%; 9 | height: $unit-6; 10 | line-height: $unit-4; 11 | margin: $unit-h; 12 | max-width: 100%; 13 | padding: $unit-1 $unit-2; 14 | text-decoration: none; 15 | vertical-align: middle; 16 | 17 | &.active { 18 | background: $primary-color; 19 | color: $light-color; 20 | } 21 | 22 | .avatar { 23 | margin-left: -$unit-2; 24 | margin-right: $unit-1; 25 | } 26 | 27 | .btn-clear { 28 | transform: scale(.75); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Promitor.Core.Contracts/ResourceTypes/MySqlResourceDefinition.cs: -------------------------------------------------------------------------------- 1 | using Promitor.Core.Contracts.ResourceTypes.Enums; 2 | 3 | namespace Promitor.Core.Contracts.ResourceTypes 4 | { 5 | public class MySqlResourceDefinition : AzureResourceDefinition 6 | { 7 | public MySqlResourceDefinition(string subscriptionId, string resourceGroupName, string serverName, MySqlServerType type) 8 | : base(ResourceType.MySql, subscriptionId, resourceGroupName, $"{serverName}-{type}") 9 | { 10 | ServerName = serverName; 11 | Type = type; 12 | } 13 | 14 | public string ServerName { get; } 15 | public MySqlServerType Type { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/DataFactoryResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape a Data Factory instance. 5 | /// 6 | public class DataFactoryResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The data factory name. 10 | /// 11 | public string FactoryName { get; set; } 12 | 13 | /// 14 | /// The data pipeline name. 15 | /// 16 | public string PipelineName { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/ResourceTypes/DataShareResourceV1.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes 2 | { 3 | /// 4 | /// Contains the configuration required to scrape a Data Share instance. 5 | /// 6 | public class DataShareResourceV1 : AzureResourceDefinitionV1 7 | { 8 | /// 9 | /// The data share account name. 10 | /// 11 | public string AccountName { get; set; } 12 | 13 | /// 14 | /// The data share name. 15 | /// 16 | public string ShareName { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Promitor.Core.Scraping/Configuration/Serialization/v1/Providers/CognitiveServicesAccountDeserializer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Promitor.Core.Scraping.Configuration.Serialization.v1.Model.ResourceTypes; 3 | 4 | namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Providers 5 | { 6 | public class CognitiveServicesAccountDeserializer : ResourceDeserializer 7 | { 8 | public CognitiveServicesAccountDeserializer(ILogger logger) : base(logger) 9 | { 10 | Map(resource => resource.CognitiveServicesAccountName) 11 | .IsRequired(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Promitor.Tests.Integration/Infrastructure/ConfigurationFactory.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Configuration; 2 | 3 | namespace Promitor.Tests.Integration.Infrastructure 4 | { 5 | public class ConfigurationFactory 6 | { 7 | public static IConfiguration Create() 8 | { 9 | // The appsettings.local.json allows users to override (gitignored) settings locally for testing purposes 10 | return new ConfigurationBuilder() 11 | .AddJsonFile(path: "appsettings.json") 12 | .AddJsonFile(path: "appsettings.local.json", optional: true) 13 | .AddEnvironmentVariables() 14 | .Build(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Promitor.Core/EnvironmentVariables.cs: -------------------------------------------------------------------------------- 1 | namespace Promitor.Core 2 | { 3 | public class EnvironmentVariables 4 | { 5 | public class Configuration 6 | { 7 | public const string Folder = "PROMITOR_CONFIG_FOLDER"; 8 | } 9 | 10 | public class Authentication 11 | { 12 | public const string ApplicationId = "AUTH_APPID"; 13 | public const string ApplicationKey = "AUTH_APPKEY"; 14 | } 15 | 16 | public class Integrations 17 | { 18 | public class AtlassianStatuspage 19 | { 20 | public const string ApiKey = "ATLASSIAN_STATUSPAGE_APIKEY"; 21 | } 22 | } 23 | } 24 | } --------------------------------------------------------------------------------