zabbix_export:
version: '6.0'
date: '2021-11-21T21:50:10Z'
groups:
-
uuid: 25fa5e08493744599a03308cfb6ae65e
name: 'VOIP ALL'
templates:
-
uuid: d8cd52f7934d4089921c3d205e752eac
template: 'Cisco AXL License data'
name: 'Cisco AXL License data'
description: |
## Overview
Запрос кол-ва лицензий для Cisco UCM 11.5 через HTTP Agent.
На CUCM необходим application user с правами на чтение AXL.
В шаблоне использованы макросы:
логин для Application user: {$ZABBIX\_APIUSER\_UC}
пароль для Application user: {$ZABBIX\_APIPASS\_UC}
## Author
Yaazard
groups:
-
name: 'VOIP ALL'
items:
-
uuid: 149a2197e1134539bd1837f862cafc7d
name: LicenseList
type: HTTP_AGENT
key: uclicense
delay: 300s
history: '0'
trends: '0'
value_type: TEXT
authtype: BASIC
username: '{$ZABBIX_APIUSER_UC}'
password: '{$ZABBIX_APIPASS_UC}'
timeout: 5s
url: 'https://{HOST.IP}:8443/axl/'
posts: |
SELECT name,value FROM TABLE (FUNCTION LicenseTotals()) (pkid,name,value,UserValue,DeviceValue)
post_type: XML
headers:
-
name: Content-Type
value: text/xml
-
name: SOAPAction
value: 'CUCM:DB ver=11.5 executeSQLQuery'
request_method: POST
tags:
-
tag: Application
value: 'API License monitoring'
-
uuid: 1ac08a84b966473ebf67f04ba9130149
name: Basic
type: DEPENDENT
key: uclicense_basic
delay: '0'
history: 2d
trends: '0'
preprocessing:
-
type: REGEX
parameters:
- '(.*Basic )(\d?)(.*)'
- \2
-
type: JAVASCRIPT
parameters:
- |
value = Number(value)
return value
master_item:
key: uclicense
tags:
-
tag: Application
value: 'API License monitoring'
-
uuid: 965c1390a964490abf876a42d38f3545
name: CUWL
type: DEPENDENT
key: uclicense_cuwl
delay: '0'
history: 2d
trends: '0'
preprocessing:
-
type: REGEX
parameters:
- '(.*CUWL Standard )(\d?)(.*)'
- \2
-
type: JAVASCRIPT
parameters:
- |
value = Number(value)
return value
master_item:
key: uclicense
tags:
-
tag: Application
value: 'API License monitoring'
triggers:
-
uuid: 7dec4c275f3b464bb5f8bd6c694db94a
expression: 'last(/Cisco AXL License data/uclicense_cuwl)>0'
name: 'User have more 2 devices'
priority: WARNING
-
uuid: be7840e263eb42158c84fcb4181d2e72
name: Enhanced
type: DEPENDENT
key: uclicense_Enhanced
delay: '0'
history: 2d
trends: '0'
preprocessing:
-
type: REGEX
parameters:
- '(.*Enhanced\s*)(\d+)(.*)'
- \2
-
type: JAVASCRIPT
parameters:
- |
value = Number(value)
return value
master_item:
key: uclicense
tags:
-
tag: Application
value: 'API License monitoring'
-
uuid: bf624af9c2904a4280df440f0accd445
name: EnhancedPlus
type: DEPENDENT
key: uclicense_enhp
delay: '0'
history: 2d
trends: '0'
preprocessing:
-
type: REGEX
parameters:
- '(.*EnhancedPlus )(\d?)(.*)'
- \2
-
type: JAVASCRIPT
parameters:
- |
value = Number(value)
return value
master_item:
key: uclicense
tags:
-
tag: Application
value: 'API License monitoring'
triggers:
-
uuid: 47d0a24f144848d98c549c4b6fcfe73d
expression: 'last(/Cisco AXL License data/uclicense_enhp)>0'
name: 'User have more 1 devices'
priority: WARNING
-
uuid: 79d67dc34ffe4cfaab482c8dd4797936
name: Essential
type: DEPENDENT
key: uclicense_Essential
delay: '0'
history: 2d
trends: '0'
preprocessing:
-
type: REGEX
parameters:
- '(.*Essential\s* )(\d+)(.*)'
- \2
-
type: JAVASCRIPT
parameters:
- |
value = Number(value)
return value
master_item:
key: uclicense
tags:
-
tag: Application
value: 'API License monitoring'
graphs:
-
uuid: 5b5ca60d72424087ba9bb7ce418c83d2
name: LicenseUsage
graph_items:
-
color: 80FF00
calc_fnc: MAX
item:
host: 'Cisco AXL License data'
key: uclicense_basic
-
sortorder: '1'
color: FF0000
calc_fnc: MAX
item:
host: 'Cisco AXL License data'
key: uclicense_cuwl
-
sortorder: '2'
color: 00FF00
calc_fnc: MAX
item:
host: 'Cisco AXL License data'
key: uclicense_Enhanced
-
sortorder: '3'
color: E53935
calc_fnc: MAX
item:
host: 'Cisco AXL License data'
key: uclicense_enhp
-
sortorder: '4'
color: '666699'
calc_fnc: MAX
item:
host: 'Cisco AXL License data'
key: uclicense_Essential