@@ -117,3 +117,28 @@ var _ = DescribeTable("The container logs should not contain errors",
117117 Entry ("when checking the ama-logs daemonset pods" , "kube-system" , "component" , "ama-logs-agent" ),
118118 Entry ("when checking the ama-logs-windows daemonset pods" , "kube-system" , "component" , "ama-logs-agent-windows" , Label (utils .WindowsLabel )),
119119)
120+
121+ /*
122+ - The containers should not contain any errors for the running processes.
123+ */
124+ var _ = DescribeTable ("The ama-logs container should not contain errors in the running processes" ,
125+ func (namespace , labelName , labelValue , containerName , filePath string ) {
126+ if GenevaIntegrationEnabled == "true" && filePath == "/var/opt/microsoft/docker-cimprov/log/fluent-bit.log" {
127+ Skip ("Skipping fluent-bit log check for ama-logs container when Geneva integration is enabled" )
128+ } else if GenevaIntegrationEnabled != "true" && filePath == "/var/opt/microsoft/docker-cimprov/log/fluent-bit-geneva.log" {
129+ Skip ("Skipping fluent-bit-geneva log check for ama-logs container when Geneva integration is disabled" )
130+ }
131+ err := utils .CheckFileForErrors (K8sClient , Cfg , namespace , labelName , labelValue , containerName , filePath )
132+ Expect (err ).NotTo (HaveOccurred ())
133+ },
134+ // fluentd logs
135+ Entry ("when checking the ama-logs container for fluentd" , "kube-system" , "component" , "ama-logs-agent" , "ama-logs" , "/var/opt/microsoft/docker-cimprov/log/fluentd.log" ),
136+ // fluent-bit logs
137+ Entry ("when checking the ama-logs container for fluentbit" , "kube-system" , "component" , "ama-logs-agent" , "ama-logs" , "/var/opt/microsoft/docker-cimprov/log/fluent-bit.log" ),
138+ Entry ("when checking the ama-logs container for fluentbit" , "kube-system" , "component" , "ama-logs-agent" , "ama-logs" , "/var/opt/microsoft/docker-cimprov/log/fluent-bit-geneva.log" ),
139+ Entry ("when checking the ama-logs container for fluent_forward_failed" , "kube-system" , "component" , "ama-logs-agent" , "ama-logs" , "/var/opt/microsoft/docker-cimprov/log/fluent_forward_failed.log" ),
140+ // telegraf logs
141+ Entry ("when checking the ama-logs container for telegraf" , "kube-system" , "component" , "ama-logs-agent" , "ama-logs" , "/var/opt/microsoft/docker-cimprov/log/telegraf_error.log" ),
142+ // mdsd logs
143+ Entry ("when checking the ama-logs container for mdsd" , "kube-system" , "component" , "ama-logs-agent" , "ama-logs" , "/var/opt/microsoft/linuxmonagent/log/mdsd.err" ),
144+ )
0 commit comments