Skip to content

Commit bd27b99

Browse files
committed
Cron job script to ship logs
1 parent 46474d1 commit bd27b99

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

cronjob.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
#
3+
# nicsdru-logging/scripts/example.cronjob.sh
4+
#
5+
# Calls shiplog.sh to ship latest log entries from various logs
6+
# to logz.io.
7+
8+
# /bin/bash /app/nicsdru-logging/scripts/shiplog.sh "[LOG_NAME]" "[LOG_PATH]" "[LOG_DATE_PATTERN]" "[LOG_TYPE]"
9+
10+
# Ship /var/log/access.log generated by nginx.
11+
/bin/bash /app/nicsdru-logging/scripts/shiplog.sh "access" "/var/log/access.log" "$(date +%d/%b/%Y:)" "nginx_access"
12+
13+
# Uncomment following line to ship drupal.log generated by D9 filelog module.
14+
/bin/bash /app/nicsdru-logging/scripts/shiplog.sh "drupal" "/app/log/drupal.log" "$(date +'%a, %d/%m/%Y -')" "drupal"

0 commit comments

Comments
 (0)