Ad Widget

Collapse

[Zabbkit] Push notifications on your smartphone

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • yan
    started a topic [Zabbkit] Push notifications on your smartphone

    [Zabbkit] Push notifications on your smartphone

    Project is open source now (https://github.com/CactusSoft), support has been stopped.
    Please be careful. Regardless the service is still working and all applications are available in markets, it could be stopped any time without a notification.
    -------------------------------------


    Step 0: What are you talking about?
    Since we use Zabbix for monitoring our servers and have cool mobile client that helps us, we want to receive push-notifications to mobile devices about troubles. General solution is to make accounts in Apple/Google/Microsoft market (annually paid), receive some secrete keys create application that is able to communicate with notification cloud and call it from Zabbix. Acceptable for us. But we'd like to shere it with you.
    Thanks for CactusSoft team all that you need to have is cURL (usually you already have it on server) and to do simple configuration on your Zabbix using web interface.
    Below is step-by-step instruction that we applied on our Zabbix, but the system is quite flexible and you can make your own configuration.

    Step 1: Get your ID
    Get unique ID from Zabbkit application. Go to Notifications screen and get it.

    It will be used to identify you device. Like a phone number, but used for notifications

    Step 2: Create bash script
    Create bash script that will send notifications. Let's call it "zabbkit-push":
    Simple one
    Code:
    #!/bin/bash
    curl -X POST\
     -H "Content-type:application/json"\
     -d "{Id:'$1', text:'$2', triggerId:'$3', playSound:true}"\
     http://zabbkit.inside.cactussoft.biz/api/messages
    Advanced variant with logging, thanks to wolf_ktl
    Code:
    #!/bin/bash
    STRING=`curl -X POST\
    -H "Content-type:application/json"\
    -d "{Id:'$1', text:'$2', triggerId:'$3', playSound:true}"\
    http://zabbkit.inside.cactussoft.biz/api/messages`
    
    echo $(date +"%y-%m-%d %T"),$1,$STRING,$2,$3 >> /var/log/zabbix/push_zabbkit.log
    Put it to your Zabbix alertscript folder. On our server it's /usr/local/share/zabbix/alertscripts
    Don't forget to make it executable.

    Step 3: Check that script works properly
    Close Zabbkit app on device before sending notification. Then just run our script, like this:
    Code:
    ./zabbkit-push YOUR-ID-FROM-STEP-1 "test message" 0
    wait for a few seconds and ensure that notification appears on device.
    Troubleshooting:
    - Ensure that your device have internet connection
    - Ensure that you exit from Zabbkit app on your devise. Some platforms don't show the notification if app is run.
    - Check that script didn't return any errors. Correct reply looks like
    Code:
    {"trackingId":"520271616cc4b20b642bcdcd"}
    - Check the message status using tracking id. The id is similar to postal tracking id for a package. Go to http://zabbkit.inside.cactussoft.biz, type you ID and press check. If it says "Delivered", that means the message is successfully delivered to Apple/Google/Microsoft cloud.
    Last edited by yan; 21-04-2017, 12:16. Reason: stop supporting warning

  • amin
    replied
    As I'm not an Android Developer and I didn't know what to do with
    Code:
    https://github.com/CactusSoft/zabbkit-android
    repo I've installed zabbkit via this link :
    Code:
    https://apkpure.com/zabbkit/ru.zabbkit.android
    Then I logged in to my server and go to Notifications Tab but it shows "Your ID isn't registered yet..."

    Our company has a zabbkit-server and it's working fine and pushing notifications to other sysadmins which as it happens they all have iPhones, so as I'm new and have an android phone I want to get my ID and put it on zabbix in order to push to my phone as well.

    What should I do with "Your ID isn't registered yet..."?

    Leave a comment:


  • jherazob
    replied
    I knew it was too quiet...

    Anyone knows of an easy to set up replacement? I'm looking at the landscape and all i see is libraries to be used by apps, which is fine for the long term if you want to set it up just perfect and have developers you can throw at the problem but we're without Zabbix notifications just before a weekend

    Edit: Right now i just did a horrible hack with Pushover, will make it better over the next few days, and hopefully find a not too difficult to install/maintain alternative that is self hosted because i no longer want to depend on external entities for this, seems like Pushjet may do but don't know yet.
    Last edited by jherazob; 14-09-2017, 18:05. Reason: Found something

    Leave a comment:


  • mrz
    replied
    Looks like their push server is down now.
    It only replies with 502 Proxy Error.

    Leave a comment:


  • crazynet24
    replied
    zabbkit-push down?

    Since two oder three days I don't get notified by the push server at
    http://zabbkit.inside.cactussoft.biz/api/messages

    I know it was announced that it will not supported. I only want ol know if it is really down now, so I don't have to figure out whether my zabbix server has a problem with sending push notifications.

    Are there other people having problems with zabbkit-push?

    Leave a comment:


  • mrz
    replied
    Originally posted by chungpq View Post
    can i help you
    With Zabbix 3.2, the script does not work anymore. Does anyone have a solution to the problem? Thank you.!
    Any Update on this issue? Was someone successfull making this work with Zabbix 3.2?

    Edit: Somehow the Media Type or Action was disabled after the update. Enabling it fixed the "issue".
    Last edited by mrz; 20-08-2017, 17:17.

    Leave a comment:


  • eliaspizarro
    replied
    Anyone get Forbidden msg?

    Leave a comment:


  • yan
    replied
    Zabbkit is open source! Enjoy!

    Hi everybody!

    CactusSoft has decided to make the project completely open source. I know some of you asked me if they are able to use the solution without dependency to CactusSoft's push server. So now you are!

    Everything is available on github: https://github.com/CactusSoft

    Enjoy the development!

    The bad news here is that CactusSoft stops project and user support. We will leave the apps available in markets, we will continue using the app internally and we leave push server online. But we could stop it in any moment.

    Leave a comment:


  • chungpq
    replied
    i wan notification on zabbix vs 3.2

    can i help you
    With Zabbix 3.2, the script does not work anymore. Does anyone have a solution to the problem? Thank you.!
    Last edited by chungpq; 05-01-2017, 17:37.

    Leave a comment:


  • yan
    replied
    Originally posted by Abhiram_Cloud4c View Post
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: Content-type; Name or service not known

    [1/4]: Id:'5829d87eda73d90fd810374e'http://zabbkit.inside.cactussoft.biz/api/messages --> <stdout>
    curl: (6) Could not resolve host: Id:'5829d87eda73d90fd810374e'http; Name or service not known

    [2/4]: text:'test message'http://zabbkit.inside.cactussoft.biz/api/messages --> <stdout>
    curl: (6) Could not resolve host: text:'test message'http; Name or service not known

    [3/4]: triggerId:'0'http://zabbkit.inside.cactussoft.biz/api/messages --> <stdout>
    curl: (6) Could not resolve host: triggerId:'0'http; Name or service not known

    [4/4]: playSound:truehttp://zabbkit.inside.cactussoft.biz/api/messages --> <stdout>
    curl: (6) Could not resolve host: playSound:truehttp; Name or service not known
    It looks like you forgot to use CURL param keys. Could you please copy-paste here the whole command that you try to execute.

    Leave a comment:


  • Abhiram_Cloud4c
    replied
    getting followin error while executing script

    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: Content-type; Name or service not known

    [1/4]: Id:'5829d87eda73d90fd810374e'http://zabbkit.inside.cactussoft.biz/api/messages --> <stdout>
    curl: (6) Could not resolve host: Id:'5829d87eda73d90fd810374e'http; Name or service not known

    [2/4]: text:'test message'http://zabbkit.inside.cactussoft.biz/api/messages --> <stdout>
    curl: (6) Could not resolve host: text:'test message'http; Name or service not known

    [3/4]: triggerId:'0'http://zabbkit.inside.cactussoft.biz/api/messages --> <stdout>
    curl: (6) Could not resolve host: triggerId:'0'http; Name or service not known

    [4/4]: playSound:truehttp://zabbkit.inside.cactussoft.biz/api/messages --> <stdout>
    curl: (6) Could not resolve host: playSound:truehttp; Name or service not known

    Leave a comment:


  • rumkol
    replied
    Hi,

    I have strange problem with my Zabbkit app on my iphone.

    Everything works fine, except on the trigger history and event tabs the time of the events/triggers is -2 hours off of zabbix server's time and my current time.


    Any ideas what could cause this?

    Leave a comment:


  • DSendersBT
    replied
    Unable to send messages

    Hello,

    Since a couple of days we hare having issues with sending messages to Zabbkit.
    The error i get on the Zabbix server is : curl: (56) Recv failure: Connection reset by peer

    I have checked that i can ping the remote zabbkit server, and the website to check the delivery status opens up just fine.

    Zabbix version : 3.0



    Thanks in advance.

    Leave a comment:


  • Zaniwoop
    replied
    I am using the script that everyone is using:
    Code:
    #!/bin/bash
    STRING=`curl -X POST\
     -H "Content-type:application/json"\
     -d "{Id:'$1', text:'$2', triggerId:'$3', playSound:true}"\
    http://zabbkit.inside.cactussoft.biz/api/messages`
    
    echo $(date +"%y-%m-%d %T"),$1,$STRING,$2,$3 >> /var/log/zabbix/push_zabbkit.log
    When I test it with:
    Code:
    /etc/zabbix/externalscripts/zabbkit-push MY-ID "test" 0
    I get a positive response and receive the alert on my phone.

    I have set up a media type:
    Name: push notification
    Type: Script
    Script name: zabbkit-push

    When an event occurs which uses the push notification, Zabbix reports that it failed to notify. I receive alerts on other media for the same event.

    I don't see anything in the zabbix-server.log (DebugLevel=3).

    Any ideas?

    Leave a comment:


  • mrz
    replied
    Originally posted by wolf_ktl View Post
    My Good Primer
    That just worked fine, thank you very much!

    Leave a comment:

Announcement

Collapse
No announcement yet.
Working...
X