Zabbix Integration: Difference between revisions

From OSNEXUS Online Documentation Site
Jump to navigation Jump to search
mNo edit summary
m QSTOR-10802: rewrite Zabbix integration guide - add category, step headings, template import step, severity map; redact example API token
 
Line 1: Line 1:
Zabbix is integrated with QuantaStor via a customer alert handler integrated with QuantaStor's Alert Manager.  Here are the configuration steps.
[[Category:integration_guide]]


Step 1 - Generate API key
Zabbix is an enterprise-class open source monitoring and observability platform.  QuantaStor integrates with Zabbix via a custom alert handler tied into the QuantaStor Alert Manager, which pushes each alert into Zabbix over the Zabbix API.  Setup is a matter of generating an API token in Zabbix, combining it with your Zabbix URL, and adding the result to the QuantaStor Alert Manager screen as a new Alert Endpoint.


Navigate to Users -> API Token -> Create API token
'''Requirements:''' Zabbix 7.0 or newer.  If you don't have a Zabbix server available you can stand up a free 3-day trial instance at [https://cloud.zabbix.com cloud.zabbix.com] using the ''nano'' tier.
Name it quantastor-itsm, and choose a user to associate the key with. We recommend disabling the "Set expiration date and time" so that alerts are not missed due to key expiration.
Make sure to copy the key after creating it.


Step 2 - Create the Zabbix URL with token
== Step 1 - Generate an API Token ==


Open a text editor and paste the API key from step 1. Then copy the Zabbix URL and paste it on another line in the text editor. Remove everything after the first '/' character and add a '#' at the end. Then Paste your API key. Your new URL should resemble
Login to Zabbix and navigate to:
https://light-kudu.zabbix.cloud/#7506c2db7a6420a6ea0f15a2b55254de4fa442d4d7311b1dabb8ec765dcbba


Step 3 - Add the Zabbix URL to QuantaStor
'''Users''' -> '''API tokens''' -> '''Create API token'''


Login to your QuantaStor storage grid and then select the "Alert Manager" button to bring up the dialog for adding alert endpoints. On the second page select Zabbix from the dropdown list of ITSM integrations and then paste the URL endpoint captured in Step 2.
Name the token '''quantastor-itsm''' and choose the user to associate it with. We recommend leaving '''Set expiration date and time''' un-checked so that alerts are not missed due to token expiration.


Step 4 - Apply changes and test
The token is displayed only once, so be sure to copy it before leaving the page.


Apply your changes in the QuantaStor Alert Manager to add the new endpoint then use the "Generate Test Alert" button to generate a test alert to verify everything is configured correctly. Login to your Zabbix account. The script should create automatically create a host in Zabbix that will be the parent of all the data received. Follow the step below to easily see new alerts created. Note that QuantaStor alerts at the "INFO" level are not sent to the ITSM modules so be sure to generate a "WARNING" or "ERROR" level alerts when generating test alerts.
The user the token is tied to needs rights to create hosts and, for the one-time setup in Step 3, to create host groups and import templates. A '''Super admin''' user is the simplest choice.


Step 5 - (Optional) Use our script to setup the QuantaStor Alerts dashboard
== Step 2 - Assemble the Endpoint URL ==


/opt/osnexus/quantastor/bin/qs_alerthandler_zabbix.py --setup --url 'https://light-kudu.zabbix.cloud/#7506c2db7a6420a6ea0f15a2b55254de4fa442d4d7311b1dabb8ec765dcbba'
The endpoint URL that QuantaStor needs is the base URL of your Zabbix front end, followed by a '#' character, followed by the API token from Step 1:


This will make a new dashboard under "Dashboards" in Zabbix named "Quantastor Alerts", listing all received alerts. They can be dismissed by acknowledging them in the update menu to the right of each alert.
<pre>
https://<zabbix-host>/#<API-token>
</pre>
 
With Zabbix Cloud the front end is at the root of the host name, so the URL will look like this:
 
<pre>
https://qs-example.zabbix.cloud/#b7f3a91c2d6e480fa5c81e37d94b06af2c15e8d073a4bf6295cd10e8473f92
</pre>
 
With a self-hosted Zabbix server the front end is usually served under ''/zabbix'', so the URL will look like this:
 
<pre>
https://zabbix.example.com/zabbix#b7f3a91c2d6e480fa5c81e37d94b06af2c15e8d073a4bf6295cd10e8473f92
</pre>
 
