WinPopUps Continued

I knew there was a way to do it.
I just updated my WinPopUp script to the following, following the recipe here

# Send a zabbix message via winpopup to a given host
# Use as an alertscript within zabbix
# Syntax: winpopup $receiptant $subject $message
# Note: zabbix passes $1=receiptiant, $2=subject, $3=message to any script
echo -e "Subject:$2n$3" | smbclient -M $1

Excellent. Now I don’t need a script for each PC that I want to message. I can just pass the argument from the Media link of each user.

Strange thing is that I had tried to put $1 on my old script’s destination but it didn’t work for some reason.

Where’s my SMS I hear you shout?

Comments are closed | comments rss [?] | trackback uri [?]
  • wagzy

    Thanks for the very post.
    However I tried sending a popup to localhost(localhost,,my IP) but they dont work. i get error message:
    Message start: ERRSRV – ERRmsgoff (Not receiving messages.)
    does samba need some configurations?
    How can I popup a message on the same zabbix server and also to another linux Computer?
    Thank you.

    • wagzy

      I tried to edit the popup script to look like this:

      echo -e "$2n$1 "$3 > /etc/zabbix/msg.txt
      xmessage -buttons OK,CANCEL -file /etc/zabbix/msg.txt

      when I check the contents of /etc/zabbix/msg.txt, zabbix has posted the message there alright, but without the $1-(send to field).
      More importantly, I dont get my

      xmessage -buttons OK,CANCEL -file /etc/zabbix/msg.txt

      to execute.
      I have disabled access control for x-server with
      root@PC#xhost +
      zabbix@PC# export DISPLAY=:0.0

  • wagzy

    thanks once again.
    I forgot to mention that after zabbix has updated the text file, when I run
    I get the popup with the contents of the textfile
    I just do not know why when zabbix executes the script the xmessage popup does not appear.
    Thanks for your support so far. I am really grateful