# Mantis BT by HTTP ## Overview This template is designed for the effortless deployment of Mantis BT monitoring by Zabbix via HTTP and doesn't require any external scripts. ## Requirements Zabbix version: 7.0 and higher. ## Tested versions This template has been tested on: - MantisBT 2.22 ## Configuration > Zabbix should be configured according to the instructions in the [Templates out of the box](https://www.zabbix.com/documentation/7.0/manual/config/templates_out_of_the_box) section. ## Setup 1. Generate the API token in Mantis BT. Use this [manual](https://support.mantishub.com/hc/en-us/articles/215787323-Connecting-to-MantisHub-APIs-using-API-Tokens) for detailed instructions. 2. Change values for the {$MANTIS.URL} and {$MANTIS.TOKEN} macros. ### Macros used |Name|Description|Default| |----|-----------|-------| |{$MANTIS.URL}|
MantisBT URL.
|| |{$MANTIS.TOKEN}|MantisBT Token.
|| |{$MANTIS.LLD.FILTER.PROJECTS.MATCHES}|Filter of discoverable projects.
|`.*`| |{$MANTIS.LLD.FILTER.PROJECTS.NOT_MATCHES}|Filter to exclude discovered projects.
|`CHANGE_IF_NEEDED`| |{$MANTIS.HTTP.PROXY}|Proxy for http requests.
|| ### Items |Name|Description|Type|Key and additional info| |----|-----------|----|-----------------------| |Mantis BT: Get projects|Get projects from Mantis BT.
|HTTP agent|mantisbt.get.projects| ### LLD rule Projects discovery |Name|Description|Type|Key and additional info| |----|-----------|----|-----------------------| |Projects discovery|Discovery rule for a Mantis BT projects.
|Dependent item|mantisbt.projects.discovery**Preprocessing**
JSON Path: `$.projects`
Getting project issues.
|HTTP agent|mantisbt.get.issues[{#NAME}]| |Project [{#NAME}]: Total issues|Count of issues in project.
|Dependent item|mantis.project.total_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues.length()`
Count of issues with 'new' status.
|Dependent item|mantis.project.status.new_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.status.name=='new')].length()`
Count of issues with 'resolved' status.
|Dependent item|mantis.project.status.resolved_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.status.name=='resolved')].length()`
Count of issues with 'closed' status.
|Dependent item|mantis.project.status.closed_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.status.name=='closed')].length()`
Count of issues with 'assigned' status.
|Dependent item|mantis.project.status.assigned_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.status.name=='assigned')].length()`
Count of issues with 'feedback' status.
|Dependent item|mantis.project.status.feedback_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.status.name=='feedback')].length()`
Count of issues with 'acknowledged' status.
|Dependent item|mantis.project.status.acknowledged_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.status.name=='acknowledged')].length()`
Count of issues with 'confirmed' status.
|Dependent item|mantis.project.status.confirmed_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.status.name=='confirmed')].length()`
Count of "open" resolution issues.
|Dependent item|mantis.project.resolution.open_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.resolution.name=='open')].length()`
Count of "fixed" resolution issues.
|Dependent item|mantis.project.resolution.fixed_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.resolution.name=='fixed')].length()`
Count of "reopened" resolution issues.
|Dependent item|mantis.project.resolution.reopened_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.resolution.name=='reopened')].length()`
Count of "unable to reproduce" resolution issues.
|Dependent item|mantis.project.resolution.unable_to_reproduce_issues[{#NAME}]**Preprocessing**
JSON Path: `The text is too long. Please see the template.`
Count of "not fixable" resolution issues.
|Dependent item|mantis.project.resolution.not_fixable_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.resolution.name=='not fixable')].length()`
Count of "duplicate" resolution issues.
|Dependent item|mantis.project.resolution.duplicate_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.resolution.name=='duplicate')].length()`
Count of "no change required" resolution issues.
|Dependent item|mantis.project.resolution.no_change_required_issues[{#NAME}]**Preprocessing**
JSON Path: `The text is too long. Please see the template.`
Count of "suspended" resolution issues.
|Dependent item|mantis.project.resolution.suspended_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.resolution.name=='suspended')].length()`
Count of "wont fix" resolution issues.
|Dependent item|mantis.project.resolution.wont_fix_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.resolution.name=='wont fix')].length()`
Count of "feature" severity issues.
|Dependent item|mantis.project.severity.feature_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.severity.name=='feature')].length()`
Count of "trivial" severity issues.
|Dependent item|mantis.project.severity.trivial_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.severity.name=='trivial')].length()`
Count of "text" severity issues.
|Dependent item|mantis.project.severity.text_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.severity.name=='text')].length()`
Count of "tweak" severity issues.
|Dependent item|mantis.project.severity.tweak_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.severity.name=='tweak')].length()`
Count of "minor" severity issues.
|Dependent item|mantis.project.severity.minor_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.severity.name=='minor')].length()`
Count of "major" severity issues.
|Dependent item|mantis.project.severity.major_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.severity.name=='major')].length()`
Count of "crash" severity issues.
|Dependent item|mantis.project.severity.crash_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.severity.name=='crash')].length()`
Count of "block" severity issues.
|Dependent item|mantis.project.severity.block_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.severity.name=='block')].length()`
Count of "none" priority issues.
|Dependent item|mantis.project.priority.none_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.priority.name=='none')].length()`
Count of "low" priority issues.
|Dependent item|mantis.project.priority.low_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.priority.name=='low')].length()`
Count of "normal" priority issues.
|Dependent item|mantis.project.priority.normal_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.priority.name=='normal')].length()`
Count of "high" priority issues.
|Dependent item|mantis.project.priority.high_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.priority.name=='high')].length()`
Count of "urgent" priority issues.
|Dependent item|mantis.project.priority.urgent_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.priority.name=='urgent')].length()`
Count of "immediate" priority issues.
|Dependent item|mantis.project.priority.immediate_issues[{#NAME}]**Preprocessing**
JSON Path: `$.issues[?(@.priority.name=='immediate')].length()`