₹0.15/SMS on Business planFree DLT registration helpInternational SMS worldwide
Talk to sales+91 95851 60363 Get started
Zabbix integration

Zabbix SMS Alerts Through an SMS Gateway, Without a GSM Modem

Zabbix can send SMS alerts through our HTTP API with a webhook media type, so you need no GSM modem or SIM card on the Zabbix server. Copy the script on this page, add your API key and approved header, and match the alert text to a DLT template.

No GSM modemDLT-ready scriptFrom ₹0.15 per SMS
Developer writing code on a laptop
✓✓
DeliveredVM-KVINFR-S · DLR received
Z
Trigger: High CPU on db-prod-02SMS sent to on-call
Quick answer

To send Zabbix SMS alerts through an SMS gateway, create a media type of type Webhook, pass the phone number and event details as parameters, and use a short script that calls our /httpapi/send URL. In India the alert text must match an approved DLT template, so the script builds the message from fixed words and short values.

30characters per DLT variable
5.4+Zabbix versions with HttpRequest
₹0.15per SMS, Business plan

Get pricing & plans

We'll call within working hours with the right plan and check your DLT or sender ID status.

Set-up

Webhook script and parameters

Create the media type with these parameters, paste the script into its Script field and set the timeout to 30s. Replace Kovai Infra with your own brand name, as registered in your DLT templates.

Zabbix webhook parameters
ParameterValue
to{ALERT.SENDTO}
host{HOST.NAME}
problem{EVENT.NAME}
severity{EVENT.SEVERITY}
time{EVENT.TIME}
rtime{EVENT.RECOVERY.TIME}
status{EVENT.VALUE}
api_keyYour API key from the panel
sender_idYour approved header, such as KVINFR
// Zabbix webhook media type: sends one SMS through the HTTP API.
// The wording must match your two approved DLT service templates exactly.
var p = JSON.parse(value);
function cut(v) { return String(v || '').substring(0, 30); }   // a DLT variable holds up to 30 characters

var text = (p.status === '0')
    ? 'Resolved: ' + cut(p.problem) + ' on ' + cut(p.host) + ' at ' + cut(p.rtime) + '. - Kovai Infra'
    : 'Alert: ' + cut(p.problem) + ' on ' + cut(p.host) + ', severity ' + cut(p.severity) + ', at ' + cut(p.time) + '. - Kovai Infra';

var url = 'https://whitelabled.securesmsc.com/httpapi/send'
    + '?api_key=' + encodeURIComponent(p.api_key)
    + '&sender_id=' + encodeURIComponent(p.sender_id)
    + '&route=T'
    + '&phonenumber=' + encodeURIComponent(p.to)
    + '&message=' + encodeURIComponent(text);

var req = new HttpRequest();
var reply = String(req.get(url)).trim();
Zabbix.log(4, '[SMS webhook] HTTP ' + req.getStatus() + ', reply ' + reply);

if (req.getStatus() !== 200 || reply === '' || reply.charAt(0) === '-') {
    throw 'SMS not sent, API reply: ' + reply;   // shows in Reports > Action log
}
return 'OK';
Zabbix 5.4 and later (HttpRequest). Returns OK, or raises the API's negative reply code.

No modem or SIM

Alerts leave over HTTPS, so the Zabbix server needs no GSM hardware.

Ready-made script

A webhook script that builds the DLT text and reads our reply code.

Problem and recovery

Separate templates for an alert and for its resolution.

Reaches DND numbers

Service SMS on route T reach on-call staff at any hour.

Direct operator connectivity
JioAirtelViBSNLTRAI DLT compliant · 6+ redundant routes

Why use an SMS gateway for Zabbix alerts

Zabbix's built-in SMS media type talks to a GSM modem attached to the server. That means a SIM card to recharge, hardware in the rack, and a phone network that is often weakest in the server room. A webhook media type sends the same alerts over HTTPS to our gateway, which delivers them on DLT-registered routes.

Alerts go out as service SMS on route T, so they reach on-call engineers on DND numbers at 3 am. Each message is billed at your normal rate of ₹0.15 or ₹0.20 per delivered SMS, plus GST, and every send appears in the MIS report in our panel.

