Monitor Size of Single Log Files
How to Monitor, Alert on & Graph the Size of Single log files
[root@nagios-primary ~]# ./logrobot localhost /var/tmp/logXray autodoc /wms/prod/jdf/data/log/error 1GB 1.6GB filesize
OK: File [ /wms/prod/jdf/data/log/error ]. Current Size = [ 682.637MB 7 ]. Thresholds: [ W=1GB ] and [ C=1.6GB ].
[root@nagios-primary ~]# ./logrobot localhost /var/tmp/logXray autodoc /var/lib/nagios/retention.dat 80MB 100MB filesize
CRITICAL: File [ /var/lib/nagios/retention.dat ]. Current Size = [ 179.734MB ]. Thresholds: [ W=80MB ] and [ C=100MB ].
[root@nagios001 ~]# ./logrobot localhost /var/tmp/logXray,graphite,52.88.12.122:2003,typical autonda /var/log/messages 60m 'nothing-to-search-for' '.' 1 2 LogGrowthChk -ndfoundn
Log File Content
Scan content of log files for new occurrences (or lack thereof) of specific keywords, strings or patterns.
Log File Size
Monitor the sizes of single or multiple log files - alert if log size breaches predefined thresholds.
Log File Growth
Monitor the growth of single or multiple log files - alert when the monitored logs stop receiving new data.
Log File Timestamp
Monitor the timestamp of single or multiple logs. Alert, if logs are older than X amount of minutes or hours.