LogoLogo
API DocsDeveloper PortalSystem StatusTry for Free
  • Quickstart Guide
    • Introduction
    • Get started as an Account Owner
    • Get started as a User
    • Glossary
    • FAQs
  • Manage Users
    • Types of Users
    • Add and Delete Users
    • Import Users
    • User Permissions - Access Controls
    • Manage Your Profile
    • Notification Rules
    • On-Call Reminder Rules
    • Change Account Owner
  • Manage Teams
    • Understanding Teams
    • Role Based Access Control
    • Owner Based Access Control
    • Create and Delete Teams
    • Add and Remove Team Members
    • Squads
    • Stakeholder Groups
  • Services
    • Adding a Service
    • Service Overview
    • Service Graph
    • Maintenance Mode
    • Alert Deduplication Rules
      • Alert Deduplication Rules
      • Incident Status Based Deduplication
      • Service Dependency Based Deduplication
      • Key Based Deduplication
    • Event Tagging
    • Alert Routing
    • Alert Suppression
    • Custom Content Templates
    • Intelligent Alert Grouping (IAG)
    • Auto Pause Transient Alerts (APTA)
    • Delayed Notifications
  • Schedules
    • Schedules (New)
      • Adding a Schedule
      • Schedules Overview
      • Who is On-Call?
      • My On-Call Shifts
      • Overrides
      • Videos: How to set up common use cases?
  • Escalation Policies
    • Create and Manage Escalation Policy
    • Round Robin & Advanced Escalations
    • Reassign an Incident
  • Notifications
    • Understanding Incident Notifications
  • Dashboards
    • Incident Management Dashboard
    • Dashboard Metrics
    • Take Bulk Actions
    • Squadcast Search
  • Incident List
    • Incident List View
    • Incident Priorities
    • Filter Incidents
    • Save Filter View
    • Merge Incidents
    • Snooze Incidents
  • Incidents Page
    • Incidents Details
    • Incident Activity Timeline
    • Communication Channels
    • Create Incident Manually
    • Incident Notes
    • Incident Watchers
    • Past Incidents
    • Additional Responders
    • Incident Summaries
    • Incident Suggestions
  • Runbooks
    • Runbooks
  • Postmortems
    • Postmortem Templates
    • Create Postmortems
    • Accessing Postmortem
  • Status Page
    • Status Page
    • Status Page Overview
    • Components and Groups
    • Issues
    • Subscribers
    • Maintenance
  • SLO Tracker
    • SLO Basics
    • Configure and Monitor your SLOs
  • Webforms
    • Webforms
  • Global Event Rulesets
    • Global Event Rulesets
  • Workflows
    • Workflows
    • Workflows Overview
    • Actions
  • Live Call Routing
    • Live Call Routing
  • Analytics
    • Analytics (New)
    • Organization Level Analytics
    • On Call Hours Per User
    • Weekly Reports
  • Integrations
    • Incident Webhook (Incident Webhook/API)
    • Outgoing Webhooks
    • ServiceNow Extension
    • Extensions
      • Jira Cloud Integration
      • Jira DC (Data Center)
      • CircleCI
      • Google Chat
      • Freshdesk
      • Freshservice
      • Asana
      • ClickUp
      • Trello
      • Zendesk
      • Hubspot
    • Alert Source Integrations (Native)
      • Admin Labs
      • Airbrake
      • Amazon EventBridge
      • Amazon GuardDuty
      • Amazon Opensearch
      • APImetrics
      • AppDynamics
      • AppSignal
      • Auvik
      • AWS CloudTrail Logs
      • AWS CloudTrail via CloudWatch
      • Amazon Cloudwatch (AWS) Integration
      • AWS CloudWatch Event Rules
      • AWS Elastic Beanstalk via CloudWatch
      • Amazon RDS (AWS)
      • Amazon SNS (AWS)
      • Azure Monitor
      • Better Uptime
      • Bitbucket
      • Bitrix 24
      • Blue Matador
      • Bugsnag
      • Buildkite
      • Checkly
      • Checkmk
      • CircleCI Integration
      • Cisco DNAC
      • Cisco Meraki
      • ClickUp Integration
      • CloudAMQP
      • Cloudflare
      • Conviva
      • CopperEgg
      • Coralogix
      • Cronitor
      • Crowdstrike Falcon
      • Datadog
      • Databricks
      • Dead Man's Snitch
      • Domotz
      • Dotcom Monitor
      • Dynatrace
      • ElastAlert
      • Elastic
      • Elecard Boro
      • Email Integration
      • Endtest
      • Errorception
      • Freshdesk Integration
      • Freshping
      • Freshservice
      • Ghost Inspector
      • GitHub Integration
      • GitLab
      • Grafana 8
      • Grafana
      • Graylog v4
      • Graylog
      • HaloPSA
      • Healthchecks
      • Heroku
      • HetrixTools
      • Honeybadger
      • Honeycomb
      • Humio
      • Hund
      • Hydrozen
      • Hyperping
      • Icinga2
      • InsightOps (LogEntries)
      • Instana
      • Intercom
      • Jenkins Integration
      • Jira Cloud Alert Source
      • Jira Server Alert Source
      • Kapacitor
      • Kentik
      • Komodor
      • Kibana
      • LibreNMS
      • Linear
      • Loggly
      • Logstash
      • Logz.io
      • ManageEngine Application Manager
      • ManageEngine Opmanager
      • Mezmo (formerly LogDNA)
      • MongoDB Atlas / Cloud Manager
      • Nagios
      • New Relic
      • Nixstats
      • NodePing
      • Observium
      • Oh Dear
      • Oracle Cloud Infrastructure
      • OSNexus QuantaStor
      • OverOps
      • Papertrail
      • Pingdom
      • Plesk 360
      • Postman
      • Postmark
      • Powercode
      • Progress WhatsUp Gold
      • Prometheus
      • PRTG Network Monitor
      • Rapid7 InsightIDR
      • RapidSpike
      • Redash
      • Redgate SQL Monitor
      • Rollbar
      • Rundeck
      • Runscope
      • Salesforce Cloud
      • Scout APM
      • Sematext
      • Sensu Go
      • Sensu
      • Sentry.io
      • Server Density
      • ServerGuard24
      • ServiceNow Integration
      • Shortcut (Clubhouse)
      • SignalFx
      • SigNoz
      • Site24x7
      • Slack
      • SolarWinds AppOptics
      • SolarWinds Observability SaaS (SWO)
      • SolarWinds Orion
      • Sonar
      • Splunk
      • Sqreen
      • Stackdriver
      • Stackify Retrace
      • StatHat
      • StatusCake
      • ServiceDesk Plus OD
      • Sumo Logic
      • Sysdig Monitor
      • Threat Stack
      • Trello
      • Twilio
      • Uptime
      • Uptime Robot
      • Uptrends
      • Wavefront
      • Zabbix 5.0
      • Zabbix 6.2
      • Zabbix
      • Zendesk Integration
      • Zoho Desk
      • Zoho Desk via Zoho Flow
      • LogicMonitor
  • ChatOps
    • Google Chat
    • Microsoft Teams
    • Slack for Incident Management
      • Using the Integration
  • Single Sign-On (SSO)
    • AWS SSO
    • Azure Active Directory SSO
    • Google SSO
    • Microsoft ADFS SSO
    • Okta SSO Integration
    • SAML 2.0 based SSO
  • Mobile App
    • Using the Mobile App
  • Terraform & API Documentation
    • Terraform Provider
    • Public API - Refresh Token
    • API Documentation
    • Getting Started with Squadcast GraphQL
      • Schedules
        • Create Schedule
        • Update Schedule
        • Delete Schedule
        • Pause Schedule
        • Get Schedules
        • Get Schedule by ID
        • Resume Schedule
        • Clone Schedule
        • Get Gaps
      • Rotations
        • Create Rotation
        • Update Rotation
        • Delete Rotation
        • Get Rotation by ID
        • Get Rotation Events by ID
      • Overrides
        • Create Override
        • Update Override
        • Delete Override
        • Get Override by ID
      • Calendar URLs
      • Who is On-Call
    • Developer Portal
    • Incident Rate Limiting
  • Managing your Squadcast Account
    • Audit Logs
    • Organizations
    • Billing FAQs
    • Deactivate your Squadcast Account
    • Delete your Squadcast Account
