JuyeoungJun / cron-monitoring

for cron-monitoring
0 stars 0 forks source link

모니터링 타켓 Cron log 파일 유형 및 사용 예시 #8

Closed JuyeoungJun closed 3 years ago

JuyeoungJun commented 3 years ago

In GitLab by @gm2202983 on May 20, 2021, 13:24

타겟 cron의 관련 로그가 남는 유형

유형 1. syslog와 관련 없이 개발자가 특정경로에 따로 남긴 로그파일

유형 2. CronDemon 이 남긴 syslog

유형 3. 개발자가 남긴 syslog -- 상세 내용 링크

예시

1. 쉘 프로그램 - (경로: /bin/bash /etc/testForCrontab.sh)

nowdate=$(date +"%Y-%m-%d %H:%M:%S")
echo "It is ${nowdate}, crontab test success." >> /tmp/check_test

유형 1: /tmp/check_test

2. 크론 탭 설정 (경로:/etc/crontab)

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name  command to be executed
  *  *  *  *  * root /tmp/testForCrontab.sh

3. 크론 데몬 syslog 경로

유형 2:/var/log/cron--> (/etc/rsyslog.conf 의 cron.* 설정에 따라 다름)

JuyeoungJun commented 3 years ago

In GitLab by @gm2202983 on May 20, 2021, 13:27

changed the description

JuyeoungJun commented 3 years ago

In GitLab by @gm2202983 on May 20, 2021, 13:29

changed the description

JuyeoungJun commented 3 years ago

In GitLab by @gm2202983 on May 20, 2021, 15:26

changed the description

JuyeoungJun commented 3 years ago

In GitLab by @gm2202983 on May 20, 2021, 15:48

changed the description

JuyeoungJun commented 3 years ago

In GitLab by @gm2202983 on May 21, 2021, 10:16

changed title from 모니터링 타켓 Cron log 파일 유형 및 예시 to 모니터링 타켓 Cron log 파일 유형 및 {+사용 +}예시

JuyeoungJun commented 3 years ago

In GitLab by @gm2202983 on May 21, 2021, 10:16

changed the description