Open jalenplayvs opened 2 years ago
how do you run agent? standalone app/service or in container/pod?
It's running in a Ubuntu 20.04 VM in AWS EC2 (no containerization involved), installed using the instructions for .deb Linux hosts from the logdna apt repo.
here is the logdna.env
file:
# cat /etc/logdna.env
LOGDNA_INGESTION_KEY=xxxxxxxxxxxxxxxxxx
LOGDNA_LOG_DIRS=/mnt/my_log_dir
LOGDNA_INCLUSION_RULES=/mnt/my_log_dir/*
LOGDNA_EXCLUSION_RULES=/var/log/*
Test:
# mkdir -p /mnt/my_log_dir
# systemctl restart logdna-agent
# touch /mnt/my_log_dir/my.log
# echo "test" >> /mnt/my_log_dir/my.log
# echo "test" >> /mnt/my_log_dir/my.log
My team mate @seano-playvs is going to take this ticket from here. As I understand it, that solution did allow collecting a log file outside of /var/log, but did not successfully exclude the files in /var/log. Sean can tell you more.
The ask:
/var/log/*, /var/log/*/*, /var/log/*/*/*
will still include some log files from those directories for reasons I do not understandI have a special one-off host that I only want to ingest one log from, and the only way I could achieve it was to create permissions so that the job I was running could log to a file in /var/log. logdna-agent refuses to pick up a file in /home, or even a symlink from /var/log/... to a file in /home