Powered by GitBook
On this page

Was this helpful?

  1. Integrations
  2. Alert Source Integrations (Native)

Zabbix 5.0

Send events to Squadcast from Zabbix 5

PreviousWavefrontNextZabbix 6.2

Last updated 1 year ago

Was this helpful?

is a mature, enterprise-level platform that allows you to monitor large-scale IT environments comprising servers, networks, applications, services and cloud.

Route detailed monitoring alerts from Zabbix 5.0 to the right users in Squadcast.

How to integrate Zabbix 5.0 with Squadcast

In Squadcast: Using Zabbix 5.0 as an Alert Source

  1. Navigate to Services -> Service Overview -> select or search for your Service. Expand the accordion -> In the Alert Sources section, click Add.

Important:

When an alert source turns Active, it’ll show up under Configured Alert Sources, you can either generate a test alert from the integration or wait for a real-time alert to be generated by the Alert Source. An Alert Source is active if there is a recorded incident via that Alert Source for the Service.

In Zabbix 5.0: Create a Squadcast Webhook

(1) From the sidebar in the dashboard, click on Media types present under the Administration section

(2) Copy the contents of the below XML snippet and save it in a file with .xml extension

<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
    <version>5.0</version>
    
    <media_types>
        <media_type>
            <name>Squadcast</name>
            <type>WEBHOOK</type>
            <parameters>
                <parameter>
                    <name>eventid</name>
                    <value>{EVENT.ID}</value>
                </parameter>
                <parameter>
                    <name>eventname</name>
                    <value>{EVENT.NAME}</value>
                </parameter>
                <parameter>
                    <name>hostname</name>
                    <value>{HOST.NAME}</value>
                </parameter>
                <parameter>
                    <name>severity</name>
                    <value>{EVENT.NSEVERITY}</value>
                </parameter>
                <parameter>
                    <name>triggerid</name>
                    <value>{TRIGGER.ID}</value>
                </parameter>
                <parameter>
                    <name>eventack</name>
                    <value>{EVENT.ACK.STATUS}</value>
                </parameter>
                <parameter>
                    <name>eventupdate</name>
                    <value>{EVENT.UPDATE.STATUS}</value>
                </parameter>
                <parameter>
                    <name>eventvalue</name>
                    <value>{EVENT.VALUE}</value>
                </parameter>
                <parameter>
                    <name>eventdate</name>
                    <value>{EVENT.DATE}</value>
                </parameter>
                <parameter>
                    <name>event_tags</name>
                    <value>{EVENT.TAGS}</value>
                </parameter>
                <parameter>
                    <name>hostip</name>
                    <value>{HOST.IP}</value>
                </parameter>
                <parameter>
                    <name>eventtime</name>
                    <value>{EVENT.TIME}</value>
                </parameter>
                <parameter>
                    <name>triggerdesc</name>
                    <value>{TRIGGER.DESCRIPTION}</value>
                </parameter>
                <parameter>
                    <name>eventopdata</name>
                    <value>{EVENT.OPDATA}</value>
                </parameter>
                <parameter>
                    <name>zabbixurl</name>
                    <value>{$ZABBIX.URL}</value>
                </parameter>
                <parameter>
                    <name>squadcastwebhook</name>
                    <value>{ALERT.SENDTO}</value>
                </parameter>
                <!-- <parameter>
                    <name>HTTPProxy</name>
                    <value></value>
                </parameter> -->
            </parameters>
            <script>
            try {
    var params = JSON.parse(value),
        req = new CurlHttpRequest(),
        fields = {},
        resp = '';

    //this is for when you have a proxy at your end    
    if (params.HTTPProxy) {
        req.SetProxy(params.HTTPProxy)
    }

    // Validating params
    if (isNaN(parseInt(params.eventid)) || params.eventid &lt; 1) {
        throw 'incorrect value for variable &quot;eventid&quot;. The value must be a positive number.';
    }
    if (params.eventname.length &lt; 1) {
        throw 'incorrect value for variable &quot;eventname&quot;. The value must be a non-empty string.';
    }
    if (params.hostname.length &lt; 1) {
        throw 'incorrect value for variable &quot;hostname&quot;. The value must be a non-empty string.';
    }
    if (isNaN(parseInt(params.severity)) || (params.severity &lt; 0 &amp;&amp; params.severity &gt; 5)) {
        throw 'incorrect value for variable &quot;severity&quot;. The value must be a number 0..5.';
    }
    if (isNaN(parseInt(params.triggerid)) || params.triggerid &lt; 1) {
        throw 'incorrect value for variable &quot;triggerid&quot;. The value must be a positive number.';
    }
    if (params.eventack != 'Yes' &amp;&amp; params.eventack != 'No') {
        throw 'incorrect value for variable &quot;eventack&quot;. The value must be Yes or No.';
    }
    if (isNaN(parseInt(params.eventupdate)) || (params.eventupdate &lt; 0 || params.eventupdate &gt; 1)) {
        throw 'incorrect value for variable &quot;eventupdate&quot;. The value must be 0 or 1.';
    }
    if (isNaN(parseInt(params.eventvalue)) || (params.eventvalue &lt; 0 || params.eventvalue &gt; 1)) {
        throw 'incorrect value for variable &quot;eventvalue&quot;. The value must be 0 or 1.';
    }
    if (params.squadcastwebhook.length &lt; 1) {
        throw 'incorrent value for variable &quot;squadcastwebhook&quot;. The value must be a non-empty string.';
    }

    var severityMapping = [
        'Not classified',
        'Information',
        'Warning',
        'Average',
        'High',
        'Disaster'
    ];

    req.AddHeader('Content-Type: application/json');

    fields.event_id = params.eventid;
    fields.event_nseverity = severityMapping[params.severity];
    fields.event_name = params.eventname;
    fields.trigger_description = params.triggerdesc;
    fields.event_opdata = params.eventopdata;
    fields.event_date = params.eventdate;
    fields.event_time = params.eventtime;
    fields.event_tags = params.eventtags;
    fields.host_ip = params.hostip;
    fields.host_name = params.hostname;
    fields.event_url = params.zabbixurl + '/tr_events.php?triggerid=' + params.triggerid + ' &amp;eventid=' + params.eventid;

    // if event is a "trigger" event
    if ((params.eventvalue == 1) &amp;&amp; (params.eventupdate == 0))
        fields.event_action = 'trigger';
    // if event is "acknowledge" event
    else if ((params.eventvalue == 1) &amp;&amp; (params.eventupdate == 1) &amp;&amp; (params.eventack == 'Yes'))
        return 'OK';
    // if event is "resolve" event
    else if (params.eventvalue == 0)
        fields.event_action = 'resolve';
    else
        throw 'incorrect values. Update message without ack will not be sent.';

    Zabbix.Log(4, '[Squadcast Webhook] Sending request:' + JSON.stringify(fields));
    Zabbix.Log(4, '[Squadcast Webhook] Webhook URL:' + params.squadcastwebhook);
    resp = req.Post(params.squadcastwebhook, JSON.stringify(fields));
    Zabbix.Log(4, '[Squadcast Webhook] Receiving response:' + resp);

    try {
        resp = JSON.parse(resp);
    } catch (error) {
        throw 'incorrect response. Squadcast returned a non-JSON object.';
    }
    if (req.Status() > 299) {
        throw resp;
    }

    return 'OK';
} catch (error) {
    Zabbix.Log(3, '[Squadcast Webhook] Notification failed : ' + error);
    throw 'Squadcast notification failed : ' + error;
}
            </script>
        </media_type>
    </media_types>
