Technology Insights

How To Rotate The Cacti Logs File: cacti.log

Cacti is an open source tool that polls network devices and provides a web based interface to view historical data about these devices. It is a really great tool to monitor disk usage, network traffic, and pretty much anything else you can think of. When installing cacti it is easy to forget about the log that cacti generates and over time the log can grow in size especially if your configuration includes a logging level of DEBUG. Below I describe how to rotate the cacti log as well as turn down the logging level to LOW on a CentOS 5 server.

First lets set up logrotate to rotate the cacti log.

1. Install logrotate: yum install logrotate
2. Create Cacti config: vi /etc/logrotate.d/cacti
Add the below contents to the new file
[quickcode:cacti]
/var/www/html/cacti/log/cacti.log {
# keep two weeks of versions online
rotate 14
# rotate the log each day
daily
# compress the logs
compress
# create new file with the correct user/group attributes
create 644 cactiuser cactiuser
# add a YYYYMMDD extension instead of a number
dateext
}
[/quickcode]
Make sure the path is the correct location for your cacti.log file.
3. Run logrotate: logrotate -f /etc/logrotate.conf

Technology Insights

Use One Wireless Keyboard And Mouse On Multiple Computers

This can be done using open source software called Synergy. This application allows you to connect the keyboard and mouse to one computer which acts as a server for those devices. The setup is intended to have multiple computers connected to multiple displays but only to have one keyboard and mouse. This is not to be confused with the use of KVM (Keyboard-Video-Mouse) switches which allow someone to have one monitor with multiple PC’s connected to it and via a button or dial you can switch between them. KVM switches have been used to connected only the keyboard and mouse while still having multiple displays. Synergy is more for moving between the devices without having to click a button. The software has not been developed on for a long time however there is support for Windows XP and Unix/Linux. I ended up not going with the Synergy solution because I decided I could just manage the Linux servers at my house from a shell but wanted to write about it in case others had the need to share a wireless keyboard and mouse in this scenario. Read below about installing Synergy.

Technology Insights

Trillian Secure ICQ And AIM Messages With Off-The-Record Messaging

One thing most people do not realize is the fact that sending Instant Messages over the Internet is not secure. Every time you speak with someone you risk the chance of someone listening in on those conversations. Especially now a days with so many wireless networks hackers can easily join networks and grab all of the data off those networks. There is any easy way to encrypt your AOL Instant Messenger and ICQ by using a plugin for Trillian. You can also encrypt either one if not using Trillian which is briefly discussed below. Follow these steps to install Off-The-Record Proxy and configure Trillian to use it to encrypt your messages to other users who also have the software installed. The below steps were performed on a laptop running Windows XP Professional 32-Bit.

Technology Insights

Add CSS Per Page With Joomla – Page Class Suffix Not Working

I think with the template I have installed for Joomla that the Page Class Suffix is broken for some reason so I cannot easily add CSS changes that way. I was amazed at how hard it was for me to locate how to do this. I searched forever on Google and could not find the correct answer as most people discussed using Page Class Suffix which again was not an option for me. Anyhow when it came down to it I took the following steps to do this and was really surprised at how easy it was.

In Extensions >> Template Manager you can assign pages to different templates with Joomla. So the easiest solution for me was to copy my current template over to a new directory as described below.

Technology Errors

ClientExec: Type: User Error (256): billingtype

I recently upgraded a customer management software called ClientExec from a very old version (2.4.9__2.5beta4) to the latest stable version (ClientExec 3.1.4).  It had been a long time since the administration type settings had been updated but it was time to clean things up. One area lets you manage billing types which I was about to attempt. You can either delete or edit current entries or add a new entry. First I attempted to add a new entry and was greeted with the error below.

[quickcode:billingtype]
An error has occurred with the given operation

Type: User Error (256)
Description: QUERY: INSERT INTO billingtype (id, name, description, detail) VALUES(‘2147483648′,’Test’,’Test’,’Test’) – ERROR: Duplicate entry ‘2147483647’ for key 1
Request: POST /client/index.php?fuse=billing&action=AddBillingType
Script: client/newedge/classes/NE_Mysql.php
Line Number: 154
Stack:
client/modules/billing/models/BillingType.php (50) : ne_mysql::query
client/modules/billing/actions/AddBillingType.php (16) : billingtype::update
client/newedge/classes/NE_Controller.php (200) : addbillingtype::dispatch
client/newedge/front.php (74) : ne_controller::processaction
client/index.php (4) : unknown
[/quickcode]