Hello for the best community
I have that i cant receive SMS notification to my mobile phone
My superior gived me a getway created with our VOIP direction , its work normaly for PRTG but when i added to icinga i cant receive any notification
here is url that he gived me
http://sms.icosnet.com:8080/bulksms/bulksms?username=theusername&password=thepassword&type=0&dlr=1&destination=%SMSNUMBER&source=213982400300&message=%SMSTEXT
i have configure the notification for sms in notification.conf
apply Notification “sms-notification” to Host {
import “sms-host-notification”
user_groups = host.vars.notification.sms.groups
users = host.vars.notification.sms.users
interval = 0
assign where host.vars.notification.sms
}
my template.conf file :
template Notification “sms-host-notification” {
command = “sms-host-notification”states = [ Down]
types = [ Problem, Acknowledgement, Recovery, Custom, FlappingStart,
FlappingEnd, DowntimeStart, DowntimeEnd, DowntimeRemoved ]
interval = 0
period = “24x7”
}
i want to Apply notification only for a specific service :
apply Service “GE02-A06-SE02” {
import “generic-service”
check_command = “snmpv3”
vars.snmpv3_address = “x.x.x.x”
vars.snmpv3_user = “icingamonitoring”
vars.snmpv3_oid = “my-oid”
vars.snmpv3_seclevel = “authPriv”
vars.snmpv3_auth_key = “Mypass”
vars.snmpv3_priv_key = “Mypass”
vars.snmpv3_priv_alg = “DES”
vars.snmpv3_auth_alg = “SHA”
vars.snmpv3_warn = 1
vars.snmpv3_crit = 1
vars.sms_phone = “213770840511”
assign where host.vars.agent_type == “snmpv3”
vars.notification[“mail”] = {
groups = [ “icingadatacenters” ]
users = [“icingadatacenter”]
}
vars.notification[“sms”] = {
groups = [ “icingadatacenters” ]
users = [ “icingadatacenter” ]
}
}
https://github.com/olkitu/Icinga2-SMS-Notification
and i modified the script with My getway
#!/bin/sh
template=$(cat <<TEMPLATE
$NOTIFICATIONTYPE-$HOSTDISPLAYNAME-is-$HOSTSTATE
TEMPLATE
)/usr/bin/curl --output “/var/log/icinga2/smslog” “http://sms.icosnet.com:8080/bulksms/bulksms?username=theusername&password=thepassword&type=0&dlr=1&destination=213770XXXXX&source=213982400300”
any advices ? whats i’m making it wrong ?
Thank you .