</zabbix_export>

Note

If you use a proxy at your end:

  • Uncomment lines 74 through 77 and add your proxy URL inside the value tag and you are good to go.

(3) Click on Import button in the top right corner

(4) Choose the saved .xml file from your device and click on Import

(5) Verify if Squadcast Media Type was added successfully. Click on Media Types > Search for Squadcast > click on the result

You should be able to view the Parameters and Script, similar to the screenshot below

Note

HTTPProxy parameter and value will be listed here if you uncommented the same in the script previously.

(6) Click on Script to verify that the Script has been added

(7) Now, you can add this Media Type to any User/s you want. Click on the Users tab under the Administration section from the sidebar

(8) Select User/s you want to add Squadcast Media Type to

(9) Navigate to Media tab, click on Add to enter the following details:

  • Type: Either pick Squadcast or add a name, such as Squadcast

  • Send to: Paste the copied Zabbix 5.0 Webhook URL from Squadcast

  • When active: Specify suitable values

  • Use if severity: Select appropriate checkboxes

  • Click on Add to save the Media for the User

(10) Make sure you click on Update button in the Media page to save these details

(11) Now navigate to Actions tab under Configurations section from the sidebar

(12) Click on Create Action at the top right corner. In the Action tab, give the action a meaningful name, such as Squadcast Notifications

(13) In the same page, switch to Operations tab and configure available options as per your requirements. Finally, click on Add to save it

That's it, Your Zabbix 5.0 integration is now good to go! Whenever an alert is fired from Zabbix 5.0, an incident for the same will be created in Squadcast.

FAQ:

Q: If an alert gets resolved in Zabbix 5.0, does Zabbix 5.0 send auto-resolve signals to Squadcast?

A: Yes, Zabbix 5.0 sends alert auto-resolve signals to Squadcast, thus supporting the auto-resolution of incidents in Squadcast.

2. Select Zabbix 5.0. Copy the displayed Webhook URL to it within Zabbix 5.0. Finish by clicking Add Alert Source -> Done.

Have any other questions? .

Ask the community
configure
Zabbix 5.0