|
| 1 | +kind: ConfigMap |
| 2 | +apiVersion: v1 |
| 3 | +data: |
| 4 | + schema-version: |
| 5 | + #string.used by agent to parse config. supported versions are {v1}. Configs with other schema versions will be rejected by the agent. |
| 6 | + v1 |
| 7 | + config-version: |
| 8 | + #string.used by customer to keep track of this config file's version in their source control/repository (max allowed 10 chars, other chars will be truncated) |
| 9 | + ver1 |
| 10 | + log-data-collection-settings: |- |
| 11 | + # Log data collection settings |
| 12 | + # Any errors related to config map settings can be found in the KubeMonAgentEvents table in the Log Analytics workspace that the cluster is sending data to. |
| 13 | +
|
| 14 | + [log_collection_settings] |
| 15 | + [log_collection_settings.stdout] |
| 16 | + # In the absense of this configmap, default value for enabled is true |
| 17 | + enabled = true |
| 18 | + # exclude_namespaces setting holds good only if enabled is set to true |
| 19 | + # kube-system log collection is disabled by default in the absence of 'log_collection_settings.stdout' setting. If you want to enable kube-system, remove it from the following setting. |
| 20 | + # If you want to continue to disable kube-system log collection keep this namespace in the following setting and add any other namespace you want to disable log collection to the array. |
| 21 | + # In the absense of this configmap, default value for exclude_namespaces = ["kube-system"] |
| 22 | + exclude_namespaces = ["kube-system","ingress-nginx"] |
| 23 | +
|
| 24 | + [log_collection_settings.stderr] |
| 25 | + # Default value for enabled is true |
| 26 | + enabled = true |
| 27 | + # exclude_namespaces setting holds good only if enabled is set to true |
| 28 | + # kube-system log collection is disabled by default in the absence of 'log_collection_settings.stderr' setting. If you want to enable kube-system, remove it from the following setting. |
| 29 | + # If you want to continue to disable kube-system log collection keep this namespace in the following setting and add any other namespace you want to disable log collection to the array. |
| 30 | + # In the absense of this cofigmap, default value for exclude_namespaces = ["kube-system"] |
| 31 | + exclude_namespaces = ["kube-system"] |
| 32 | +
|
| 33 | + [log_collection_settings.env_var] |
| 34 | + # In the absense of this configmap, default value for enabled is true |
| 35 | + enabled = true |
| 36 | + [log_collection_settings.enrich_container_logs] |
| 37 | + # In the absense of this configmap, default value for enrich_container_logs is false |
| 38 | + enabled = false |
| 39 | + # When this is enabled (enabled = true), every container log entry (both stdout & stderr) will be enriched with container Name & container Image |
| 40 | + [log_collection_settings.collect_all_kube_events] |
| 41 | + # In the absense of this configmap, default value for collect_all_kube_events is false |
| 42 | + # When the setting is set to false, only the kube events with !normal event type will be collected |
| 43 | + enabled = false |
| 44 | + # When this is enabled (enabled = true), all kube events including normal events will be collected |
| 45 | +
|
| 46 | + prometheus-data-collection-settings: |- |
| 47 | + # Custom Prometheus metrics data collection settings |
| 48 | + [prometheus_data_collection_settings.cluster] |
| 49 | + # Cluster level scrape endpoint(s). These metrics will be scraped from agent's Replicaset (singleton) |
| 50 | + # Any errors related to prometheus scraping can be found in the KubeMonAgentEvents table in the Log Analytics workspace that the cluster is sending data to. |
| 51 | +
|
| 52 | + #Interval specifying how often to scrape for metrics. This is duration of time and can be specified for supporting settings by combining an integer value and time unit as a string value. Valid time units are ns, us (or µs), ms, s, m, h. |
| 53 | + interval = "1m" |
| 54 | +
|
| 55 | + ## Uncomment the following settings with valid string arrays for prometheus scraping |
| 56 | + #fieldpass = ["metric_to_pass1", "metric_to_pass12"] |
| 57 | +
|
| 58 | + #fielddrop = ["metric_to_drop"] |
| 59 | +
|
| 60 | + # An array of urls to scrape metrics from. |
| 61 | + # urls = ["http://myurl:9101/metrics"] |
| 62 | +
|
| 63 | + # An array of Kubernetes services to scrape metrics from. |
| 64 | + # kubernetes_services = ["http://my-service-dns.my-namespace:9102/metrics"] |
| 65 | +
|
| 66 | + # When monitor_kubernetes_pods = true, replicaset will scrape Kubernetes pods for the following prometheus annotations: |
| 67 | + # - prometheus.io/scrape: Enable scraping for this pod |
| 68 | + # - prometheus.io/scheme: If the metrics endpoint is secured then you will need to |
| 69 | + # set this to `https` & most likely set the tls config. |
| 70 | + # - prometheus.io/path: If the metrics path is not /metrics, define it with this annotation. |
| 71 | + # - prometheus.io/port: If port is not 9102 use this annotation |
| 72 | + monitor_kubernetes_pods = false |
| 73 | +
|
| 74 | + ## Restricts Kubernetes monitoring to namespaces for pods that have annotations set and are scraped using the monitor_kubernetes_pods setting. |
| 75 | + ## This will take effect when monitor_kubernetes_pods is set to true |
| 76 | + ## ex: monitor_kubernetes_pods_namespaces = ["default1", "default2", "default3"] |
| 77 | + # monitor_kubernetes_pods_namespaces = ["default1"] |
| 78 | +
|
| 79 | + [prometheus_data_collection_settings.node] |
| 80 | + # Node level scrape endpoint(s). These metrics will be scraped from agent's DaemonSet running in every node in the cluster |
| 81 | + # Any errors related to prometheus scraping can be found in the KubeMonAgentEvents table in the Log Analytics workspace that the cluster is sending data to. |
| 82 | +
|
| 83 | + #Interval specifying how often to scrape for metrics. This is duration of time and can be specified for supporting settings by combining an integer value and time unit as a string value. Valid time units are ns, us (or µs), ms, s, m, h. |
| 84 | + interval = "1m" |
| 85 | +
|
| 86 | + ## Uncomment the following settings with valid string arrays for prometheus scraping |
| 87 | +
|
| 88 | + # An array of urls to scrape metrics from. $NODE_IP (all upper case) will substitute of running Node's IP address |
| 89 | + # urls = ["http://$NODE_IP:9103/metrics"] |
| 90 | +
|
| 91 | + #fieldpass = ["metric_to_pass1", "metric_to_pass12"] |
| 92 | +
|
| 93 | + #fielddrop = ["metric_to_drop"] |
| 94 | +
|
| 95 | + metric_collection_settings: |- |
| 96 | + # Metrics collection settings for metrics sent to Log Analytics and MDM |
| 97 | + [metric_collection_settings.collect_kube_system_pv_metrics] |
| 98 | + # In the absense of this configmap, default value for collect_kube_system_pv_metrics is false |
| 99 | + # When the setting is set to false, only the persistent volume metrics outside the kube-system namespace will be collected |
| 100 | + enabled = false |
| 101 | + # When this is enabled (enabled = true), persistent volume metrics including those in the kube-system namespace will be collected |
| 102 | +
|
| 103 | + alertable-metrics-configuration-settings: |- |
| 104 | + # Alertable metrics configuration settings for container resource utilization |
| 105 | + [alertable_metrics_configuration_settings.container_resource_utilization_thresholds] |
| 106 | + # The threshold(Type Float) will be rounded off to 2 decimal points |
| 107 | + # Threshold for container cpu, metric will be sent only when cpu utilization exceeds or becomes equal to the following percentage |
| 108 | + container_cpu_threshold_percentage = 95.0 |
| 109 | + # Threshold for container memoryRss, metric will be sent only when memory rss exceeds or becomes equal to the following percentage |
| 110 | + container_memory_rss_threshold_percentage = 95.0 |
| 111 | + # Threshold for container memoryWorkingSet, metric will be sent only when memory working set exceeds or becomes equal to the following percentage |
| 112 | + container_memory_working_set_threshold_percentage = 95.0 |
| 113 | +
|
| 114 | + # Alertable metrics configuration settings for persistent volume utilization |
| 115 | + [alertable_metrics_configuration_settings.pv_utilization_thresholds] |
| 116 | + # Threshold for persistent volume usage bytes, metric will be sent only when persistent volume utilization exceeds or becomes equal to the following percentage |
| 117 | + pv_usage_threshold_percentage = 60.0 |
| 118 | + integrations: |- |
| 119 | + [integrations.azure_network_policy_manager] |
| 120 | + collect_basic_metrics = false |
| 121 | + collect_advanced_metrics = false |
| 122 | +metadata: |
| 123 | + name: container-azm-ms-agentconfig |
| 124 | + namespace: kube-system |
0 commit comments