QuantaStor appends the API path (''api_jsonrpc.php'') to the URL automatically, so there's no need to include it.
 
== Step 3 - Import the QuantaStor Template ==
 
Run the alert handler once with the '''--setup''' option on any storage system in the grid, passing the URL assembled in Step 2:
 
<pre>
/opt/osnexus/quantastor/bin/qs_alerthandler_zabbix.py --setup --url 'https://qs-example.zabbix.cloud/#b7f3a91c2d6e480fa5c81e37d94b06af2c15e8d073a4bf6295cd10e8473f92'
</pre>
 
Note the single quotes around the URL, they're required so that the shell doesn't treat the '#' as the start of a comment.
 
This imports the '''QuantaStor by Trapper''' template (items, triggers and a per-host dashboard) and creates a grid-wide '''QuantaStor Alerts''' dashboard under '''Dashboards''' in Zabbix.
 
This step is optional in the sense that alerts will still be delivered without it, but until the template is imported they arrive only as a raw JSON payload with no triggers, no entries under '''Monitoring''' -> '''Problems''', and no dashboard, so we recommend always running it.
 
== Step 4 - Add the Endpoint to QuantaStor ==
 
Login to your QuantaStor storage grid and then select the '''Alert Manager''' button in the toolbar to bring up the dialog for adding alert endpoints.  On the second page select '''Zabbix''' from the dropdown list of ITSM integrations and then input the URL endpoint you assembled in Step 2.
 
== Step 5 - Apply Changes and Test ==
 
Apply your changes to add the new endpoint, then use the '''Generate Test Alert''' button to verify that everything is configured correctly and that alerts are making it into Zabbix.  Note that "INFO" level alerts are not sent to the ITSM modules, so be sure to generate a "WARNING" or "ERROR" level alert for testing.
 
The first alert from a given storage system creates its host in Zabbix, and the Zabbix server only picks up that new configuration on its next cache reload (up to 60 seconds).  The alert handler retries until the alert lands, so the first test alert may take a minute or so to appear.
 
[[File:Image-2026-08-21-11-03-00-211.png|800px]]
 
== Viewing Alerts in Zabbix ==
 
Alerts can be reviewed in three places:
 
* '''Dashboards''' -> '''QuantaStor Alerts''' - alert counts by severity plus the full alert list across every storage system in the grid.
* '''Monitoring''' -> '''Problems''' - the standard Zabbix problem view, filtered however you like.
* The '''QuantaStor alerts''' dashboard on an individual host - the last alert received from that one storage system.


[[File:Image-2026-08-21-11-39-31-766.png|800px]]
[[File:Image-2026-08-21-11-39-31-766.png|800px]]


[[File:Image-2026-08-21-11-03-00-211.png|800px]]
QuantaStor alerts are one-shot events with no automatic recovery condition, so a problem stays open until it is closed by hand.  To dismiss an alert use the '''Update''' link to the right of it and select '''Close problem'''.
 
== What the Integration Creates in Zabbix ==
 
{| class="wikitable"
! Object !! Name !! Notes
|-
| Host group || QuantaStor || Holds every storage system reporting into Zabbix
|-
| Host || One per storage system || Named by the storage system's IP address, with the system name as the visible name
|-
| Template || QuantaStor by Trapper || Linked automatically to each host created by the handler
|-
| Dashboard || QuantaStor Alerts || Grid-wide alert dashboard, created by --setup
|-
| Template dashboard || QuantaStor alerts || Per-host view of the most recent alert
|}
 
Each alert is pushed as a JSON document into the ''quantastor.alert'' trapper item, and the template derives the individual fields (title, description, severity, alert type, storage system, timestamp) from it.  QuantaStor alert severities map to Zabbix trigger priorities as follows:
 
{| class="wikitable"
! QuantaStor severity !! Zabbix priority
|-
| Critical || Disaster
|-
| Error || High
|-
| Warning || Warning
|-
| Info || not forwarded
|}

Latest revision as of 22:17, 24 August 2026


Zabbix is an enterprise-class open source monitoring and observability platform. QuantaStor integrates with Zabbix via a custom alert handler tied into the QuantaStor Alert Manager, which pushes each alert into Zabbix over the Zabbix API. Setup is a matter of generating an API token in Zabbix, combining it with your Zabbix URL, and adding the result to the QuantaStor Alert Manager screen as a new Alert Endpoint.

