How to install and run WebDL (ABC iView & SBS OnDemand Downloader) on Windows

Since I could not find any instructions on how to get delx-webdl to run on Windows. I have recorded how I got it running here for future reference.

First we need to install all the require software to run WebDL

Install python 2.7
Download & run the “Windows x86 MSI installer” installer file from
[I used ]

Install Livestreamer

Download and install Livestreamer from This can be found under the “Installer” hyperlink.
[ I used ]

Install PyCrypto
Install PyCrypto 2.6 for Python 2.7 from
[I used]

Install python-lxml

Install python-lxml from
[ I used ]

lxml requires libxml2 & libxslt so we need to install that using “pip”

Go to the: Unofficial Windows Binaries for Python Extension Packages and download the below packages

To install them using “pip”. Open a “Elevated” Windows Comand Prompt (right click on the command prompt shortcut and “Run As Administrator”)

In the command prompt run the below install command, make sure to replace the folder path to where you download the .whl files

pip install <where you saved the .whl files>

pip install c:\Downloads\lxml-3.4.4-cp27-none-win32.whl
pip install c:\Downloads\libxml2_python-2.9.2-cp27-none-win32.whl

Install FFmpeg

Last thing to to is install FFmpeg from

Make sure to grab the “FFmpeg 32-bit Static Version”

