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