Re: MRTG Permission Denied
Posted: Tue Jan 05, 2021 10:55 am
Result of # ls -la /var/lib/mrtg
total 4
drwxrwxr-x 2 apache nagios 20 Dec 23 13:25 .
drwxr-xr-x. 42 root root 4096 Dec 4 08:05 ..
-rwxrwxr-x 1 apache nagios 0 Jan 5 10:45 mrtg.ok
I do not believe there are two mrtg cron jobs running. The errors I'm collecting are being logged to a file that I've listed in the cron job.
Result of # ls -l /etc/cron.d/
total 16
-rw-r--r-- 1 root root 128 Jun 9 2019 0hourly
-rw-r--r-- 1 root root 985 Dec 22 17:31 KoneaCheckerCrontab
-rw-r--r-- 1 root root 612 Jan 5 10:49 mrtg
-rw-r--r-- 1 root root 1806 Dec 17 10:49 nagiosxi
I've updated the cron job to put mrtg.ok into /tmp/. Since there are no timestamps in the log, I'll note that my log file last updated 1/5 at 1:00.
]# ls -la /usr/local/nagiosxi/var/mrtg.log
-rw-r--r-- 1 nagios nagios 303034 Jan 5 01:00 /usr/local/nagiosxi/var/mrtg.log
total 4
drwxrwxr-x 2 apache nagios 20 Dec 23 13:25 .
drwxr-xr-x. 42 root root 4096 Dec 4 08:05 ..
-rwxrwxr-x 1 apache nagios 0 Jan 5 10:45 mrtg.ok
I do not believe there are two mrtg cron jobs running. The errors I'm collecting are being logged to a file that I've listed in the cron job.
Result of # ls -l /etc/cron.d/
total 16
-rw-r--r-- 1 root root 128 Jun 9 2019 0hourly
-rw-r--r-- 1 root root 985 Dec 22 17:31 KoneaCheckerCrontab
-rw-r--r-- 1 root root 612 Jan 5 10:49 mrtg
-rw-r--r-- 1 root root 1806 Dec 17 10:49 nagiosxi
I've updated the cron job to put mrtg.ok into /tmp/. Since there are no timestamps in the log, I'll note that my log file last updated 1/5 at 1:00.
]# ls -la /usr/local/nagiosxi/var/mrtg.log
-rw-r--r-- 1 nagios nagios 303034 Jan 5 01:00 /usr/local/nagiosxi/var/mrtg.log