Requirements: Zabbix 7.0 or newer. If you don't have a Zabbix server available you can stand up a free 3-day trial instance at cloud.zabbix.com using the nano tier.

Step 1 - Generate an API Token

Login to Zabbix and navigate to:

Users -> API tokens -> Create API token

Name the token quantastor-itsm and choose the user to associate it with. We recommend leaving Set expiration date and time un-checked so that alerts are not missed due to token expiration.

The token is displayed only once, so be sure to copy it before leaving the page.

The user the token is tied to needs rights to create hosts and, for the one-time setup in Step 3, to create host groups and import templates. A Super admin user is the simplest choice.

Step 2 - Assemble the Endpoint URL

The endpoint URL that QuantaStor needs is the base URL of your Zabbix front end, followed by a '#' character, followed by the API token from Step 1:

https://<zabbix-host>/#<API-token>

With Zabbix Cloud the front end is at the root of the host name, so the URL will look like this:

https://qs-example.zabbix.cloud/#b7f3a91c2d6e480fa5c81e37d94b06af2c15e8d073a4bf6295cd10e8473f92

With a self-hosted Zabbix server the front end is usually served under /zabbix, so the URL will look like this:

https://zabbix.example.com/zabbix#b7f3a91c2d6e480fa5c81e37d94b06af2c15e8d073a4bf6295cd10e8473f92

QuantaStor appends the API path (api_jsonrpc.php) to the URL automatically, so there's no need to include it.

Step 3 - Import the QuantaStor Template

Run the alert handler once with the --setup option on any storage system in the grid, passing the URL assembled in Step 2:

/opt/osnexus/quantastor/bin/qs_alerthandler_zabbix.py --setup --url 'https://qs-example.zabbix.cloud/#b7f3a91c2d6e480fa5c81e37d94b06af2c15e8d073a4bf6295cd10e8473f92'

Note the single quotes around the URL, they're required so that the shell doesn't treat the '#' as the start of a comment.

This imports the QuantaStor by Trapper template (items, triggers and a per-host dashboard) and creates a grid-wide QuantaStor Alerts dashboard under Dashboards in Zabbix.

This step is optional in the sense that alerts will still be delivered without it, but until the template is imported they arrive only as a raw JSON payload with no triggers, no entries under Monitoring -> Problems, and no dashboard, so we recommend always running it.

Step 4 - Add the Endpoint to QuantaStor

Login to your QuantaStor storage grid and then select the Alert Manager button in the toolbar to bring up the dialog for adding alert endpoints. On the second page select Zabbix from the dropdown list of ITSM integrations and then input the URL endpoint you assembled in Step 2.

Step 5 - Apply Changes and Test

Apply your changes to add the new endpoint, then use the Generate Test Alert button to verify that everything is configured correctly and that alerts are making it into Zabbix. Note that "INFO" level alerts are not sent to the ITSM modules, so be sure to generate a "WARNING" or "ERROR" level alert for testing.

The first alert from a given storage system creates its host in Zabbix, and the Zabbix server only picks up that new configuration on its next cache reload (up to 60 seconds). The alert handler retries until the alert lands, so the first test alert may take a minute or so to appear.

Viewing Alerts in Zabbix

Alerts can be reviewed in three places:

  • Dashboards -> QuantaStor Alerts - alert counts by severity plus the full alert list across every storage system in the grid.
  • Monitoring -> Problems - the standard Zabbix problem view, filtered however you like.
  • The QuantaStor alerts dashboard on an individual host - the last alert received from that one storage system.

QuantaStor alerts are one-shot events with no automatic recovery condition, so a problem stays open until it is closed by hand. To dismiss an alert use the Update link to the right of it and select Close problem.

What the Integration Creates in Zabbix

Object Name Notes
Host group QuantaStor Holds every storage system reporting into Zabbix
Host One per storage system Named by the storage system's IP address, with the system name as the visible name
Template QuantaStor by Trapper Linked automatically to each host created by the handler
Dashboard QuantaStor Alerts Grid-wide alert dashboard, created by --setup
Template dashboard QuantaStor alerts Per-host view of the most recent alert

Each alert is pushed as a JSON document into the quantastor.alert trapper item, and the template derives the individual fields (title, description, severity, alert type, storage system, timestamp) from it. QuantaStor alert severities map to Zabbix trigger priorities as follows:

QuantaStor severity Zabbix priority
Critical Disaster
Error High
Warning Warning
Info not forwarded