Set up the webhook media type

In Zabbix 7.x open Alerts, then Media types; in Zabbix 6.x it is under Administration. Create a media type, set Type to Webhook and add the parameters below. Paste the script from this page into the Script field, set the timeout to 30s and save. Then add the media to each user under Users, Media, with their mobile number as Send to, and add a Send message operation to the trigger actions that should page them.

  • to: {ALERT.SENDTO} (the user's mobile number, 10 digits)
  • host: {HOST.NAME}
  • problem: {EVENT.NAME}
  • severity: {EVENT.SEVERITY}
  • time: {EVENT.TIME}
  • rtime: {EVENT.RECOVERY.TIME} (used in recovery messages)
  • status: {EVENT.VALUE} (1 for a problem, 0 for a recovery)
  • api_key and sender_id: your key and approved header

Match the alert text to a DLT template

Every business SMS in India must match a template approved on DLT, word for word, with each {#var#} holding up to 30 characters. Zabbix's own message text changes with every trigger, so the script does not send it. It builds the SMS from fixed words and four short values, and cuts each value to 30 characters, so every alert fits your approved template.

Register two service templates with your DLT operator before you go live, using the exact wording in the script, then add them under your sender ID in our panel. Change the wording in the script only if you register the new wording first.

  • Problem: Alert: {#var#} on {#var#}, severity {#var#}, at {#var#}. - Kovai Infra
  • Recovery: Resolved: {#var#} on {#var#} at {#var#}. - Kovai Infra
  • Replace Kovai Infra with your own brand name in both the script and the template

Test it and read the reply codes

Use the Test button on the media type, fill in your own number and sample values, and send. The script returns OK when our API replies with a broadcast ID. If the API replies with a negative code, the script raises an error with that code, which shows in Zabbix under Reports, Action log. -10 means the header is wrong and -12 means credits ran out. If the script returns OK but no SMS arrives, check the MIS report in our panel: a text that matches no approved template shows there as failed, with the reason.

Other monitoring tools

The same HTTP API works with any tool that can call a URL on an alert, such as Nagios or Icinga notification commands, Grafana contact points through a small relay, or a cron script. Keep each alert type on its own DLT template, and keep the API key on the server.

International

Sending outside India too?

We also send SMS and WhatsApp messages to customers abroad, with help on each country's sender ID and consent rules.

Get started

How it works

Get your key and header

Open an account, buy credits and copy your API key. We help with DLT.

Register two templates

One for problems and one for recoveries, worded exactly as in the script.

Create the media type

Webhook type, the parameters listed here and the script pasted in.

Test and assign

Test with your number, then add the media to users and actions.

FAQ

Frequently asked questions

Can Zabbix send SMS without a GSM modem?

Yes. A webhook media type sends each alert over HTTPS to an SMS gateway, which delivers it to the phone network. You need internet access from the Zabbix server, an API key and an approved DLT header and templates, but no modem, SIM card or recharge.

Which Zabbix versions does this work with?

The script uses Zabbix's HttpRequest object, which webhook media types have had since Zabbix 5.4, so it runs on 6.0, 6.4 and 7.x. In 7.x media types are under Alerts, Media types; in 6.x they are under Administration, Media types.

Why does the script not send Zabbix's own message text?

In India every business SMS must match an approved DLT template word for word, and Zabbix's default messages change with each trigger and run longer than a DLT variable allows. The script builds the SMS from fixed template words and short values, each cut to 30 characters, so every alert matches.

Will alerts reach engineers on DND numbers at night?

Yes. The script sends on route T with a service template, and service SMS reach DND and non-DND numbers at any hour. Promotional routes are limited to daytime and non-DND numbers, so never send alerts on route P.

What do Zabbix SMS alerts cost?

Each alert is billed like any SMS, by the number of parts: one part holds 160 English characters. The rate is ₹0.20 on Starter or ₹0.15 on Business, plus 18% GST, from a minimum purchase of 5,000 SMS. Credits last a year, and there is no charge for the integration itself.

Send your first SMS today

From ₹0.15 per delivered SMS, credits valid for a year, and DLT help from a real person.

Chat on WhatsApp