Archive for June, 2007

OSTicket/eTicket mod for generating helpdesk reports and stats

Wednesday, June 20th, 2007

We were running OSTicket, an open source ticket system as a helpdesk for about 2 and a half years. The need arose for an in-depth understanding of our helpdesk strategy.

We wanted to gain meaningful metrics such as the number of tickets submitted/closed per month, tickets per category, ticket response/closing times.

We also wanted to improve on the OSTicket search feature, which is limited to searching by email address of submitters.

As far as I can tell OSTicket as an open source project is no longer actively maintained and has branched to the newer enhanced eTicket . OSTicketStats/EticketStats works fine on both. From now on I will use the name eTicket.

Aim.

Provides reports for your eTicket system.
Provides improved ticket search features.

How to install

Download eTicketStats from SourceForge Patch Tracker

Create a directory on your server for eTicketStats

Unzip and copy all the files into that directory.

Edit the common.php files. Insert your database information and enter the url to your eTicketStats directory.

<?php
$root_url = ‘enter_url_of_eticketStats_directory’;
// db login parameters
$dbhost = “localhost”;
$dbuser = “eticket_database_username”;
$dbpassword = “eticket_database_password”;
$db = “name_of_your_eticket_database”;
?>

Thats it. Now Browse to http://myDomain/eTicketStats/

It generates reports/graphs/stats for the last 3 years. I hope you will find this as useful as we did.
Feel free to contact me if you have suggestions or bug reports, or to request additional features.

Installing Pureftpd on Solaris 10

Friday, June 15th, 2007

We will use pkgget to install the Pureftpd software.

Install pkg-get.

Skip this if you already have it installed.

Reference: http://www.blastwave.org/howto.html

# pkgadd -d http://www.blastwave.org/pkg_get.pkg

Add the pureftpd package.

# pkg-get –i pureftpd

This downloads and complies the Pureftpd package.
The binary is located here:

# /opt/csw/sbin/pure-ftpd

To run try this:

#/opt/csw/sbin/pure-ftpd -j -lpuredb:/opt/csw/etc/pureftpd.pdb &

Or better yet use the supplied start up script located here:

# /etc/init.d/cswpureftp

Configure Pureftpd

Configuration file the start script looks at:

# /opt/csw/etc/pureftpd.conf.CSW

Rename to pureftpd.conf

# cd /opt/csw/etc/

# cp ./pureftpd.conf.CSW ./pureftpd.conf

Edit config file. We wanted anonymous ftp access turned off and vistual users activated.

So uncomment

PureDB /etc/pureftpd.pdb

And

NoAnonymous yes

Next we’ll complete the steps needed to enable Virtual Users.

We need to create the pureftpd.pdb file from /opt/csw/etc/pureftpd.passwd.

First create a password file

# /opt/csw/etc
# touch pureftpd.passwd

Make the pureftpd.pdb file

# pure-pw mkdb

Or

# /opt/csw/bin/pure-pw mkdb

The start up script expects the files to appear in /etc/
Copy files there:

cp /opt/csw/etc/Pureftpd.passwd  /etc/

and

cp /opt/csw/etc/pureftpd.pdb /etc/

Start Pureftpd

Start the Pureftpd program

# /etc/init.d/cswpureftp

For further documentation on using and configuring, take  a look at www.pureftpd.org

Create batches of Movable Type blogs using PHP script

Thursday, June 7th, 2007

UPDATE: This post is out of date. You can now use the web based MovableType AddOn to create batches, bunches or a multiple of user and blogs in one go with this addon.

This is a command line based script I wrote to create batches of Movable Type blogs. It works on Movable Type 3.34. Please note that before trying this you’ll need to backup you Movable Type database.

Download PHP files

You will need to create the directory on the web server for each blog you intend to create.

To run the script, run the following script on the command line:

php autoblog.php user_details1.txt

The script will insert blogs with the details given in user_details.txt file with templates given in insert_TSSGBlog_template.sql

When the new user logs into Mpvable Type for the first time he will need to click ‘Rebuild’ to load in our templates.

There are 4 files needed, they are:

user_details.txt

Information describing the blogs you wish to create.

common.php

The mysql database details needed to connect with the MYSQL database used by Movable Type.

autoblog.php

Processes the user_detalis.txt file and inserts the details for each blog into the Movable Type database.

insert_TSSGBlog_template.sql

This is the SQL statement this is used in autoblog.php to create the templates for the bog. To insert you own templates here you need to find the correct SQL statement required. One way to do this is to determine the changes made when to the Movable Type database when a blog is created. I found PHPMyAdmin useful to determine this.

To do:

  • Create a web-front to allow the creation of batches of blogs via a browser.
  • Currently the directory for each blog needs to be created before running the script. Considering sing the PHP exec command to create the directory as part of the script.
  • Kick of the ‘Rebuild’ Movable Type feature after a blog is inserted so the user does not need to do this.

If you would like to contribute/add/edit this script, feel free.

Need help? Contact me