This message was deleted.
# azure
s
This message was deleted.
👍 1
k
This should do it for a blob storage account
Copy code
const enabledLogs = [
    "kube-apiserver",
    "kube-controller-manager",
    "kube-scheduler",
    "kube-audit",
    "kube-audit-admin",
    "cluster-autoscaler",
    "guard",
  ];

// Enable the Monitoring Diagonostic control plane component logs and AllMetrics
  const azMonitoringDiagnostic = new azure.monitoring.DiagnosticSetting(
    conf.commonConfig.nameClean,
    {
      storageAccountId: >>>acc<<<,
      targetResourceId: : >>>clusterId<<<,
      logs: enabledLogs.map((category) => ({
        category,
        enabled: true,
        retentionPolicy: { enabled: true },
      })),
      metrics: [
        {
          category: "AllMetrics",
          retentionPolicy: { enabled: true },
        },
      ],
    }
  );
b
Ah excellent! Thanks!