Introduction
At Jamendo we use Skype a lot. Therefore i thought, that it would be nice to get Skype instant messages from the Zabbix Server. My requirements were:
- must run on Ubuntu Server
- no X.org, KDE or Gnome – it must be a light solution!
- just install packages with apt (except for skype) – don’t want to update some software by hand.
- init.d script, that starts the “skype notification service”
Installing the skype notification software
Installing the basic components:
# installing the user, that runs the service useradd skype # installing the x server apt-get install xvfb apt-get install fluxbox x11vnc # installing skype requirements apt-get install dbus apt-get install libasound2 libqt4-dbus libqt4-network libqtcore4 libqtgui4 libxss1 libpython2.6 libqt4-xml libaudio2 libmng1 fontconfig liblcms1 apt-get install lib32stdc++6 lib32asound2 ia32-libs libc6-i386 lib32gcc1 # wget http://www.skype.com/go/getskype-linux-beta-ubuntu-32 -O skype-linux-beta.deb wget http://www.skype.com/go/getskype-linux-beta-ubuntu-64 -O skype-linux-beta.deb # if there are other unresolved dependencies install missing packages using apt-get install and then install the skype deb package again dpkg -i skype-linux-beta.deb |
# installing Skype4py wget 'http://sourceforge.net/projects/skype4py/files/skype4py/1.0.31.0/Skype4Py-1.0.31.0.tar.gz/download?use_mirror=switch' tar -xzf Skype4Py-1.0.31.0.tar.gz cd Skype4Py-1.0.31.0/ python setup.py install |
Now we have all the things we need.
The next step we perform as skype user!
Just unpack these skypescripts.tar into the skype home directory.
Setting up the skype notification service
Please ensure, that you have vncviewer installed on your (local) ubuntu workstation.
- Log in to your server: ssh -L 5900:127.0.0.1:5900 ‘skype@your.zabbix.server’
- start xfvb, fluxbox and skype: ./start-server.sh start
- start the vnc server: ./start-vnc.sh start
- on your local ubuntu workstation you start vnc-viewer: vncviewer 127.0.0.1
- You should now be seeing the fluxbox desktop and skype
- Enter the username and password and ensure, that the credentials get saved.
- Go to settings and set the following options
- no chat history
- just people on my list can write me
- just people on my list can call me
- Send your first skype message on the server as skype user: ./sendim.sh ‘USERNAME’ ‘HELLO WORLD’
- Skype asks now, if skype4py should be allowed. Click on remember and allow!
- stop the vnc-server: ./start-vnc.sh stop
Now the skype service is up and running.
Configuring the zabbix server
That’s the easy part.
- Just check in your zabbix_server.conf to where the AlertScriptsPath points to.
- Then add a symbolic link of sendim.sh in this directory. ( Zabbix calls the script like this: scriptname username subject message )
- Go to the zabbix frontend and create the new Skype media type:
- Description: Skype
- Type: Script
- Script name: sendim.sh
- Finally, set up your skype address in your profile and check if you have an action, that sends messages to your all medias or skype media.
And that’s it, you should now receive messages from Zabbix. Just test by crashing your infrastructure…

you rock. i don’t know what zabbix is, but I found this on google when i was just about to give up and followed your directions to make it work on ubuntu. worked like a charm – thanks!
skype: please make this simpler
thank you.
zabbix is a monitoring solution (similiar to nagios).
it notifies you about errors and broken services…
for more information visit: http://www.zabbix.com/
Hi,
Thanks a lot as I have been trying to make this.
VNC has a bit problem here when i tried to make it work in Debian 6 XenServer 5.5 DomU, do you have experience with it?
Is it possible to skype without gui?
I was thinking to make it work with http://eion.robbmob.com before you post this. Could it be a better (lighter) way?
BR,
Clement
Actually, there should be no problem. My installation is also running on Xen. Did you run “./vnc-start.sh” start on the server and “vncviewer” on the local workstation? Did you setup the ssh port forwarding?
about: http://eion.robbmob.com/
nice. it seems to be similiar to Skype4Py.
Yes, I did exactly what you post, but it came out an empty desktop.
Can you take a look?
I really can’t do anything more.
My skype id is clement.hk
THANKS!!
About http://eion.robbmob.com/ , I thought if we use this one then we don’t need to use any GUI isn’t that true?
Clement
just right click on the desktop open a shell and start type with the following command “skype &”
Hi,
THANKS A LOT,
it worked after I reinstall the whole system.
1 thing that you didn’t mention,
skype4py 1.0.32.0 is not working well, need to use old version skype4py 1.0.31.0.
wondered why you use 1.0.31
a few more things,
apt-get install dbus-x11 python-dbus ia32-lib*
Hello,
Do you know if there is possible to get a call from skype or any other voip software to a regular phone from zabbix?
I`d like to ensure that when some alerts became i get a call in my cell phone for example.
Thx!
Check out the Skype4py Documentation. You can fully remote controll your skype with it. I’m quite sure, that you can also trigger a “call my phone” action.
In case you want to send SMS it works like this:
This will rang for 5 mins if no pick up or refuse.
Good work!
But maybe anybody know solution without X server’s? Can I send message from console? (still googling this question)
Yes, you can send messages from console by using:
./sendim.sh ‘USERNAME’ ‘HELLO WORLD’
As long as skype4py needs skype, you need an xserver so that skype starts up…
I already setup skype on centos and run script:
./sendim.sh ‘USERNAME’ ‘HELLO WORLD’
and then remember API. (and add profile with skype ID in my account).
But can not receive message from skype.
Hi,
We have created a more advanced, easier to use Skype bot which has HTTP interfaces for sending chat notifications.
https://github.com/opensourcehacker/sevabot
The bot installation is partially based instructions described in this blog post. Zabbix monitoring alerts are naturally supported – Skype does not need to be running on the same server as Zabbix. In fact Skype can be run on your desktop.
Also the bot supports things like issue tracker notifications, custom shell scripts and stuff.