Posted by The TechMentor in Journal, System Monitoring
on Jan 23rd, 2013
After what seemed like days of messing with permissions, SELinux was the problem. To solve the dreaded Could not stat() command file ‘/usr/local/nagios/var/rw/nagios.cmd’!” error, when trying to reschedule a test or acknowledge an alert, a simple setenforce 0 was the solution. Though, permissions do also have to be correct. chown nagios.nagcmd /usr/local/nagios/var/rw chmod g+rwx /usr/local/nagios/var/rw chmod g+s /usr/local/nagios/var/rw
Posted by The TechMentor in Journal
on Dec 3rd, 2012
Using a script to count login activities in a KF log file. I wanted to effectively go through all the *.log?? files, ignoring zipped files. Finally settled on: my $logpath=”/var/log/kforum”; chdir($logpath) or die “$!”; @files = glob “*.log *.log.[0-9] *.log.[0-9][0-9]”;
Posted by The TechMentor in Journal
on Dec 1st, 2012
In CentOS 6, on backwater, iptables was not starting cleanly. Found a patch for the init script. Create a file named centos.iptables.patch that contains: — 5350.orig.sh 2011-05-27 19:58:32.000000000 +0100 +++ 5350.sh 2011-05-27 19:57:32.000000000 +0100 @@ -120,6 +120,12 @@ for i in $tables; do echo -n “$i ” case “$i” in + security) + $IPTABLES -t security -P INPUT $policy \ + && $IPTABLES -t security -P OUTPUT $policy \ + && $IPTABLES -t security -P FORWARD $policy \ + || let ret+=1 + ;; raw) $IPTABLES -t raw -P PREROUTING $policy \ && $IPTABLES -t...
Posted by The TechMentor in Journal, System Monitoring
on Dec 1st, 2012
The first thing I wanted to do was deal with the web server. I didn’t want apache serving any pages other than nagios. I decided to redirect everything to techmentor.com. To do this I has to allow overrides int the main conf file: <Directory “/var/www/html”> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> Then in /var/www/html I created the following .htaccess file: RewriteEngine on AddType text/cache-manifest manifest RewriteCond %{HTTP_HOST} ^backwater\.techmentor\.com$ RewriteRule ^/?$...
Posted by The TechMentor in Journal
on Nov 17th, 2012
yum install ghostscript yum install libtool yum install libtool-ltdl yum install lcms yum install zip yum install mysql yum install mysql-server yum install php53-gd yum install php53-mysql yum install php53-mbstring chkconfig httpd on chkconfig mysql on service httpd start (or restart) service mysql start