Hi All
I've spent 3 days on this issue and have really google fu'ed my heart out trying to get to the bottom of this. Would really like a pointer in the right direction.
Background :
I've got a little script that sends SMS based alerts out via a 3rd party provider.This works a treat. What I am trying to incorporate is zabbix_sender to send back the sent SMS to the Zabbix Server. Attached at the images from my template.
I have created a template : Template SMS Provider
I have created a discovery item : SMS -> This key stores an item per unique sms sent number
I have created an item prototype : MSG Send : {#NUMBER} -> this key should store a unique value per item? i.e. sms text per sms sent
Problem :
I am first off a bit confused with the correct JSON format but the following seems to partially work :
My SMS Script writes the following two lines out to a file which I than zabbix_sender -i later :
host1 whispir.api.sms { "data":[{ "{#NUMBER}":"+61411111111" }]}
host1 whispir.api.sms.sent { "data":[{ "{#MSGSENT}":"2013-10-21 06:09:08 Test SMS from console JSON API." }]}
My response on a zabbix_sender -z server1 -i sms_sent.txt is :
zabbix_sender [2340]: DEBUG: answer [{
"response":"success",
"info":"Processed 1 Failed 1 Total 2 Seconds spent 0.007768"}]
info from server: "Processed 1 Failed 1 Total 2 Seconds spent 0.007768"
sent: 2; skipped: 0; total: 2
The first line get's partially processed correctly server side i.e. I see the item on the host configuration, but i do not see any data in latest data.
I know tha t a) i'm either confused about the JSON format or how to use a zabbix trapper item or b) somethings not working the way it should?
Any help would be greatly appreciated.
Images : http://imgur.com/9f0Xhww,ykyxRpc,9S5tMzh,LDlJ40G
I've spent 3 days on this issue and have really google fu'ed my heart out trying to get to the bottom of this. Would really like a pointer in the right direction.
Background :
I've got a little script that sends SMS based alerts out via a 3rd party provider.This works a treat. What I am trying to incorporate is zabbix_sender to send back the sent SMS to the Zabbix Server. Attached at the images from my template.
I have created a template : Template SMS Provider
I have created a discovery item : SMS -> This key stores an item per unique sms sent number
I have created an item prototype : MSG Send : {#NUMBER} -> this key should store a unique value per item? i.e. sms text per sms sent
Problem :
I am first off a bit confused with the correct JSON format but the following seems to partially work :
My SMS Script writes the following two lines out to a file which I than zabbix_sender -i later :
host1 whispir.api.sms { "data":[{ "{#NUMBER}":"+61411111111" }]}
host1 whispir.api.sms.sent { "data":[{ "{#MSGSENT}":"2013-10-21 06:09:08 Test SMS from console JSON API." }]}
My response on a zabbix_sender -z server1 -i sms_sent.txt is :
zabbix_sender [2340]: DEBUG: answer [{
"response":"success",
"info":"Processed 1 Failed 1 Total 2 Seconds spent 0.007768"}]
info from server: "Processed 1 Failed 1 Total 2 Seconds spent 0.007768"
sent: 2; skipped: 0; total: 2
The first line get's partially processed correctly server side i.e. I see the item on the host configuration, but i do not see any data in latest data.
I know tha t a) i'm either confused about the JSON format or how to use a zabbix trapper item or b) somethings not working the way it should?
Any help would be greatly appreciated.
Images : http://imgur.com/9f0Xhww,ykyxRpc,9S5tMzh,LDlJ40G

Comment