Archive for May, 2006

Splunk

This week, I installed a must have software for any network administrator. The software is called Splunk. It is a central repository for all of your network devices’s syslogs. Then through the web interface you can search and query to find issues and Splunk has indexed all of your logs.. This is great for all switches, routers, access points, firewalls and even our printers with JetDirect cards report back. Then the bonus for this software is that you can install the Snare on the Windows servers and every thing that goes to the event log will now also be sent to the Splunk server.

Comments (2)

Been Gone

This site is actually hosted off of my home cable connection. I did not worry too much about the IP changing because it has been the same IP for the past 3 years or so. That was until this week. The cable company must be doing some maintenance and I am now on a new subnet and hence a new IP. Had to update my pointer records and this site should be coming back online as the root DNS server get updated. Hopefully the IP does not change often. Then again I am looking to increase my bandwidth on the cable so might just pay for a static at the same time. The 8Mb down and 768k up is looking really tempting to me!

Comments

Asterisk Config Changes

Working through the changes from Asterisk 1.0 branch to the Asterisk 1.2 branch that I am moving our production Asterisk PBXs to. Yeah I know I am really late getting around to it but I had other things that were more important than this to do first.

Anyway some of the configuration language has changed and so here is what I have come across that I needed to change to get our current configs updated to the 1.2 config. I have a pretty basic config compared to most people so not a whole lot I had to deal with. The only major thing is that I wrote most of my dial macros with commands that are now deprecated so I had to re-write them using the new syntax. This is not even the realtime architecture either. Not too bad though because I was able to skinny them down and make them pretty and easier to read.

modules.conf – I have modified this file to make sure Asterisk only loads what we are using. Why load if you are never going to use it. Ended up using the new modules.conf file and adding in the noload for the modules I wanted to see go away.
cdr_mysql.conf – To tell the truth, I don’t know if this was needed in the 1.0 and I just never added it but in 1.2 I was getting an error message about the table not being defined and that it was defaulting to cdr. Easy fix as you simply add table=nameoftable.
musiconhold.conf – changes here so that you can use native to play music on hold. I am hoping this gets rid of the mpg-123 memory leaks that we keep seeing.
extensions.conf – There were a few things I had to change in here to make it work.
SetVar is now Set and the structure is a bit different. I had no idea how many SetVars I had in my config until I had to change them.
Monitor is now MixMonitor. You are suppose to be able to add a |b and it will only record when the call is bridged, but what I have seen so far is that it records the call from the start even if the other side never answers. All of a sudden I get a bunch of calls that are nothing more than ringing.
Working with the AstDB is different now no longer using DBPut and DBGet. To put info in the DB you now enter Set(DB(family/key) = ${foo}). To pull a value out of the DB you use Set(foo=${DB(family/key)}).
You can now do a show functions from the CLI to get all the loaded function that you can use. Just like the show applications shows what application are loaded for use.

Below is my re-written macro to record a call:

[macro-record]
exten => s,1,GotoIf(${DB_EXISTS(CFI/${ARG1})}?s|2:s|3)
exten => s,2,Dial(Local/${DB_RESULT}@internal/n)
exten => s,3,Set(CALLFILENAME=${CALLERIDNUM}-${ARG2:4}-${TIMESTAMP})
exten => s,4,MixMonitor(${CALLFILENAME}.wav)
exten => s,5,Dial(${ARG2},20,t)
exten => s,6,GotoIf(${DB_EXISTS(CFB/${ARG1})}?s|7:s|8)
exten => s,7,Dial(Local/${DB_RESULT}@internal/n)
exten => s,8,Voicemail(${ARG1}|u)

I am sure I will run across more cool thing as I begin to use it more but that is all after 2 days of use.

Comments

Steps to Setup Asterisk 1.2 on CentOS 4.3

I am going through the test process of what I need to do take our production PBX servers from Asterisk 1.0 branch and CentOS 4.2 to the latest Asterisk 1.2 branch and CentOS 4.3. Some things have changed from the last time I set it up and so I have been documenting the process and have posted the steps to install it yourself. This is just to get the server setup you will still have to do your own configs and any other extras like the MySQL CDR reports, but it gets you started.

I still have to get my production configs swapped over to this server and see what breaks in the new version so I can get my configs all fixed up before I do the update on the server.

Comments

Infrant ReadyNAS 1000S

A while back I posted that we had purchased a couple of Infrant ReadyNAS 1000S devices that we were going to use as near line back up to disk. Angelo posted on the story to remind me that I needed to do the write up.

