├── .gitattributes ├── .github └── workflows │ ├── codeql-analysis.yml │ ├── devskim.yml │ ├── pr-checker.yml │ ├── run_unit_tests.yml │ └── stale.yml ├── .gitignore ├── .pipelines ├── azure_pipeline_mergedbranches.yaml ├── azure_pipeline_testframework.yaml ├── build-linux.sh ├── build-windows.cmd ├── ci-aks-prod-release.yaml ├── ci-arc-k8s-extension-canary-release.yaml ├── ci-arc-k8s-extension-prod-release.yaml ├── daily_addons_enablement_test.yaml ├── get-aad-app-creds-from-kv.sh ├── get-kube-config-from-kv.sh ├── get-workspace-id-and-key.sh ├── install-chart-to-aks-engine-cluster.sh ├── install-oci-helm-chart-to-arc-k8s.sh ├── install-oras.sh ├── pipeline.user.linux.official.all_tag.all_phase.all_config.ci_prod.yml ├── pipeline.user.linux.yml ├── pipeline.user.windows.official.all_tag.all_phase.all_config.ci_prod.yml ├── pipeline.user.windows.yml ├── pull-from-cdpx-and-push-to-ci-acr-linux-image.sh ├── pull-from-cdpx-and-push-to-ci-acr-windows-image.sh ├── push-helm-chart-to-canary-repos.sh ├── push-helm-chart-to-prod-repos.sh ├── release-agent.sh ├── restore-linux.sh ├── restore-windows.cmd ├── update-place-holders-in-yaml.sh ├── update-place-holdres-in-e2e-tests.sh └── validate-e2e-tests-results.sh ├── .trivyignore ├── CODEOWNERS ├── Dev Guide.md ├── Documentation ├── AgentSettings │ └── ReadMe.md ├── DCR │ └── ContainerLogV2Extension.json ├── External │ └── Grafana │ │ ├── AzureMonitorContainers.json │ │ └── ama-metrics-prometheus-config.yaml ├── Grafana-Dashboards │ └── ContainerLogV2.json ├── Internal │ ├── ContainerLogV2-Linux.xml │ ├── ContainerLogV2-Windows.xml │ └── Grafana │ │ ├── AzureMonitorContainers-GenevaLogs_Multitenancy-Infra-Namespaces.json │ │ ├── AzureMonitorContainers-GenevaLogs_Multitenancy-Tenant-Namespaces.json │ │ └── ama-metrics-prometheus-config.yaml ├── MultiTenancyLogging │ ├── AdvancedMode │ │ ├── AzureMonitorContainers_AdvancedMode_Grafana.json │ │ ├── ama-metrics-prometheus-config-node.yaml │ │ └── ama-metrics-prometheus-config.yaml │ └── BasicMode │ │ ├── AzureMonitorContainers_BasicMode_Grafana.json │ │ └── ama-metrics-prometheus-config-node.yaml ├── NetworkFlowLogging │ └── AzureMonitorContainers_NetworkFlow_Grafana.json └── OSMPrivatePreview │ ├── Image1.jpg │ └── ReadMe.md ├── Kubecon └── README.MD ├── LICENSE ├── MARINER.md ├── README.md ├── ReleaseNotes.md ├── ReleaseProcess.md ├── SECURITY.md ├── alerts ├── NotReadyQuery.md ├── NotReadyQueryChart.md ├── PendingPodCount.md ├── README.md └── recommended_alerts_ARM │ ├── ContainerCPUPercentage.json │ ├── ContainerWorkingSetMemoryPercentage.json │ ├── NodeCPUPercentage.json │ ├── NodeDiskUsagePercentage.json │ ├── NodeNotReady.json │ ├── NodeWorkingSetMemoryPercentage.json │ ├── OOMKilledContainers.json │ ├── PVUsagePercentage.json │ ├── PodReadyPercentage.json │ ├── PodsInFailedState.json │ ├── README.md │ ├── RestartingContainerCount.json │ └── StaleJobsCount.json ├── build ├── common │ └── installer │ │ ├── conf │ │ ├── azm-containers-input-plugins.conf │ │ ├── azm-containers-parser-multiline.conf │ │ └── azm-containers-parser.conf │ │ └── scripts │ │ ├── ConfigParseErrorLogger.rb │ │ ├── fluent-bit-conf-customizer.rb │ │ ├── fluent-bit-geneva-conf-customizer.rb │ │ ├── tomlparser-agent-config.rb │ │ ├── tomlparser-common-agent-config.rb │ │ ├── tomlparser-geneva-config.rb │ │ ├── tomlparser-mdm-metrics-config.rb │ │ ├── tomlparser-prom-agent-config.rb │ │ ├── tomlparser-prom-customconfig.rb │ │ └── tomlparser.rb ├── linux │ ├── Makefile │ └── installer │ │ ├── InstallBuilder │ │ ├── README │ │ ├── aixlpp.py │ │ ├── datafileparser.py │ │ ├── hpuxpackage.py │ │ ├── installbuilder.py │ │ ├── linuxdpkg.py │ │ ├── linuxrpm.py │ │ ├── scxutil.py │ │ ├── sunospkg.py │ │ └── tools │ │ │ └── bin │ │ │ ├── dpkg-deb-x64 │ │ │ └── dpkg-deb-x86 │ │ ├── bundle │ │ ├── bundle_skel.sh │ │ └── create_bundle.sh │ │ ├── conf │ │ ├── 70-rsyslog-forward-mdsd-ci.conf │ │ ├── container-cm.conf │ │ ├── container.conf │ │ ├── fluent-bit-azmon-logs-svc.conf │ │ ├── fluent-bit-azmon-logs_metadata_filter.conf │ │ ├── fluent-bit-azmon-logs_tenant.conf │ │ ├── fluent-bit-azmon-multi-tenancy.conf │ │ ├── fluent-bit-common.conf │ │ ├── fluent-bit-geneva-logs_infra.conf │ │ ├── fluent-bit-geneva-logs_infra_filter.conf │ │ ├── fluent-bit-geneva-logs_tenant.conf │ │ ├── fluent-bit-geneva-logs_tenant_filter.conf │ │ ├── fluent-bit-geneva-telemetry-svc.conf │ │ ├── fluent-bit-geneva.conf │ │ ├── fluent-bit-input.conf │ │ ├── fluent-bit-internal-metrics.conf │ │ ├── fluent-bit-network-flow-logs.conf │ │ ├── fluent-bit-prom-side-car.conf │ │ ├── fluent-bit-rs.conf │ │ ├── fluent-bit.conf │ │ ├── health_model_definition.json │ │ ├── healthmonitorconfig.json │ │ ├── installinfo.txt │ │ ├── kube-cm.conf │ │ ├── kube.conf │ │ ├── out_oms.conf │ │ ├── prometheus-side-car.conf │ │ ├── telegraf-prom-side-car.conf │ │ ├── telegraf-rs.conf │ │ ├── telegraf.conf │ │ ├── test.json │ │ ├── windows_rs_containerinventory.conf │ │ └── windows_rs_perf.conf │ │ ├── datafiles │ │ ├── base_container.data │ │ ├── linux.data │ │ ├── linux_dpkg.data │ │ └── linux_rpm.data │ │ └── scripts │ │ ├── TelegrafTCPErrorTelemetry.sh │ │ ├── dcr-config-parser.rb │ │ ├── livenessprobe.sh │ │ ├── tomlparser-metric-collection-config.rb │ │ ├── tomlparser-npm-config.rb │ │ └── tomlparser-osm-config.rb ├── version └── windows │ ├── Makefile.ps1 │ └── installer │ ├── certificategenerator │ ├── CertificateGenerator.csproj │ └── Program.cs │ ├── conf │ ├── fluent-bit-azmon-logs_metadata_filter.conf │ ├── fluent-bit-azmon-logs_tenant.conf │ ├── fluent-bit-azmon-multi-tenancy.conf │ ├── fluent-bit-common.conf │ ├── fluent-bit-geneva-logs_infra.conf │ ├── fluent-bit-geneva-logs_infra_filter.conf │ ├── fluent-bit-geneva-logs_tenant.conf │ ├── fluent-bit-geneva-logs_tenant_filter.conf │ ├── fluent-bit-geneva.conf │ ├── fluent-bit-input.conf │ ├── fluent-bit-internal-metrics.conf │ ├── fluent-bit-telegraf-tcp.conf │ ├── fluent-bit.conf │ ├── fluent-cm.conf │ ├── fluent-cri-parser.conf │ ├── fluent-docker-parser.conf │ ├── fluent.conf │ ├── out_oms.conf │ └── telegraf.conf │ ├── livenessprobe │ └── livenessprobe.cpp │ └── scripts │ ├── filesystemwatcher.ps1 │ └── rubyKeepCertificateAlive │ ├── AgentTopologyRequestHandler.rb │ ├── amalogshelper.rb │ ├── in_heartbeat_request.rb │ └── omscommon.rb ├── charts ├── azuremonitor-containers-geneva │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── hpa.yaml │ │ └── service.yaml │ └── values.yaml └── azuremonitor-containers │ ├── .helmignore │ ├── Chart.yaml │ ├── README.md │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── ama-logs-arc-k8s-crd.yaml │ ├── ama-logs-daemonset-windows.yaml │ ├── ama-logs-daemonset.yaml │ ├── ama-logs-deployment.yaml │ ├── ama-logs-priorityclass.yaml │ ├── ama-logs-rbac.yaml │ ├── ama-logs-rs-configmap.yaml │ └── ama-logs-secret.yaml │ └── values.yaml ├── deployment ├── arc-k8s-extension-release-v2 │ └── ServiceGroupRoot │ │ ├── Parameters │ │ └── ContainerInsightsExtension.Parameters.json │ │ ├── RolloutSpecs │ │ ├── Public.CanaryPreview.RolloutSpec.json │ │ ├── Public.CanaryStable.RolloutSpec.json │ │ └── Public.Stable.RolloutSpec.json │ │ ├── ScopeBindings │ │ └── Public.ScopeBindings.json │ │ ├── Scripts │ │ └── arcExtensionRelease.sh │ │ ├── ServiceModels │ │ └── Public.ServiceModel.json │ │ └── buildver.txt ├── arc-k8s-extension │ └── ServiceGroupRoot │ │ ├── Parameters │ │ └── ContainerInsightsExtension.Parameters.json │ │ ├── RolloutSpecs │ │ ├── Public.Canary.RolloutSpec.json │ │ ├── Public.FF.RolloutSpec.json │ │ ├── Public.HighLoad.RolloutSpec.json │ │ ├── Public.LightLoad.RolloutSpec.json │ │ ├── Public.MC.RolloutSpec.json │ │ ├── Public.MediumLoad.RolloutSpec.json │ │ └── Public.Pilot.RolloutSpec.json │ │ ├── ScopeBindings │ │ └── Public.ScopeBindings.json │ │ ├── Scripts │ │ └── pushChartToAcr.sh │ │ ├── ServiceModels │ │ └── Public.ServiceModel.json │ │ └── buildver.txt └── mergebranch-multiarch-agent-deployment │ └── ServiceGroupRoot │ ├── Parameters │ ├── ContainerInsights.Linux.Parameters.json │ └── ContainerInsights.Windows.Parameters.json │ ├── RolloutSpecs │ └── RolloutSpecs.json │ ├── ScopeBindings │ └── Public.ScopeBindings.json │ ├── Scripts │ └── pushAgentToAcr.sh │ ├── ServiceModels │ └── Public.ServiceModel.json │ └── buildver.txt ├── img └── azuremonitor-containers.svg ├── kubernetes ├── ama-logs-adx-secret.yaml ├── ama-logs.yaml ├── container-azm-ms-agentconfig.yaml ├── container-azm-ms-osmconfig.yaml ├── container-azm-ms-vpaconfig.yaml ├── linux │ ├── Dockerfile.multiarch │ ├── acrworkflows │ │ ├── acrdevnamespace.yaml │ │ └── acrprodnamespace.yaml │ ├── azurelinux-official-cloud-native-amd64.repo │ ├── azurelinux-official-cloud-native-arm64.repo │ ├── defaultpromenvvariables │ ├── defaultpromenvvariables-rs │ ├── defaultpromenvvariables-sidecar │ ├── dockerbuild │ │ └── build-and-publish-docker-image.sh │ ├── envmdsd │ ├── logrotate.conf │ ├── main.sh │ ├── mdsd.xml │ └── setup.sh └── windows │ ├── Dockerfile │ ├── Dockerfile-dev-image │ ├── acrWorkflows │ ├── acrcreate.ps1 │ ├── acrwindowsdevnamespace.yaml │ └── acrwindowsprodnamespace.yaml │ ├── dockerbuild │ ├── build-and-publish-dev-docker-image.ps1 │ ├── build-and-publish-docker-image.ps1 │ └── build-dev-base-image.ps1 │ ├── main.ps1 │ ├── setdefaulttelegrafenvvariables.ps1 │ └── setup.ps1 ├── scripts ├── build │ ├── linux │ │ └── install-build-pre-requisites.sh │ └── windows │ │ └── install-build-pre-requisites.ps1 ├── cluster-creation │ ├── README.md │ ├── aks-engine.sh │ ├── arc-k8s-cluster.sh │ ├── aro-v4.sh │ └── onprem-k8s.sh ├── dcr-onboarding │ ├── ci-extension-dcr-streams.md │ └── ci-extension-dcr.json ├── onboarding │ ├── add-monitoring-metrics-publisher-role.md │ ├── aks │ │ ├── mdmonboarding │ │ │ ├── mdm_onboarding.ps1 │ │ │ ├── mdm_onboarding.sh │ │ │ ├── mdm_onboarding_atscale.ps1 │ │ │ └── mdm_onboarding_atscale.sh │ │ ├── multi-tenancy │ │ │ ├── existingClusterOnboarding.json │ │ │ └── existingClusterParam.json │ │ ├── onboarding-msi-azure-policy │ │ │ ├── README.md │ │ │ ├── azure-policy.parameters.json │ │ │ └── azure-policy.rules.json │ │ ├── onboarding-msi-bicep-syslog │ │ │ ├── existingClusterOnboarding.bicep │ │ │ └── existingClusterParam.json │ │ ├── onboarding-msi-bicep │ │ │ ├── existingClusterOnboarding.bicep │ │ │ └── existingClusterParam.json │ │ ├── onboarding-msi-terraform-syslog │ │ │ ├── README.md │ │ │ ├── main.tf │ │ │ ├── outputs.tf │ │ │ ├── providers.tf │ │ │ └── variables.tf │ │ ├── onboarding-msi-terraform │ │ │ ├── README.md │ │ │ ├── main.tf │ │ │ ├── outputs.tf │ │ │ ├── providers.tf │ │ │ └── variables.tf │ │ ├── onboarding-using-azure-policy │ │ │ ├── azure-policy.json │ │ │ ├── azurepolicy.parameters.json │ │ │ └── azurepolicy.rules.json │ │ └── onboarding-using-msi-auth │ │ │ ├── existingClusterOnboarding.json │ │ │ └── existingClusterParam.json │ ├── aksengine │ │ └── kubernetes │ │ │ ├── AddMonitoringOnboardingTags.sh │ │ │ └── AddMonitoringWorkspaceTags.ps1 │ ├── aro │ │ ├── disable_monitoring │ │ │ ├── OptOutParam.json │ │ │ └── OptOutTemplate.json │ │ ├── enable_monitoring_to_existing_cluster │ │ │ ├── existingClusterOnboarding.json │ │ │ └── existingClusterParam.json │ │ └── enable_monitoring_to_new_cluster │ │ │ ├── newClusterWithMonitoring.json │ │ │ └── newClusterWithMonitoringParam.json │ ├── attach-monitoring-tags.md │ ├── clusteruser │ │ ├── cluster-user-role-binding.yaml │ │ └── cluster-user-role.yaml │ ├── enable-monitoring-using-policy.md │ ├── hybrid │ │ └── onboarding_azuremonitor_for_containers.sh │ ├── managed │ │ ├── disable-monitoring.ps1 │ │ ├── disable-monitoring.sh │ │ ├── enable-monitoring.ps1 │ │ ├── enable-monitoring.sh │ │ └── upgrade-monitoring.sh │ ├── solution-onboarding.md │ └── templates │ │ ├── arc-k8s-extension-msi-auth │ │ ├── existingClusterOnboarding.json │ │ └── existingClusterParam.json │ │ ├── arc-k8s-extension-provisionedcluster-msi-auth │ │ ├── existingClusterOnboarding.json │ │ └── existingClusterParam.json │ │ ├── arc-k8s-extension-provisionedcluster │ │ ├── existingClusterOnboarding.json │ │ └── existingClusterParam.json │ │ ├── arc-k8s-extension │ │ ├── existingClusterOnboarding.json │ │ └── existingClusterParam.json │ │ ├── azuremonitor-containerSolution.json │ │ └── azuremonitor-containerSolutionParams.json ├── preview │ └── mdm-alerts │ │ ├── cluster-ws-link.sh │ │ ├── private-preview-onboard-MSI.sh │ │ └── private-preview-onboard.sh └── troubleshoot │ ├── ContainerInsightsSolution.json │ ├── LogCollection │ ├── AgentLogCollection.sh │ └── README.md │ ├── Parameterfile.json │ ├── README.md │ ├── TroubleshootError.ps1 │ ├── TroubleshootError_AcsEngine.ps1 │ ├── TroubleshootError_nonAzureK8s.ps1 │ ├── collect_logs.sh │ └── troubleshooterrors.sh ├── source └── plugins │ ├── go │ ├── input │ │ ├── cmetrics_windows.go │ │ ├── containerinventory │ │ │ ├── Makefile │ │ │ └── containerinventory.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── lib │ │ │ ├── applicationinsights.go │ │ │ ├── cadvisor.go │ │ │ ├── cadvisor_test.go │ │ │ ├── consts.go │ │ │ ├── containerinventorystate.go │ │ │ ├── containerinventorystate_test.go │ │ │ ├── kubernetesapiclient.go │ │ │ ├── kubernetesapiclient_test.go │ │ │ ├── kubernetescontainerinventory.go │ │ │ ├── kubernetescontainerinventory_test.go │ │ │ ├── proxyutils.go │ │ │ ├── proxyutils_test.go │ │ │ ├── testdata │ │ │ │ ├── pods1.json │ │ │ │ ├── pods2.json │ │ │ │ ├── summary1.json │ │ │ │ └── summary2.json │ │ │ ├── utils.go │ │ │ └── utils_test.go │ │ └── perf │ │ │ ├── Makefile │ │ │ └── perf.go │ └── src │ │ ├── Makefile │ │ ├── extension │ │ ├── extension.go │ │ ├── extension_linux.go │ │ ├── extension_test.go │ │ ├── extension_windows.go │ │ ├── interfaces.go │ │ └── socket_writer.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── ingestion_token_utils.go │ │ ├── network_flow_logs.go │ │ ├── network_flow_logs_test.go │ │ ├── oms.go │ │ ├── oms_test.go │ │ ├── out_oms.go │ │ ├── telemetry.go │ │ ├── utils.go │ │ ├── utils_linux.go │ │ ├── utils_test.go │ │ └── utils_windows.go │ ├── ruby │ ├── ApplicationInsightsUtility.rb │ ├── CAdvisorMetricsAPIClient.rb │ ├── ContainerInventoryState.rb │ ├── CustomMetricsUtils.rb │ ├── KubernetesApiClient.rb │ ├── MdmAlertTemplates.rb │ ├── MdmMetricsGenerator.rb │ ├── WatchStream.rb │ ├── arc_k8s_cluster_identity.rb │ ├── constants.rb │ ├── extension.rb │ ├── extension_utils.rb │ ├── filter_cadvisor2mdm.rb │ ├── filter_inventory2mdm.rb │ ├── filter_telegraf2mdm.rb │ ├── in_cadvisor_perf.rb │ ├── in_containerinventory.rb │ ├── in_kube_events.rb │ ├── in_kube_nodes.rb │ ├── in_kube_nodes_test.rb │ ├── in_kube_perfinventory.rb │ ├── in_kube_podinventory.rb │ ├── in_kube_podmdminventory.rb │ ├── in_kube_pvinventory.rb │ ├── in_kubestate_deployments.rb │ ├── in_kubestate_hpa.rb │ ├── in_win_cadvisor_perf.rb │ ├── kubelet_utils.rb │ ├── kubernetes_container_inventory.rb │ ├── lib │ │ ├── application_insights.rb │ │ └── application_insights │ │ │ ├── channel │ │ │ ├── asynchronous_queue.rb │ │ │ ├── asynchronous_sender.rb │ │ │ ├── contracts │ │ │ │ ├── application.rb │ │ │ │ ├── availability_data.rb │ │ │ │ ├── base.rb │ │ │ │ ├── cloud.rb │ │ │ │ ├── data.rb │ │ │ │ ├── data_point.rb │ │ │ │ ├── data_point_type.rb │ │ │ │ ├── dependency_kind.rb │ │ │ │ ├── dependency_source_type.rb │ │ │ │ ├── device.rb │ │ │ │ ├── domain.rb │ │ │ │ ├── envelope.rb │ │ │ │ ├── event_data.rb │ │ │ │ ├── exception_data.rb │ │ │ │ ├── exception_details.rb │ │ │ │ ├── internal.rb │ │ │ │ ├── json_serializable.rb │ │ │ │ ├── location.rb │ │ │ │ ├── message_data.rb │ │ │ │ ├── metric_data.rb │ │ │ │ ├── operation.rb │ │ │ │ ├── page_view_data.rb │ │ │ │ ├── page_view_perf_data.rb │ │ │ │ ├── remote_dependency_data.rb │ │ │ │ ├── reopenings.rb │ │ │ │ ├── request_data.rb │ │ │ │ ├── session.rb │ │ │ │ ├── severity_level.rb │ │ │ │ ├── stack_frame.rb │ │ │ │ └── user.rb │ │ │ ├── event.rb │ │ │ ├── queue_base.rb │ │ │ ├── sender_base.rb │ │ │ ├── synchronous_queue.rb │ │ │ ├── synchronous_sender.rb │ │ │ ├── telemetry_channel.rb │ │ │ └── telemetry_context.rb │ │ │ ├── rack │ │ │ └── track_request.rb │ │ │ ├── telemetry_client.rb │ │ │ ├── unhandled_exception.rb │ │ │ └── version.rb │ ├── oms_common.rb │ ├── omslog.rb │ ├── out_mdm.rb │ ├── podinventory_to_mdm.rb │ └── proxy_utils.rb │ └── utils │ ├── oms_common.rb │ └── omslog.rb └── test ├── README.md ├── containerlog-scale-tests ├── 400logspersec-2klogentrysize.yaml ├── 400logspersec-5klogentrysize.yaml ├── ci-log-scale-4kpersec-5klogline.yaml ├── cleanup.sh ├── containerlogv2 │ ├── containerlogv2_linux-resource-app.yml │ └── containerlogv2_windows-resource-app.yml ├── deploy.sh └── log-generator-job-app.yaml ├── e2e ├── conformance.yaml ├── e2e-tests.yaml └── src │ ├── common │ ├── arm_rest_utility.py │ ├── constants.py │ ├── helm_utility.py │ ├── kubernetes_configmap_utility.py │ ├── kubernetes_crd_utility.py │ ├── kubernetes_daemonset_utility.py │ ├── kubernetes_deployment_utility.py │ ├── kubernetes_namespace_utility.py │ ├── kubernetes_node_utility.py │ ├── kubernetes_pod_utility.py │ ├── kubernetes_secret_utility.py │ ├── kubernetes_service_utility.py │ ├── kubernetes_version_utility.py │ └── results_utility.py │ ├── core │ ├── Dockerfile │ ├── conftest.py │ ├── e2e_tests.sh │ ├── helper.py │ ├── pytest.ini │ └── setup_failure_handler.py │ └── tests │ ├── test_ds_workflows.py │ ├── test_e2e_workflows.py │ ├── test_node_metrics_e2e_workflow.py │ ├── test_pod_metrics_e2e_workflow.py │ ├── test_resource_status.py │ └── test_rs_workflows.py ├── fluent-bit-windows └── fluent-bit-windows.yaml ├── ginkgo-e2e ├── containerstatus │ ├── containerstatus_suite_test.go │ ├── containerstatus_test.go │ ├── go.mod │ └── go.sum ├── livenessprobe │ ├── go.mod │ ├── go.sum │ ├── livenessprobe_suite_test.go │ └── livenessprobe_test.go ├── querylogs │ ├── go.mod │ ├── go.sum │ ├── querylogs_suite_test.go │ └── querylogs_test.go └── utils │ ├── constants.go │ ├── go.mod │ ├── go.sum │ ├── kubernetes_api_utils.go │ ├── query_logs_api_utils.go │ └── setup_utils.go ├── networkflow-scale-tests ├── fortio-client.yaml ├── fortio-server-service.yaml └── fortio-server.yaml ├── onboarding-templates-legacy-auth ├── existingClusterOnboarding.json └── existingClusterParam.json ├── prometheus-scraping ├── prom-service-for-rs-scraping.yaml ├── prometheus-reference-app.yaml ├── win-prometheus-ref-app-ltsc2019.yml └── win-prometheus-ref-app-ltsc2022.yml ├── scenario ├── log-app-win-ltsc2019.yml ├── log-app-win-ltsc2022.yml ├── log-generator-app.yaml ├── multiline │ ├── dotnet-win.yaml │ ├── dotnet.yaml │ ├── golang-win.yaml │ ├── golang.yaml │ ├── java-win.yaml │ ├── java.yaml │ ├── python-win.yaml │ └── python.yaml └── yamls │ ├── many-containers-in-pod.yaml │ ├── nested-json.yaml │ ├── simple-json.yaml │ └── two-containers-in-pod.yaml ├── testkube ├── api-server-permissions.yaml ├── custom-job-template.yaml ├── executors.json ├── helm-testkube-values.yaml ├── install-and-execute-testkube-tests.sh └── testkube-test-crs.yaml └── unit-tests ├── canned-api-responses ├── kube-nodes-malformed.txt └── kube-nodes.txt ├── run_go_tests.sh ├── run_ruby_tests.sh └── test_driver.rb /.gitattributes: -------------------------------------------------------------------------------- 1 | +*.yaml text eol=lf 2 | +*.sh text eol=lf 3 | +*.yml text eol=lf 4 | -------------------------------------------------------------------------------- /.github/workflows/devskim.yml: -------------------------------------------------------------------------------- 1 | name: "Devskim" 2 | 3 | on: 4 | push: 5 | branches: [ "ci_prod" ] 6 | pull_request: 7 | # The branches below must be a subset of the branches above 8 | branches: [ "ci_prod" ] 9 | schedule: 10 | - cron: '39 0 * * 0' 11 | 12 | jobs: 13 | lint: 14 | name: DevSkim 15 | runs-on: ubuntu-latest 16 | permissions: 17 | actions: read 18 | contents: read 19 | security-events: write 20 | steps: 21 | - name: Checkout code 22 | uses: actions/checkout@v3 23 | - name: Run DevSkim scanner 24 | uses: microsoft/DevSkim-Action@v1 25 | - name: Upload DevSkim scan results to GitHub Security tab 26 | uses: github/codeql-action/upload-sarif@v2 27 | with: 28 | sarif_file: devskim-results.sarif 29 | -------------------------------------------------------------------------------- /.github/workflows/run_unit_tests.yml: -------------------------------------------------------------------------------- 1 | name: Run Unit Tests 2 | on: 3 | pull_request: 4 | types: [opened, synchronize, reopened] 5 | branches: 6 | - ci_dev 7 | - ci_prod 8 | push: 9 | branches: 10 | - ci_dev 11 | - ci_prod 12 | jobs: 13 | Golang-Tests: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Setup Go 1.23.8 17 | uses: actions/setup-go@v4 18 | with: 19 | go-version: '1.23.8' 20 | - name: Check out repository code 21 | uses: actions/checkout@v2 22 | - name: Run unit tests 23 | run: | 24 | cd ${{ github.workspace }} 25 | ./test/unit-tests/run_go_tests.sh 26 | Ruby-Tests: 27 | runs-on: ubuntu-latest 28 | steps: 29 | - name: Check out repository code 30 | uses: actions/checkout@v2 31 | - name: install fluent 32 | run: | 33 | sudo gem install fluentd -v "1.14.2" --no-document 34 | sudo gem install ipaddress --no-document 35 | sudo fluentd --setup ./fluent 36 | - name: Run unit tests 37 | run: | 38 | cd ${{ github.workspace }} 39 | ./test/unit-tests/run_ruby_tests.sh 40 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: Mark stale issues and pull requests 2 | 3 | on: 4 | schedule: 5 | - cron: "30 10 * * *" 6 | 7 | jobs: 8 | stale: 9 | 10 | runs-on: ubuntu-latest 11 | permissions: 12 | issues: write 13 | pull-requests: write 14 | 15 | steps: 16 | - uses: actions/stale@v3 17 | with: 18 | repo-token: ${{ secrets.GITHUB_TOKEN }} 19 | days-before-issue-stale: 7 20 | days-before-pr-stale: 7 21 | stale-issue-message: 'This issue is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 5 days.' 22 | stale-pr-message: 'This PR is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 5 days.' 23 | close-issue-message: 'This issue was closed because it has been stalled for 12 days with no activity.' 24 | close-pr-message: 'This PR was closed because it has been stalled for 12 days with no activity.' 25 | days-before-issue-close: 5 26 | days-before-pr-close: 5 27 | stale-issue-label: 'no-issue-activity' 28 | stale-pr-label: 'no-pr-activity' 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # git ignore file for the Docker-Provider project 2 | 3 | /intermediate/ 4 | /target/ 5 | /build/config.mak 6 | .vscode/launch.json 7 | # ignore go packages 8 | source/plugins/go/pkg/ 9 | # .net code build artificats 10 | build/windows/installer/certificategenerator/bin 11 | build/windows/installer/certificategenerator/obj 12 | # files under amalogswindows dir since this temp directory to build the docker image 13 | kubernetes/windows/amalogswindows 14 | # ignore everything under intermediate directory 15 | intermediate 16 | # ignore files which are having these extensions 17 | *.pyc 18 | *.so 19 | *.zip 20 | *.tar 21 | *.exe 22 | *.jar 23 | *.dll 24 | *.obj 25 | # ignore docker provider shell bundle 26 | kubernetes/linux/Linux_ULINUX_1.0_*_64_Release 27 | # ignore generated .h files for go 28 | source/plugins/go/src/*.h 29 | *_mock.go 30 | *_log.txt 31 | *.log 32 | *.byebug_history 33 | go.work.sum 34 | go.work -------------------------------------------------------------------------------- /.pipelines/build-linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set +e 4 | 5 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | echo $DIR 7 | 8 | echo "set GOARCH and GOOS env variables" 9 | export GOOS="linux" 10 | export GOARCH="amd64" 11 | go env 12 | 13 | cd $DIR/../build/linux 14 | echo "----------- Build Docker Provider -------------------------------" 15 | make 16 | cd $DIR 17 | 18 | echo "------------ Bundle Shell Extension Scripts for Agent Release -------------------------" 19 | cd $DIR/../deployment/mergebranch-multiarch-agent-deployment/ServiceGroupRoot/Scripts 20 | tar -czvf ../artifacts.tar.gz pushAgentToAcr.sh 21 | cd $DIR 22 | 23 | echo "------------ Bundle Shell Extension Scripts & HELM chart -------------------------" 24 | cd $DIR/../deployment/arc-k8s-extension/ServiceGroupRoot/Scripts 25 | tar -czvf ../artifacts.tar.gz ../../../../charts/azuremonitor-containers/ pushChartToAcr.sh 26 | 27 | 28 | -------------------------------------------------------------------------------- /.pipelines/build-windows.cmd: -------------------------------------------------------------------------------- 1 | setlocal enabledelayedexpansion 2 | powershell.exe -ExecutionPolicy Unrestricted -NoProfile -WindowStyle Hidden -File "%~dp0..\build\windows\Makefile.ps1" 3 | endlocal 4 | exit /B %ERRORLEVEL% 5 | -------------------------------------------------------------------------------- /.pipelines/get-aad-app-creds-from-kv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "start: get app id and secret from specified key vault" 4 | 5 | for ARGUMENT in "$@" 6 | do 7 | KEY=$(echo $ARGUMENT | cut -f1 -d=) 8 | VALUE=$(echo $ARGUMENT | cut -f2 -d=) 9 | 10 | case "$KEY" in 11 | KV) KV=$VALUE ;; 12 | KVSECRETNAMEAPPID) AppId=$VALUE ;; 13 | KVSECRETNAMEAPPSECRET) AppSecret=$VALUE ;; 14 | KVSECRETNAMECDPXAPPID) CdpxAppId=$VALUE ;; 15 | KVSECRETNAMECDPXAPPSECRET) CdpxAppSecret=$VALUE ;; 16 | *) 17 | esac 18 | done 19 | 20 | echo "key vault name:${KV}" 21 | echo "key vault secret name for appid:${KVSECRETNAMEAPPID}" 22 | echo "key vault secret name for appsecret:${KVSECRETNAMEAPPSECRET}" 23 | 24 | az keyvault secret download --file ~/acrappid --vault-name ${KV} --name ${AppId} 25 | 26 | echo "downloaded the appid from KV:${KV} and KV secret:${AppId}" 27 | 28 | az keyvault secret download --file ~/acrappsecret --vault-name ${KV} --name ${AppSecret} 29 | 30 | echo "downloaded the appsecret from KV:${KV} and KV secret:${AppSecret}" 31 | 32 | echo "key vault secret name for cdpx appid:${KVSECRETNAMECDPXAPPID}" 33 | 34 | echo "key vault secret name for cdpx appsecret:${KVSECRETNAMECDPXAPPSECRET}" 35 | 36 | az keyvault secret download --file ~/cdpxacrappid --vault-name ${KV} --name ${CdpxAppId} 37 | 38 | echo "downloaded the appid from KV:${KV} and KV secret:${CdpxAppId}" 39 | 40 | az keyvault secret download --file ~/cdpxacrappsecret --vault-name ${KV} --name ${CdpxAppSecret} 41 | 42 | echo "downloaded the appsecret from KV:${KV} and KV secret:${CdpxAppSecret}" 43 | 44 | echo "end: get app id and secret from specified key vault" 45 | -------------------------------------------------------------------------------- /.pipelines/get-kube-config-from-kv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "start: get kubeconfig from secret in KV" 4 | 5 | for ARGUMENT in "$@" 6 | do 7 | KEY=$(echo $ARGUMENT | cut -f1 -d=) 8 | VALUE=$(echo $ARGUMENT | cut -f2 -d=) 9 | 10 | case "$KEY" in 11 | KV) KV=$VALUE ;; 12 | KVSECRETNAMEKUBECONFIG) KubeConfigSecret=$VALUE ;; 13 | *) 14 | esac 15 | done 16 | 17 | echo "key vault name:${KV}" 18 | echo "key vault secret name for kubeconfig:${KVSECRETNAMEKUBECONFIG}" 19 | 20 | echo "downloading the KubeConfig from KV:${KV} and KV secret:${KubeConfigSecret}" 21 | az keyvault secret download --file ~/kubeconfig --vault-name ${KV} --name ${KubeConfigSecret} 22 | echo "downloaded the KubeConfig from KV:${KV} and KV secret:${KubeConfigSecret}" 23 | 24 | echo "end: get kubeconfig from secret in KV" 25 | -------------------------------------------------------------------------------- /.pipelines/get-workspace-id-and-key.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "start: get workspace id and key from WorkspaceResourceId etc.." 4 | for ARGUMENT in "$@" 5 | do 6 | KEY=$(echo $ARGUMENT | cut -f1 -d=) 7 | VALUE=$(echo $ARGUMENT | cut -f2 -d=) 8 | 9 | case "$KEY" in 10 | WorkspaceResourceId) WorkspaceResourceId=$VALUE ;; 11 | 12 | *) 13 | esac 14 | done 15 | 16 | echo "Log Analytics Workspace ResourceId: ${WorkspaceResourceId}" 17 | 18 | echo "getting workspace Guid" 19 | workspaceGuid=$(az resource show --ids $WorkspaceResourceId --resource-type Microsoft.OperationalInsights/workspaces --query properties.customerId -o tsv) 20 | echo "writing workspace guid to WSID file" 21 | echo $workspaceGuid > ~/WSID 22 | 23 | echo "getting workspace primaryshared key" 24 | workspaceKey=$(az rest --method post --uri $WorkspaceResourceId/sharedKeys?api-version=2015-11-01-preview --query primarySharedKey -o tsv) 25 | echo "writing workspace key to WSKEY file" 26 | echo $workspaceKey > ~/WSKEY 27 | 28 | echo "end: get workspace id and key from WorkspaceResourceId etc.." 29 | -------------------------------------------------------------------------------- /.pipelines/install-chart-to-aks-engine-cluster.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "start: install azure-monitor for containers chart to specificied aks-engine cluster" 4 | releaseName="azmon-containers-release-1" 5 | 6 | for ARGUMENT in "$@" 7 | do 8 | KEY=$(echo $ARGUMENT | cut -f1 -d=) 9 | VALUE=$(echo $ARGUMENT | cut -f2 -d=) 10 | 11 | case "$KEY" in 12 | ClusterName) ClusterName=$VALUE ;; 13 | CIRelease) CI_RELEASE=$VALUE ;; 14 | CIImageTagSuffix) CI_IMAGE_TAG_SUFFIX=$VALUE ;; 15 | *) 16 | esac 17 | done 18 | 19 | 20 | echo "replace linux agent image" 21 | linuxAgentImageTag=$CI_RELEASE$CI_IMAGE_TAG_SUFFIX 22 | echo "Linux Agent Image Tag:"$linuxAgentImageTag 23 | 24 | imageRepo="mcr.microsoft.com/azuremonitor/containerinsights/${CI_RELEASE}" 25 | echo "image repo: ${imageRepo}" 26 | 27 | echo "replace windows agent image" 28 | windowsAgentImageTag="win-"$CI_RELEASE$CI_IMAGE_TAG_SUFFIX 29 | echo "Windows Agent Image Tag:"$windowsAgentImageTag 30 | 31 | echo "read workspace id and key which written by get-workspace-id-and-key.sh script" 32 | WSID=$(cat ~/WSID) 33 | WSKEY=$(cat ~/WSKEY) 34 | 35 | echo "Workspace GUID: ${WSID}" 36 | # dont log key and enable for debugging 37 | # echo "Workspace Key: ${WSKEY}" 38 | 39 | # kubeconfig=$(cat ~/kubeconfig) 40 | # echo "kubeconfig:${kubeconfig}" 41 | 42 | echo "installing the chart release: ${releaseName}" 43 | helm upgrade --install $releaseName --kubeconfig ~/kubeconfig --set amalogs.secret.wsid=$WSID,amalogs.secret.key=$WSKEY,amalogs.env.clusterName=$ClusterName,amalogs.image.repo=$imageRepo,amalogs.image.tag=$linuxAgentImageTag,amalogs.image.tagWindows=$windowsAgentImageTag azuremonitor-containers 44 | -------------------------------------------------------------------------------- /.pipelines/install-oras.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # oras[https://github.com/deislabs/oras)] required to push an HELM chart as an OCI artifact 3 | 4 | echo "start: installing oras tool" 5 | DEFAULT_ORAS_VERSION="0.8.1" 6 | for ARGUMENT in "$@" 7 | do 8 | KEY=$(echo $ARGUMENT | cut -f1 -d=) 9 | VALUE=$(echo $ARGUMENT | cut -f2 -d=) 10 | 11 | case "$KEY" in 12 | ORAS_VERSION) ORAS_VERSION=$VALUE ;; 13 | *) 14 | esac 15 | done 16 | 17 | if [ -z $ORAS_VERSION ]; then 18 | ORAS_VERSION=$DEFAULT_ORAS_VERSION 19 | fi 20 | 21 | echo "oras version: ${ORAS_VERSION}" 22 | 23 | echo "start: downloading oras tool" 24 | curl -LO https://github.com/deislabs/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_amd64.tar.gz 25 | echo "end: downloading oras tool" 26 | 27 | echo "start: extract oras tar file" 28 | mkdir -p oras-install/ 29 | tar -zxf oras_${ORAS_VERSION}_*.tar.gz -C oras-install/ 30 | echo "end: extract oras tar file" 31 | 32 | echo "start: move oras binaries to /usr/local/bin/" 33 | mv oras-install/oras /usr/local/bin/ 34 | echo "end: move oras binaries to /usr/local/bin/" 35 | 36 | rm -rf oras_${ORAS_VERSION}_*.tar.gz oras-install/ 37 | 38 | echo "end: installing oras tool" 39 | -------------------------------------------------------------------------------- /.pipelines/push-helm-chart-to-canary-repos.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # working directory of this script should be charts/azuremonitor-containers 3 | 4 | # note: this repo registered in arc k8s extension for canary region 5 | export REPO_PATH="public/azuremonitor/containerinsights/canary/preview/azuremonitor-containers" 6 | 7 | export HELM_EXPERIMENTAL_OCI=1 8 | 9 | for ARGUMENT in "$@" 10 | do 11 | KEY=$(echo $ARGUMENT | cut -f1 -d=) 12 | VALUE=$(echo $ARGUMENT | cut -f2 -d=) 13 | 14 | case "$KEY" in 15 | CIACR) CIACR=$VALUE ;; 16 | CICHARTVERSION) CHARTVERSION=$VALUE ;; 17 | *) 18 | esac 19 | done 20 | 21 | echo "CI ARC K8S ACR: ${CIACR}" 22 | echo "CI HELM CHART VERSION: ${CHARTVERSION}" 23 | 24 | echo "start: read appid and appsecret" 25 | ACR_APP_ID=$(cat ~/acrappid) 26 | ACR_APP_SECRET=$(cat ~/acrappsecret) 27 | echo "end: read appid and appsecret" 28 | 29 | ACR=${CIACR} 30 | 31 | echo "login to acr:${ACR} using helm" 32 | helm registry login $ACR --username $ACR_APP_ID --password $ACR_APP_SECRET 33 | 34 | echo "login to acr:${ACR} completed: ${ACR}" 35 | 36 | echo "start: push the chart version: ${CHARTVERSION} to acr repo: ${ACR}" 37 | 38 | echo "save the chart locally with acr full path" 39 | helm chart save . ${ACR}/${REPO_PATH}:${CHARTVERSION} 40 | 41 | echo "pushing the helm chart to ACR: ${ACR}" 42 | helm chart push ${ACR}/${REPO_PATH}:${CHARTVERSION} 43 | 44 | echo "end: push the chart version: ${CHARTVERSION} to acr repo: ${ACR}" 45 | -------------------------------------------------------------------------------- /.pipelines/restore-linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | pwd 3 | PWD=`pwd` 4 | pushd $PWD 5 | 6 | # Find location of this script 7 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 8 | echo $DIR 9 | 10 | # change to source code directory 11 | cd $DIR/../source/plugins/go/src 12 | pwd 13 | 14 | echo "go environment variables" 15 | go env 16 | 17 | echo "start:get go modules" 18 | go get 19 | echo "end:get go modules" 20 | 21 | # Restore working directory 22 | popd 23 | 24 | # Exit with explicit 0 exit code so build will not fail 25 | exit 0 26 | -------------------------------------------------------------------------------- /.pipelines/restore-windows.cmd: -------------------------------------------------------------------------------- 1 | echo "START:Adding and restoring dotnet packages" 2 | cd /D "%~dp0..\build\windows\installer\certificategenerator" 3 | dotnet add package Newtonsoft.json 4 | dotnet add package BouncyCastle 5 | dotnet restore CertificateGenerator.csproj 6 | dotnet publish -c Release -r win10-x64 7 | echo "END:Adding and restoring dotnet packages" 8 | 9 | echo "START:set env vars to indicate this running on cdpx build machine" 10 | setx IsCDPXBuildMachine "true" 11 | set IsCDPXBuildMachine="true" 12 | echo "END:set env vars to indicate this running on cdpx build machine" 13 | 14 | echo "START:Getting go packages" 15 | cd /D "%~dp0..\source\plugins\go\src" 16 | go get 17 | echo "END:Getting go packages" 18 | -------------------------------------------------------------------------------- /.pipelines/update-place-holdres-in-e2e-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "start: update placeholders of e2e-tests.yaml ..." 4 | 5 | for ARGUMENT in "$@" 6 | do 7 | KEY=$(echo $ARGUMENT | cut -f1 -d=) 8 | VALUE=$(echo $ARGUMENT | cut -f2 -d=) 9 | 10 | case "$KEY" in 11 | TENANT_ID) TENANT_ID=$VALUE ;; 12 | *) 13 | esac 14 | done 15 | 16 | echo "start: read appid and appsecret" 17 | # used the same SP which used for acr 18 | CLIENT_ID=$(cat ~/acrappid) 19 | CLIENT_SECRET=$(cat ~/acrappsecret) 20 | echo "end: read appid and appsecret" 21 | 22 | echo "Service Principal CLIENT_ID:$CLIENT_ID" 23 | echo "replace CLIENT_ID value" 24 | sed -i "s=SP_CLIENT_ID_VALUE=$CLIENT_ID=g" e2e-tests.yaml 25 | 26 | # only uncomment for debug purpose 27 | # echo "Service Principal CLIENT_SECRET:$CLIENT_SECRET" 28 | echo "replace CLIENT_SECRET value" 29 | sed -i "s=SP_CLIENT_SECRET_VALUE=$CLIENT_SECRET=g" e2e-tests.yaml 30 | 31 | echo "Service Principal TENANT_ID:$TENANT_ID" 32 | echo "replace TENANT_ID value" 33 | sed -i "s=SP_TENANT_ID_VALUE=$TENANT_ID=g" e2e-tests.yaml 34 | 35 | echo "end: update placeholders of e2e-tests.yaml." 36 | -------------------------------------------------------------------------------- /.trivyignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Docker-Provider/014357e8dc87cd476cfa5c7c213a50b5bc9157c2/.trivyignore -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Lines starting with '#' are comments. 2 | # Each line is a file pattern followed by one or more owners. 3 | 4 | # These owners will be the default owners for everything in the repo. 5 | * @microsoft/docker-provider-devs 6 | 7 | # Order is important. The last matching pattern has the most precedence. 8 | # So for example below (commented out) if a pull request only touches javascript files, only these owners 9 | # will be requested to review. 10 | #*.js @octocat @github/js 11 | 12 | # You can also use email addresses if you prefer. 13 | #docs/* docs@example.com -------------------------------------------------------------------------------- /Documentation/DCR/ContainerLogV2Extension.json: -------------------------------------------------------------------------------- 1 | { 2 | "location": "", 3 | "properties": { 4 | "dataSources": { 5 | "extensions": [ 6 | { 7 | "streams": [ 8 | "Microsoft-ContainerLogV2-HighScale" 9 | ], 10 | "extensionName": "ContainerLogV2Extension", 11 | "extensionSettings": { 12 | "dataCollectionSettings": { 13 | "namespaces": ["app-team-k8s-namespace-1", "app-team-k8s-namespace-2"] 14 | } 15 | }, 16 | "name": "ContainerLogV2Extension" 17 | } 18 | ] 19 | }, 20 | "destinations": { 21 | "logAnalytics": [ 22 | { 23 | "workspaceResourceId": "/subscriptions//resourcegroups//providers/microsoft.operationalinsights/workspaces/", 24 | "name": "la-workspace" 25 | } 26 | ] 27 | }, 28 | "dataFlows": [ 29 | { 30 | "streams": [ 31 | "Microsoft-ContainerLogV2-HighScale" 32 | ], 33 | "transformKql": "source | where LogLevel in ('CRITICAL', 'ERROR')", 34 | "destinations": [ 35 | "la-workspace" 36 | ] 37 | } 38 | ] 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Documentation/External/Grafana/ama-metrics-prometheus-config.yaml: -------------------------------------------------------------------------------- 1 | kind: ConfigMap 2 | apiVersion: v1 3 | data: 4 | prometheus-config: |- 5 | scrape_configs: 6 | - job_name: ama-logs-daemonset 7 | kubernetes_sd_configs: 8 | - role: pod 9 | relabel_configs: 10 | - source_labels: [__meta_kubernetes_pod_controller_kind] 11 | action: keep 12 | regex: 'DaemonSet' 13 | - source_labels: [__meta_kubernetes_pod_controller_name] 14 | regex: ^(ama-logs|ama-logs-windows)$ 15 | action: keep 16 | - source_labels: [__address__] 17 | action: replace 18 | target_label: __address__ 19 | regex: (.+?)(\:\d+)? 20 | replacement: $1:9102 21 | - source_labels: [__meta_kubernetes_pod_name] 22 | action: replace 23 | target_label: instance 24 | - source_labels: [__meta_kubernetes_pod_node_name] 25 | action: replace 26 | target_label: node 27 | metadata: 28 | name: ama-metrics-prometheus-config 29 | namespace: kube-system 30 | -------------------------------------------------------------------------------- /Documentation/MultiTenancyLogging/AdvancedMode/ama-metrics-prometheus-config-node.yaml: -------------------------------------------------------------------------------- 1 | kind: ConfigMap 2 | apiVersion: v1 3 | data: 4 | prometheus-config: |- 5 | scrape_configs: 6 | - job_name: ama-logs-daemonset 7 | kubernetes_sd_configs: 8 | - role: pod 9 | relabel_configs: 10 | - source_labels: [__meta_kubernetes_pod_controller_kind] 11 | action: keep 12 | regex: 'DaemonSet' 13 | - source_labels: [__meta_kubernetes_pod_controller_name] 14 | regex: ^(ama-logs|ama-logs-windows)$ 15 | action: keep 16 | - source_labels: [__address__] 17 | action: replace 18 | target_label: __address__ 19 | regex: (.+?)(\:\d+)? 20 | replacement: $1:9102 21 | - source_labels: [__meta_kubernetes_pod_name] 22 | action: replace 23 | target_label: instance 24 | - source_labels: [__meta_kubernetes_pod_node_name] 25 | action: replace 26 | target_label: node 27 | - source_labels: [__meta_kubernetes_pod_node_name] 28 | action: keep 29 | regex: $NODE_NAME 30 | metadata: 31 | name: ama-metrics-prometheus-config-node 32 | namespace: kube-system 33 | -------------------------------------------------------------------------------- /Documentation/MultiTenancyLogging/AdvancedMode/ama-metrics-prometheus-config.yaml: -------------------------------------------------------------------------------- 1 | kind: ConfigMap 2 | apiVersion: v1 3 | data: 4 | prometheus-config: |- 5 | scrape_configs: 6 | - job_name: ama-logs-multitenancy 7 | kubernetes_sd_configs: 8 | - role: pod 9 | relabel_configs: 10 | - source_labels: [__meta_kubernetes_pod_controller_kind] 11 | action: keep 12 | regex: 'ReplicaSet' 13 | - source_labels: [__meta_kubernetes_pod_controller_name] 14 | regex: '^ama-logs-multitenancy(-.*)?$' 15 | action: keep 16 | - source_labels: [__address__] 17 | action: replace 18 | target_label: __address__ 19 | regex: (.+?)(\:\d+)? 20 | replacement: $1:9102 21 | - source_labels: [__meta_kubernetes_pod_name] 22 | action: replace 23 | target_label: instance 24 | - source_labels: [__meta_kubernetes_pod_node_name] 25 | action: replace 26 | target_label: node 27 | metadata: 28 | name: ama-metrics-prometheus-config 29 | namespace: kube-system 30 | -------------------------------------------------------------------------------- /Documentation/MultiTenancyLogging/BasicMode/ama-metrics-prometheus-config-node.yaml: -------------------------------------------------------------------------------- 1 | kind: ConfigMap 2 | apiVersion: v1 3 | data: 4 | prometheus-config: |- 5 | scrape_configs: 6 | - job_name: ama-logs-daemonset 7 | kubernetes_sd_configs: 8 | - role: pod 9 | relabel_configs: 10 | - source_labels: [__meta_kubernetes_pod_controller_kind] 11 | action: keep 12 | regex: 'DaemonSet' 13 | - source_labels: [__meta_kubernetes_pod_controller_name] 14 | regex: ^(ama-logs|ama-logs-windows)$ 15 | action: keep 16 | - source_labels: [__address__] 17 | action: replace 18 | target_label: __address__ 19 | regex: (.+?)(\:\d+)? 20 | replacement: $1:9102 21 | - source_labels: [__meta_kubernetes_pod_name] 22 | action: replace 23 | target_label: instance 24 | - source_labels: [__meta_kubernetes_pod_node_name] 25 | action: replace 26 | target_label: node 27 | - source_labels: [__meta_kubernetes_pod_node_name] 28 | action: keep 29 | regex: $NODE_NAME 30 | metadata: 31 | name: ama-metrics-prometheus-config-node 32 | namespace: kube-system 33 | -------------------------------------------------------------------------------- /Documentation/OSMPrivatePreview/Image1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/Docker-Provider/014357e8dc87cd476cfa5c7c213a50b5bc9157c2/Documentation/OSMPrivatePreview/Image1.jpg -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Docker-Provider 2 | 3 | Copyright (c) Microsoft Corporation 4 | All rights reserved. 5 | 6 | MIT License 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining 9 | a copy of this software and associated documentation files (the 10 | ""Software""), to deal in the Software without restriction, including 11 | without limitation the rights to use, copy, modify, merge, publish, 12 | distribute, sublicense, and/or sell copies of the Software, and to 13 | permit persons to whom the Software is furnished to do so, subject to 14 | the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be 17 | included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, 20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 23 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 24 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /alerts/NotReadyQuery.md: -------------------------------------------------------------------------------- 1 | ``` 2 | let endDateTime = now(); 3 | let startDateTime = ago(1h); 4 | let trendBinSize = 1m; 5 | let clusterName = 'YOURCLUSTERNAME'; 6 | KubeNodeInventory 7 | | where TimeGenerated < endDateTime 8 | | where TimeGenerated >= startDateTime 9 | | distinct ClusterName, Computer, TimeGenerated 10 | | summarize ClusterSnapshotCount = count() by bin(TimeGenerated, trendBinSize), ClusterName, Computer 11 | | join hint.strategy=broadcast kind=inner ( 12 | KubeNodeInventory 13 | | where TimeGenerated < endDateTime 14 | | where TimeGenerated >= startDateTime 15 | | summarize TotalCount = count(), ReadyCount = sumif(1, Status contains ('Ready')) 16 | by ClusterName, Computer, bin(TimeGenerated, trendBinSize) 17 | | extend NotReadyCount = TotalCount - ReadyCount 18 | ) on ClusterName, Computer, TimeGenerated 19 | | project TimeGenerated, 20 | ClusterName, 21 | Computer, 22 | ReadyCount = todouble(ReadyCount) / ClusterSnapshotCount, 23 | NotReadyCount = todouble(NotReadyCount) / ClusterSnapshotCount 24 | | order by ClusterName asc, Computer asc, TimeGenerated desc 25 | ``` 26 | -------------------------------------------------------------------------------- /alerts/NotReadyQueryChart.md: -------------------------------------------------------------------------------- 1 | ``` 2 | let endDateTime = now(); 3 | let startDateTime = ago(1h); 4 | let trendBinSize = 1m; 5 | let clusterName = 'YOURCLUSTERNAME'; //can remove references for this from the query to show data for all clusters 6 | KubeNodeInventory 7 | | where TimeGenerated < endDateTime 8 | | where TimeGenerated >= startDateTime 9 | | where ClusterName == clusterName 10 | | distinct ClusterName, TimeGenerated 11 | | summarize ClusterSnapshotCount = count() by Timestamp = bin(TimeGenerated, trendBinSize), ClusterName 12 | | join hint.strategy=broadcast ( 13 | KubeNodeInventory 14 | | where TimeGenerated < endDateTime 15 | | where TimeGenerated >= startDateTime 16 | | summarize TotalCount = count(), ReadyCount = sumif(1, Status contains ('Ready')) 17 | by ClusterName, Timestamp = bin(TimeGenerated, trendBinSize) 18 | | extend NotReadyCount = TotalCount - ReadyCount 19 | ) on ClusterName, Timestamp 20 | | project Timestamp, 21 | ReadyCount = todouble(ReadyCount) / ClusterSnapshotCount, 22 | NotReadyCount = todouble(NotReadyCount) / ClusterSnapshotCount 23 | | render timechart 24 | ``` 25 | -------------------------------------------------------------------------------- /build/common/installer/conf/azm-containers-input-plugins.conf: -------------------------------------------------------------------------------- 1 | [PLUGINS] 2 | Path /opt/fluent-bit/bin/containerinventory.so 3 | 4 | [PLUGINS] 5 | Path /opt/fluent-bit/bin/perf.so 6 | -------------------------------------------------------------------------------- /build/common/installer/conf/azm-containers-parser-multiline.conf: -------------------------------------------------------------------------------- 1 | [MULTILINE_PARSER] 2 | name dotnet 3 | type regex 4 | flush_timeout 4000 # milliseconds, set to fluent-bit default https://github.com/fluent/fluent-bit/blob/master/include/fluent-bit/multiline/flb_ml.h#L50 5 | 6 | # Regex rules for multiline parsing 7 | # --------------------------------- 8 | 9 | # configuration hints: 10 | 11 | # - first state always has the name: start_state 12 | # - every field in the rule must be inside double quotes 13 | 14 | # rules | state name | regex pattern | next state 15 | # ------|---------------|-------------------------------------------- 16 | rule "start_state" "/^( *)(?!at).*Exception.*/" "at" 17 | rule "at" "/^( *)at ([._\w\d]*(\.[._\w\d<>]+)?)\.([_\w\d\[\]<>]*)\((([_\w\d]+(\[\]|&|\*)? [_\w\d]+)(, )?)*\)( in .*)?(:line *\d*)?/" "at2" 18 | rule "at2" "/^( *)(at .*|--- End of inner exception stack trace ---)/" "at2" -------------------------------------------------------------------------------- /build/common/installer/conf/azm-containers-parser.conf: -------------------------------------------------------------------------------- 1 | [PARSER] 2 | Name docker 3 | Format json 4 | Time_Key time 5 | Time_Format %Y-%m-%dT%H:%M:%S.%L 6 | Time_Keep On 7 | # Command | Decoder | Field | Optional Action 8 | # =============|==================|================= 9 | # this was updated in 1.4.2 fluent-bit. Whenever upgrading fluent-bit, remember to keep this file in sync with the released parsers.conf file of the corresponding fluent version. 10 | #Decode_Field_As escaped log 11 | 12 | 13 | [PARSER] 14 | # http://rubular.com/r/tjUt3Awgg4 15 | Name cri 16 | Format regex 17 | Regex ^(?