WinPopUps

In the previous entry I explained how I set-up the basic router notifications with emails. I also had created an extra trigger for the critical routers that I said I would use to send WinPopUp messages.
This is a how-to with respect of how I did it. The original how-to is here (I also have a question posted so if you can help I’d appreciate it).

First you need to install the sambaclient package. Remember that you don’t need the whole Samba.

After you install that, open a terminal as zabbix and go to your homedir, if you aren’t there already.

$mkdir bin
$cd bin

Don’t close this terminal, you’ll need it in a while.

Create a new file winpopup.sh in this new bin/ directory and put the following in it.

#!/bin/bash
# Script to send WinPopUp message to Zabbix admins
echo -e "$2\n\n"$3 > /etc/zabbix/msg.txt
# Send the message
cat /etc/zabbix/msg.txt|/usr/bin/smbclient -M \[NETBIOS NAME] -U Zabbix

Replace the [NETBIOS NAME] with the name of the windows PC you want to send the message.
Now go back to the terminal you left open

chmod +x winpopup.sh

As a test, you can run the script using your own computer name (or a nearby computer if you don’t run windows) and see if it works
./winpopup.sh

You should receive a simple message.

Now go to the default control pannel
Configuration->General->(Choose) Media Types->Create Media Type
Use an appropriate name for the Media, like “WinPopUp” and put the script’s filename without the path winpopup.sh

Although the original guide mentions that we need to edit the server config file, this is an advice for an older version of zabbix. In newer versions, the default path is set for /home/zabbix/bin which, “incidentally” is where we’ve put it already ;)
WinPop Up Setup

Don’t forget to put the new media in the user
Configuration->Users->(Choose) Users
Click on the Media of the user you want to receive popups and choose your new script and the severity you want to use (for example I only use scripts for Disaster triggers, as the one I made for the Critical Routers). It doesn’t matter what you put in the Send-to inputbox. Although I wanted to use it to put the Netbios name of the PC I want to send the message, I haven’t found out how yet, hence my question

So now, each time the action that activates on the Critical Router lost connectivity trigger is run, this user will receive both an email and a WinPopUp message.
(Screenshot removed due to legal reasons)

Time to create a simple Zabbix map

If you liked what you just read, take a chair, grab an  RSS feed and leave a comment. Thanks!


Comments: Comments

Jump to comment form | comments rss [?] | trackback uri [?]

My comments elsewhere

  • Get A Move On Google! (AtheismBeliefGeneral)
    Created Sep 3 last 3 comments, out of 3 Db0 says: Sep 3 at 07:25 AM Sandeep, as it's Open Source I'm certain their license will allow it ;)Adrian, try using a VM Db0 says: Sep 3 at 16:30 PM I was abo. […]
  • Vjack (www.haloscan.com)
    Created Sep 1 last 1 comments, out of 2 Db0 says: Sep 1 at 13:57 PM best of luck mate! add comment
  • αλλαγές στο elkosmas.gr (elkosmas)
    Created Sep 1 last 2 comments, out of 2 Db0 says: Sep 1 at 14:15 PM Ευχαριστώ για το trackback Κοσμά και ελπίζω να σου φαίνεται καλύτερο το hosting. […]
  • Reddit & Readership (AtheismBeliefGeneral)
    Created Aug 25 last 2 comments, out of 8 Db0 says: Aug 28 at 14:02 PM @ThungurKnifur If Adrian is such a spammer, it wouldn't be difficult to figure out who he is in SU from seeing who submitted most. […]
  • Starfish (Waldheri.com)
    Created Aug 31 last 1 comments, out of 1 Db0 says: Aug 31 at 13:51 PM Sounds quite interesting. I may check it out. add comment

Zoulapia

  • 28.08 Quote of the Day: Science contribution

    Quoth Matthew Cob and Jerry Coyne

    You suggest that science may bring about “advances in theological thinking”. In reality, the only contribution that science can make to the ideas of religion is atheism.

    (h/t Pharyngula)

  • 21.08 Quote of the Day: Walking

    Quoth Pat Condell

    Because you see I’m not in the market for a car, any car. I decided to walk. That’s going to take me where I’m going because I’m going where it takes me. And I’ll be happy to get there. In fact, I already am.

    As always it was another excellent vid from Pat, but this particular quote was just brilliant.

  • 15.08 Quote of the Day: Vulnerabilities

    Quoth Anonymous

    The Bible exploits unpatched vulnerabilities in the human mind.

    :D