![]() Here are my cacti graphs (new and modified). I usually edit with "crontab -e", then copy everything to /etc/config/crontab and then update cron with "/etc/init.d/crond.sh restart". Also, I use logrotate for apache logs: # cat /opt/etc/nf compress "/usr/local/apache/logs/access_log" /usr/local/apache/logs/error_log I run cacti and awstat only when I am not going to sleep, because they make a little noise, although cacti mainly uses ramdisk: */5 7-21 * * * /mnt/ext/opt/apache/bin/php /share/Web/cacti/poller.php >/dev/null 2>&1 57 1-21 * * * /usr/local/awstats/tools/awstats_ now Do not forget to copy all your crontab to /etc/config/crontab. I also disabled mysql binary logs for cacti in /etc/my.cnf, which prevents mysql from constantly writing to binary log: log-bin=mysql-bin binlog-ignore-db=cacti Awstats setup guide can be seen here: Do not forget to move log files from /mnt/ext to your big disk. 11M total To avoid problems you also have to copy several files to /var/cacti/site: cp /share/Web/cacti/cmd.php /var/cacti/site/ cp /share/Web/cacti/script_server.php /var/cacti/site/ They are backed up from ramdisk to disk every hour and loaded in autorun.sh (see above): 47 1-21 * * * /share/Main/Private/Critic/Backup/QNAP/ramdisk-save.sh # cat /share/Main/Private/Critic/Backup/QNAP/ramdisk-save.sh cd /share/MD0_DATA/Private/Critic/Backup/QNAP/ /bin/tar -czf ramdisk-cacti.tgz /var/cacti Storing something on ramdisk is not generally recommended, but I wanted to avoid excessive noise and disk wear. ln -s /var/cacti/mysql ln -s /var/cacti/site/include /share/Web/cacti/ ln -s /var/cacti/site/cli /share/Web/cacti/ ln -s /var/cacti/site/lib /share/Web/cacti/ ln -s /var/cacti/site/resource /share/Web/cacti/ ln -s /var/cacti/site/rra /share/Web/cacti/ # du -ch 1.1M. To save changes on reboot I use my script /etc/config/autorun.sh, which is run from flash disk /tmp/config/autorun.sh (see ): ln -sf /etc/config/profile /etc ln -sf /share/Public/Critic/System/awstats/db /var/lib/awstats ln -sf /etc/config/awstats /etc ln -sf /share/Public/Critic/System/awstats /usr/local ln -s /opt/bin/perl /usr/bin/ /share/MD0_DATA/Private/Critic/Backup/QNAP/ramdisk-load.sh To prevent Cacti disk access every 5 minutes I moved all RRA, Cacti mysql database and some scripts to ramdisk (using ln -s). ![]() ![]() ![]() Latest QNAP firmware (I use 3.4.4) has new features for monitoring: better CPU/memory monitoring with TOP processes, good logs of System events and Connections (does not include SMB and HTTP connections on Web server, only Administration and Web File Manager) I recommend that you turn on System Connection Logs, so that if somebody tries to hack you, you can go there and see, what happened: To further extend monitoring and debugging capabilities I use the following: - Cacti for monitoring resources (howto here viewtopic.php?p=106885) - Awstat for monitoring web server access (howto here ) - Ntop for detailed information about traffic (usually disabled, I enable it when needed) - Additional console applications (iotop and lsof to know what processes are using disks, sysstat for detailed information about resources, tcpdump for sniffing traffic when needed, iptraf for online traffic statistics) Most of these are installed with Optware IPKG ( ), some are directly downloaded with wget.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |