Azure / WALinuxAgent

Microsoft Azure Linux Guest Agent
http://azure.microsoft.com/
Apache License 2.0
541 stars 372 forks source link

[BUG] /var/lib/waagent/events will produce a lot of files #2497

Closed luke-fu closed 2 years ago

luke-fu commented 2 years ago

waagent --version WALinuxAgent-2.2.46 running on centos 7.9.2009 Python: 2.7.5 Goal state agent: 2.2.46

cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) Document content:

{"eventId":"1","parameters":[{"name":"Name","value":"Microsoft.Azure.GuestConfiguration.DSCAgent"},{"name":"Version","value":"1.26.8"},{"name":"IsInternal","value":true},{"name":"Operation","value":"GuestConfigAgent.Scenario"},{"name":"OperationSuccess","value":true},{"name":"Message","value":"<GCLOG>[2022-02-0803:04:11.328] [PID 16717] [TID 16789] [DSCEngine] [WARNING] [00000000-0000-0000-0000-000000000000] [/home/dscbuilder/DesiredStateConfiguration/src/dsc/engine/ConfigurationManager/LocalConfigManagerHelper.c:4615] Job 8a6b08e5-e521-4ea0-8378-0cd64c35eca7 : Displaying messages from built-in DSC resources:\n\t WMI channel 1 \n\t ResourceID: Ensure noexec option set on /dev/shm partition. \n\t Message : [A-ofp-Search-ES02]:                            [Ensure noexec option set on /dev/shm partition.] [ASM_RP_CACHE] Good Timestamp - Reading File</GCLOG>\n"},{"name":"Duration","value":0},{"name":"ExtentionType","value":""}],"providerId":"69B669B9-4AF8-4C50-BDC4-6006FA76E975"}
nagworld9 commented 2 years ago

@luke-fu These files are for processing telemetry events. We keep them temporarily and not persisted. As soon as we process events, these will be deleted. Wrt to having lot of files, this is expected since we create one file for each event.

luke-fu commented 2 years ago

But I found that there is a machine that will always exist, I need to clean it every ten days.

nagworld9 commented 2 years ago

@luke-fu That's weird. Do you see any warning/errors in the agent log? Based on agent version this machine had very old agent, in genral we recommend having latest version.

can you run ls -ltunder events directory and share it here to know the timestamps? do you see same content of Microsoft.Azure.GuestConfiguration.DSCAgent in all these files?