We have used these devices for about 2 months now and here is what we have found.

The main purpose for the purchase was to add backup to drive space on our disaster recovery system. In the main office we had tapes as well as a drive array. The drive array is great for quick daily backups but we were running out of room on the array and could not keep a full week’s worth of backups on it and there was no solution in the remote office other than the tape drive there. The tape backups were taking a longer time and slowing down access to servers and in a 24 hour production system this did not work. We got the devices and immediately tore off the top of the system to see what was inside. There was a small motherboard with the compact flash attached and SATA cables to the backplane of the drive mounts. Mounted the unit in the rack and fired it up. Using the RAIDar software we were able locate the device on the LAN and start the configuration of the unit.

The configuration is done via a web browser. We were able to plug in a static IP in the server range and then join it to the Windows Active Directory domain. This allows us to use domain users and domain groups to allow/disallow user access. The device also has the ability to email on alerts so that you know what is going on with the device. It also has full SNMP capabilities and can download the MIBs needed to gather information from the device and in our case graph it’s particulars. This is also where you create all the shares you are going to host from this device and select what protocols will work on that share. You have options like Windows (SMB/CIFS), NFS, HTTP, and Rsync. Setting the permissions on a share is a little odd at first and by default is full access to everyone. By setting the default access to disabled you can then designate the users/groups you want to have access with a comma separated list. The web interface is very spartan and slow to process requests. I think a lot could be done to speed up the interface that would save a ton of time configuring the device.

With our back to disk share created and secured, the NAS device was added to the Veritas disk pool for the backup job and we ran a test backup. The backup to the NAS runs around 585MB/minute throughput and can do full daily backups of our 106GB of data in just less than 2.5 hours. This is compared to the 8 to 9 hour jobs on the tapes. Now we still backup to tapes but only on the weekend when no shifts are working. With compression we are able to save and the drive array that was already in place we are able to keep 4 weeks of backup on disk and then use the tapes for the weekend archives that get saved for months and now with more tapes years. This aspect of the device is fantastic!

We have also set up the device to be the backup of all our Asterisk configs and voicemail directories. Once again a share is created and only needs rsync. From the Asterisk box there is an hourly cron job that copies all the configs and voicemails to the NAS. This allows for quick recovery of the PBX systems if needed.

We also have all the software that is installed on the corporate workstations on these devices. That is about 68GB of data that needs to be in both locations so that the installs via GPO can use the DFS structure and use the closest operational NAS device. This is where the trouble happened. I had two linux servers in the two offices already fulfilling this need and so I had done a rsync from the linux box to the NAS device and that worked perfectly. Then on the NAS devices I had created rsync jobs to copy data between the two NAS devices. Even though the linux box had seen this as the same data and had been in sync with each other, the NAS devices kept trying to re-copy the information. Also I don’t believe that the NAS’ version of rsync has compression enabled because it takes a whole lot longer to copy this stuff over the WAN than it ever did with the linux boxes. It is much faster to copy via the SMB protocol by coping through a Windows box with a copy and paste than it is rsync between them. Also it is very frequent that the NAS devices would just freeze copying a file and it would either just fail out or you have to stop the job and then restart it to continue the copy. I ended up deleting all the data off the remote NAS and forcing a complete copy from the main to the remote. With all the failures this copy took just over 3 weeks to complete. I hope now that they are in sync that I won’t have as many issues. I can’t say for sure if it is the WAN that caused the issue or if it is the NAS devices coping to each other that it is the problem. I have tested sync from Linux servers to the NAS over the WAN and that seems fine. Unfortunately I never had the NAS devices on the same network copying between the two to see if the sync was slow and unreliable or if the WAN is killing it.

Over all I would give the device a good rating and if it was not for the crappy copy across the WAN between the two it would be highly recommended. . But if you are not planning on copying data between multiple units I don’t see why you should get one of these little units to try out. They are cheap enough that even if you hate it and don’t use it, you have not wasted a ton of money on them. I would not use the device in a situation where you would have many people accessing the device all at the same time as an enterprise NAS device, but as a low end storage device it is fantastic Personally, I am going to purchase the ReadyNAS NV version for home which has the very cool XRAID that allows you to add larger hard drives and the device automatically increases the usable space available to you all the while keeping your data safe and redundant. It is perfectly suited for home to backup all of your digital photos, video, music and other important data. The device also has all the services needed to be the center of most home networks and can even work as your print server.

Images
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

Comments (1)