Once downloaded it needs to be extracted using 7-zip (

From the extracted folder copy the below files to the C:\Windows directory (accept the warning prompt)

Install WebDL

Now that all the require software has been installed! Onely one thing left to do is grab the latest copy of the WebDL source code from

Once downloaded then extract the content of the folder and rename it to “WebDL” then move (the whole folder) to C:\WebDL

Open a command prompt and run WebDl by typing “python c:\WebDL\”


Zabbix send trigger notifications via Jabber (as chat messages) using python-xmpp

This guide is based on the following post on the zabbix forum @

Zabbix has built in Jabber notification however it sends then as message and not as chat. I don't know of a way to make it send as chat. I like it to show as chat as it give a better overview by looking at the chat windows history.

Below scripts require python led and also the python library python-xmpp avialable @

First we must install

on Debian / Ubuntu:

apt-get install python-xmpp

On CentOS

yum install python-xmpp

Under the Zabbix alert scripts folder (mine is /etc/zabbix/alert.d) create the below files and paste the relevant content

Create a file name /etc/zabbix/alert.d/ with below content

import sys,xmpp,time

jidparams['domain']=""  #Zabbix Jabber user account domain eg
jidparams['username']="jabber account name goes here" #Zabbix Jabber user account name
jidparams['password']="jabber account password goes here"  #Zabbix Jabber user account password

#Do not modify below this line

if len(sys.argv) &lt; 2:
    print "Syntax: jabber_send JID msg_text"

msg_text=' '.join(sys.argv[2:])

jid=xmpp.protocol.JID(jidparams['username'] + "@" + jidparams['domain'])

if not con:
    print 'could not connect to Jabber server!'
#print 'connected with server ',con
if not auth:
    print 'could not authenticate!'
#print 'authenticated using',auth

#cl.SendInitPresence(requestRoster=0)   # you may need to uncomment this for old server
#print 'sent message with id',id

time.sleep(1)   # some older servers will not send the message if you disconnect immediately after sending


Create a file name /etc/zabbix/alert.d/ with below content

# If no argument was given on the commandline, stop
if [ $# -lt 2 ];then
    echo "Not enough arguments provided to $0 require 3 arguments reciepient subject and msg"

/etc/zabbix/alert.d/ "$1" "$3"

#exit $?
exit 0

To quickly test that the scripts are working use the below test command.

/etc/zabbix/alert.d/ [email protected] Zabbix "Test msg from Zabbix"

If your Jabber client is working and you are logged in then you should recieve the test msg to confirm it is working.

Now in Zabbix create a new media type (Administration->Media Types)

Name: Jabber (Chat Notification)
Type: Script
Script Name:

Next step is for each user that wants to recieve notification via Jabber. They need to create a new media type Jabber (Chat Notification) with their jabber id in the "Send to" field.

Note that the zabbix jabber user account and the reciepiten account must be on the same domain for this to work (afaik)..

You also need to create some Zabbix actions that send notifications to the new Media Type.

Zabbix MySQl Monitoring Notes

#Create a new zabbix user account to be use by the zabbix agent to monitor mysql
#Run below in command line

mysql -uroot -p<mysqlroot password> -e"GRANT USAGE ON *.* TO 'zabbix'@'' IDENTIFIED BY '123456'";
mysql -uroot -p<mysqlroot password> -e"GRANT USAGE ON *.* TO 'zabbix'@'localhost' IDENTIFIED BY '123456'";
mysql -uroot -p<mysqlroot password> -e"flush privileges"

Test the new zabbix mysql account to make sure it works. If there are no errors then it works.

mysql -uzabbix -p123456 -e"status"

If it works the output will look somehting like the below

mysql  Ver 14.14 Distrib 5.1.72, for debian-linux-gnu (i486) using readline 6.1

Connection id:          9561
Current database:
Current user:           [email protected]
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.1.72-2 (Debian)
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    utf8
Db     characterset:    utf8
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:            /var/run/mysqld/mysqld.sock
Uptime:                 4 days 23 hours 50 min 4 sec

Threads: 1  Questions: 153764  Slow queries: 25  Opens: 1746  Flush tables: 1  Open tables: 64  Queries per second avg: 0.356


Create a new my.cnf file under the zabbix config folder (/etc/zabbix) which allows mysqladmin to use to connect to the mysql database.

nano /etc/zabbix/.my.cnf

Insert the below content into the file


#On the zabbix client host (where the MySQl server you want to monitor reside). Note Zabbix agent must be already installed and working.

nano /etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf

#replace all instant of "/var/lib/zabbix" with "/etc/zabbix"

#Restart zabbix agent

service zabbix-agent restart

On the zabbix server you need to add the Template App MySQL template to the host you want to monitor.

How to setup Zabbix client on Windows

Get the latest installer from

setup the latest zabbix agent using the above .exe installer


Add firewall rule to allow zabbix server to conect to the zabbix client

netsh advfirewall firewall add rule name="Zabbix Agent" dir=in protocol=tcp localport=10050 action=allow


To include custom config files (which help make configuration for large amount of custom items more manageable)

Create a new folder zabbix_agent.conf.d under the zabbix agent folder C:\Program Files (x86)\Zabbix Agent\

mkdir "C:\Program Files (x86)\Zabbix Agent\zabbix_agent.conf.d\"

Then place any custom config (.conf) file in this new folder.

Next edit the zabbix main config file "C:\Program Files (x86)\Zabbix Agent\zabbix_agentd.conf" add a new "Include=" statement for each and every file you want to include. Below is an example:

Include=C:\Program Files (x86)\Zabbix Agent\zabbix_agent.conf.d\userparameter_myapp.conf

Every time the any config file is changed the zabbix agent service must be restarted.


How to Monitor MySQL using the new Zabbix Template App MySQL

On the host where we want to monitor the mysql server we need to create a mysql user account where we can use to access mysql to get the nessary stats.

Create a new user account named "zabbix" to be use by the zabbix agent to monitor mysql. Run below in command line

mysql -uroot -p&lt;mysql root password goes here&gt; -e"GRANT USAGE ON *.* TO 'zabbix'@'' IDENTIFIED BY '123456'";
mysql -uroot -p&lt;mysql root password goes here&gt; -e"GRANT USAGE ON *.* TO 'zabbix'@'localhost' IDENTIFIED BY '123456'";
mysql -uroot -p&lt;mysql root password goes here&gt; -e"flush privileges"
mysql -uzabbix -p123456 -e"status"

Next create a new /etc/zabbix/.my.cnf config file with the mysql login (created above) to be used by zabbix to connect to the mysql server for monitoring purpose.


Your zabbix agent config file should already have the line "Include=/etc/zabbix/zabbix_agentd.d/" which will automatically load all config files under that folder by default (including the userparameter_mysql.conf file). If not then you will need to do the below to load the config file.

In the main zabbix config file include the below line to enable loading of the mysql file.


Restart the zabbix agent to load the new config file.

service zabbix-agent restart


Now on the zabbix server create a new host using the "Template App MySQL" template

Some further info on the .my.cnf MySQL config file @

How to install Zabbix 2.2 on TurnkeyLinux 13.0 LAPP Stack (Debian Wheezy) from official Zabbix repo

The below instructions applies to turnkey-lapp-13.0-wheezy-amd64

Preparing the server

#Update the hostname in the below files


#Set timezone

dpkg-reconfigure tzdata

Change to the home folder of the current (root) user

cd /

#Remove comment (the "# " character) from non-free line from the file /etc/apt/sources.list.d/sources.list

# deb wheezy non-free

#Add official zabbix repo & Key

curl | apt-key add -
echo "deb wheezy main" >> /etc/apt/sources.list.d/sources.list

Update the repo

apt-get update
apt-get upgrade

Install some needed packages

apt-get install libsnmp-mib-compiler-perl snmp-mibs-downloader libsnmp-base libsnmp-dev snmp snmpd

To configure net-snmp command-line to use the MIBS, edit /etc/snmp/snmp.conf and comment out the following line (by addeding a # in front of it):

# mibs :

To update the MIBS to latest versions run the following command:


Reboot the server to apply the changes. Then re-login and follow below instaltion steps

Setting up Zabbix

apt-get install zabbix-server-pgsql zabbix-frontend-php zabbix-agent zabbix-get

At the "Configuring zabbix-server-pgsql" screen choose "Yes" to config the postgresql database settings.

Enter a random password of your choice and make note of it as it will be needed later.

Once zabbix has been installed using the repo then we need to do some configuration.

#Set zabbix server to START (else it will refuse to run) by inserting START=yes into the /etc/default/zabbix-server file or use the echo command below.

echo "START=yes" >> /etc/default/zabbix-server

#Fix up php timezone issue

Edit the file /etc/php5/apache2/php.ini and change below line to match your timezone (remove the ; from the start of the line).

date.timezone = Australia/Melbourne

#Fix  apache2: Could not reliably determine the server's fully qualified domain name

echo "ServerName localhost" >> /etc/apache2/apache2.conf

Restart Apache to apply the above changes

service apache2 restart

#Once instalation is completed access Zabbix web GUI using below url to continue the instalation

http://<zabbix server hostname or ip>/zabbix

Follow the prompt to continue the zabbix server web front-end setup.

At the "Check of pre-requisites" all items should be GREEN.

At the "Configure DB connection" enter the below:

user: zabbix
password: <the password you chosen in the above step for the zabix db user>

The rest of the steps should be left at the default settings.

Once you get to step 6 make sure to make note of where the front-end configuration file is located. This might come in handy later.

Once instaltion of the front end if completed. The default login is: Admin/zabbix make sure to change the password after the initial login (under Profile->Change password).

This should be all that is require for settign up zabbix server. Anything else needs to be doen via the web frontend.


The zabbix web front end config file is located @ /usr/share/zabbix/conf/zabbix.conf.php

zabbix server config file is located @ /etc/zabbix/zabbix_server.conf

zabbix agent config file is located @ /etc/zabbix/zabbix_agentd.conf

the apache virtual host config file is located @ /etc/zabbix/apache.conf

service zabbix-server start
service zabbix-agent start




How to install the latest Zabbix agent on XenServer the easy way

Note: I discovered that the repo has been merged with the offical zabbix repo the below instructions no longer works for XenServer 6.2 (which is based on CentOS 5.7) 🙁

This guide has been tested on xenserver 6.0 and 6.2

Info compiled from combination of below sites

Below are the detailed steps to run in the xenserver console to install the latest zabbix agent (using RPMs)

Import GPG key

rpm --import

Install package

rpm -Uv

Install zabbix agent rpm from the / repo

yum install zabbix-agent

Once the above is completed the zabbix agent config file can be found @ /etc/zabbix/zabbix_agentd.conf

Edit the file and match & set below lines (Server= ip of zabbix server, "ServerActive=" will disable active check)


Next we will create a new config file for the xenserver UserParameter
Create a new file /etc/zabbix/zabbix_agentd.d/userparameter_xenserver.conf and pasted the below into the new file. NOte that any aditional config file placed under the folder /etc/zabbix/zabbix_agentd.d/ also get processed by the zabbix agent as if it was included in the main zabbix gent config file.

#XenServer UserParameter
UserParameter=xe.vmcountup,/opt/xensource/bin/xe vm-list | grep running | wc -l
UserParameter=xe.vmcountdown,/opt/xensource/bin/xe vm-list | grep halted | wc -l
UserParameter=xe.memory_total_kib,/opt/xensource/bin/xe host-data-source-query data-source=memory_total_kib
UserParameter=xe.memory_free_kib,/opt/xensource/bin/xe host-data-source-query data-source=memory_free_kib
UserParameter=xe.xapi_memory_usage_kib,/opt/xensource/bin/xe host-data-source-query data-source=xapi_memory_usage_kib
UserParameter=xe.xapi_free_memory_kib,/opt/xensource/bin/xe host-data-source-query data-source=xapi_free_memory_kib
UserParameter=xe.xapi_live_memory_kib,/opt/xensource/bin/xe host-data-source-query data-source=xapi_live_memory_kib
UserParameter=xe.xapi_allocation_kib,/opt/xensource/bin/xe host-data-source-query data-source=xapi_allocation_kib
UserParameter=xe.cpu3,/opt/xensource/bin/xe host-data-source-query data-source=cpu3
UserParameter=xe.cpu2,/opt/xensource/bin/xe host-data-source-query data-source=cpu2
UserParameter=xe.cpu1,/opt/xensource/bin/xe host-data-source-query data-source=cpu1
UserParameter=xe.cpu0,/opt/xensource/bin/xe host-data-source-query data-source=cpu0
UserParameter=xe.loadavg,/opt/xensource/bin/xe host-data-source-query data-source=loadavg
UserParameter=xe.vbd_xvda_write[*],/opt/xensource/bin/xe vm-data-source-query data-source=vbd_xvda_write uuid=$1
UserParameter=xe.vmi[*],/opt/xensource/bin/xe vm-data-source-query data-source=$1 uuid=$2

Once the above is completed start the zabbix agent using the below command

service zabbix-agent start

#Check if the zabbix agent is running and listening to conections

netstat -ntpl | grep zabbix

Something like beow should be returned, if not the agent is not running

tcp 0 0* LISTEN 25222/zabbix_agentd

#Start the zabbix agent at boot time

chkconfig zabbix-agent on

Open the zabbix port for incoming on the firewall using the below utility


Add "10050:tcp" to the list under "Other ports".

#Test connect to zabbix agent on client host to confirm it's working

#on the zabbix host run

telnet <ip of the xenserver host>  10050

#if the client is running and is accepting conenction then lines similair to below lines will be shown

Connected to
Escape character is '^]'.

#to exit out of the connection simply press the Enter key


Note: Older version of zabix may store the config file @ /usr/local/etc/zabbix_agentd.conf

Install ntop on debian squeeze from backports

Set static IP for all interfaces

enable promiscuous mode on the relevant listening interface so it can see all traffic

below line will tempory put the interface into promiscuous mode
ifconfig eth0 promisc

TO permanently set promiscuous mode edit the /etc/network/interfaces file and add below lines

nano /etc/network/interfaces
[sudo] password for you: enter your password
2) Go to the last line of your interfaces file and add the following:

iface eth1 inet manual
up ifconfig $IFACE up
up ip link set $IFACE promisc on
down ip link set $IFACE promisc off
down ifconfig $IFACE down

Edit the file /etc/apt/sources.list.d/sources.list and add below line
deb squeeze-backports main

A list of backport mirrors can be found here

Then run below commands in order to install ntop

apt-get update
apt-get install ntop

To set / reset ntop admin password
ntop --set-admin-password

Fix GeoIP issue

mkdir /usr/share/GeoIP/
cd /usr/share/GeoIP/
gunzip GeoIPASNum.dat.gz

Run ntop and listen on interface eth0 & eth1
ntop -i "eth0,eth1"

to update ntop settings
dpkg-reconfigure ntop

How to setup a NAS using Debian 7.0 Wheezy with ZFS and SMB and NFS share

Compiled from info at below sources:

#Install Debian Wheezy using the netinst iso then select below software to be installed

Filesharing (this will install samba and NFS)
SSH Server (needed to be able to connect remotely via ssh)

Once Debian instaltion is finished then follow below steps.


apt-get install gcc make linux-headers-$(uname -r)

dpkg -i zfsonlinux_1~wheezy_all.deb

apt-get update

apt-get install debian-zfs

#Once above steps are completed then test to make sure zfs is installed correctly by issueing below commands.

zpool status

should return: no pools available

zfs list

should return: no datasets available

There should be no errors if ZFS has been successfully installed.


Create the ZFS storage pool where the data will be stored.

I will create a mirror zfs pool with 2 disks.

#list all local disk by id

ls -l /dev/disk/by-id

The above comand will list all disk by ID which we will use to create the pool this way it won't be a problkem if the disks are moved from one slot to another.


#Next we need to create the gtp partition table on the disks (sdb is the first data disk & sdb is the second data disk)

apt-get install parted

parted /dev/sdb
mklabel gpt
mkpart zfs 0% 100%
parted /dev/sdc
mklabel gpt
mkpart zfs 0% 100%

#create a new mirrored zpool (align to 4k sectors for new disks)

zpool create <poolname> <raidtype> -o ashift=12 <disk1> <disk2>

zpool create zpool1 mirror -o ashift=12 scsi-SATA_QEMU_HARDDISK_QM00002 scsi-SATA_QEMU_HARDDISK_QM00003

This create a zfs pool and mount mount point below


#Next we need to create a zfs volume / file system to store the data ("-o casesensitivity=mixed" set the share to non case sensitive to work around Microsoft Windows limitation)
zfs create -o casesensitivity=mixed zpool1/volume1

#this created a new volume with mount point


#we can also create sub file system under a file system, for example

zfs create -o casesensitivity=mixed zpool1/volume1/share1

#this created a new volume with mount point



Sharing via SMB(Windows shares)

#share the above file systems as SMB / Windows share

#This require samba to be installed (this should have been installed with the initial debian install) or using command apt-get install samba

#Install an extra sambatools package
apt-get install samba-tools

#Confirm smb is running
ps -ef | grep smb

#You should get something like
root      2167     1  0 14:32 ?        00:00:00 /usr/sbin/smbd -D
root      2199  2167  0 14:32 ?        00:00:00 /usr/sbin/smbd -D
root     14798  2855  0 15:33 pts/0    00:00:00 grep smb

#Microsoft Windows machines share does not expect smb share to be case sensitive so we need to make sure this is set (using -o casesensitivity=mixed ) when we create the share!

Example: zfs create -o casesensitivity=mixed zpool1/volume1


Before sharing the zfs volumes we must create local and samba users who can access those shares

#Add the nologin shell to the shell list
echo "/usr/sbin/nologin" >> /etc/shells

##Create a new user name user1
adduser user1

#Set the user shell to the  to shop login
usermod -s /usr/sbin/nologin user1

#Create a new group group1 who can access the share
groupadd group1

#Add the user user1 to the group1 group (note -a means keep old groups)
usermod -a -G group1 user1

#Set the user password
passwd user1

#Set the owner of the share1 share1 to the new group1 group and set files and folder to group permisions
chgrp group1 /zpool1/volume1/share1
chmod -R 770 /zpool1/volume1/share1

#Add the new samba user who can access the new share
smbpasswd -a user1


Since SMB intergration into ZFS is not fully working we must use the manual samba way.


#Let share the zpool1/volume1/share1 volume as a SMB / Windows share using below commands
zfs set sharesmb=on zpool1/volume1/share1

#Confirm the share works by using below command. This should show the new share on the list of avialable shares.
smbclient -U guest -N -L localhost

#Some manual steps to edit the samaba config file /etc/samba/smb.conf to share the zfs volumes.

#Let share out the zpool1/volume1/share1 volume and allow users in the group share1users to access the share with read write permisions, using steps below

#Edit the samab config file
nano /etc/samba/smb.conf

#Comment out the below line by putting a # in front of it else accessing from Windows 7 ect will be very slow
#valid users = %S

#Also add below lines to the [global] section to help with Windows connection speed issues
preferred master = no


#Add the below lines to the end config of the file

comment = share1
path =
browsable = yes
writable = yes
read list = @group1
write list = @group1
create mode = 0660
directory mode = 0770
force group = share1users


#Note: to allow guest access (need to set per individual share) the guest user must be setup as per below

Remove the password from the guest account and add the user to Samba,

passwd -d guest
smbpasswd -a guest

Press Enter twice to the password prompt to make the password blank.


#Restart the samab service for the above chnages to take affect
service samba restart


Sharing via NFS

#NFS package should already be installed via initial debian install

#setup NFS

#The NFS daemon will not start unless there is an export in the /etc/exports file
echo '/mnt localhost(ro)' >> /etc/exports

#Start the NFS daemon
/etc/init.d/nfs-kernel-server start

#confirm NFS is running and sharing
showmount -e localhost

#This should show something like
Export list for localhost:
/mnt localhost

#We can now start sharing ZFS datasets / volumes

#Let share the zfs volume zpool1/volume1/share1 via NFS and allow Read & Write to the subnet

zfs set sharenfs="[email protected]/24" zpool1/volume1/share1


#Let confirm NFS is sharing the new zfs volume
showmount -e localhost

or from a remote computer

showmount -e <ip of this server>

#This should show something like
Export list for localhost:
/mnt localhost

#We need to make sure NFS share the ZFS volumes on boot, so we need to install the /etc/default/zfs config file

#Let edit the /etc/default/zfs file

nano /etc/default/zfs

#Change the below lines from ==> to

ZFS_MOUNT='no' ==> ZFS_MOUNT='yes'
ZFS_SHARE='no' ==> ZFS_SHARE='yes'


#To by pass some issue with "parallel init system" run below command which force a serialized boot order
touch /etc/init.d/.legacy-bootordering

#You should now be able to mount the NFS export from an NFS client to confirm all if working (make sure the client is in the allow ip range set above or else they can't access the sahre due to permision not allowed).


Below are some misc notes

#To un-sahre an NFS share use command zfs set sharenfs=off <share> example:
zfs set sharenfs=off zpool1/volume1/share1


Linux Kernel Updates

If you update you linux kernal after insatlling zfs the the spl-dkms and zfs-dkms packages needs to be re config using below commands.

dpkg-reconfigure spl-dkms
dpkg-reconfigure zfs-dkms

Displaying ZFS Share Information

#For SMB share, below command will display all SMB shares
zfs get sharesmb

#For NFS share, below command will display all NFS share
zfs get sharenfs

ZFS Maintenance Tasks

#Add below line to the crontab using "crontab -e" to check the zpool for erroy every sunday

0 0 * * 0 /sbin/zpool scrub zpool1

How to check the zfs pool status

Use below command:
zpool status

#Show NFS version

nfsstat –nfs