Compare commits

..

No commits in common. "e8b33e669cbb8ac72643b29b42a3b58256db9a6f" and "de9c13683eaea0580aac129384b9c603905c60e1" have entirely different histories.

13 changed files with 8 additions and 321 deletions

View File

@ -5,7 +5,6 @@ Templates, scripts and hints for Zabbix.
## [Templates](templates)
* [Applications](templates/applications)
* [Asterisk](templates/applications/asterisk/6.0)
* [check.business.ru](templates/applications/check.business.ru/6.0)
* [MiniDLNA](templates/applications/minidlna/6.0)
* [VPN](templates/applications/vpn)
@ -14,7 +13,6 @@ Templates, scripts and hints for Zabbix.
* [Components](templates/components)
* [certificate](templates/components/certificate/6.0)
* [dns availability](templates/components/dns-availability/6.0)
* [http availability](templates/components/http-availability/6.0)
* [network availability](templates/components/network-availability/6.0)
* [Sensors](templates/sensors)
* [ds18b20](templates/sensors/ds18b20/6.0)

View File

@ -1,65 +0,0 @@
# Asterisk by HTTP - TSP network check
## Overview
This template is designed for Asterisk custom web-page parse by HTTP agent and doesn't require any external scripts.
Custom web-page request:
```shell
curl http://asterisk/network_check.php
```
Custom web-page response:
```json
{"providers":[{"name":"tsp-1","last_check":"2001-01-01 01:01:01"},{"name":"tsp-2","last_check":"2002-02-02 02:02:02"}]}
```
## Requirements
- Zabbix version: 6.0 and higher.
## Tested versions
This template has been tested on:
- [Debian GNU/Linux 12](http://ftp.debian.org/debian/dists/bookworm/)
### Macros used
|Name|Description|Default|
|----|-----------|-------|
|{$TSP.AVAIL.DEADLINE}|Availability deadline in seconds|`900`|
|{$TSP.STATUS.PATH}|path to custom web-page|`http://asterisk/network_check.php`|
|{$TSP.DESCRIPTION.<TSP_NAME>}|trigger operational data info||
### Items
|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Asterisk TSP: Get stats|-|HTTP agent|asterisk.tsp.get_status|
### Triggers
There are no triggers in this template.
### Discovery rules
|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Discovery Asterisk TSP|-|Dependent item|get.asterisk.tsp.stats|
### Item prototypes
|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Asterisk TSP "{#TSP_NAME}" last success check|-|Dependent item|asterisk.tsp.last_check.name[{#TSP_NAME}]|
|Asterisk TSP "{#TSP_NAME}" last success check timestamp|-|Dependent item|asterisk.tsp.last_check.timestamp.name[{#TSP_NAME}]|
### Trigger prototypes
|Name|Description|Expression|Severity|Dependencies and additional info|
|----|-----------|----------|--------|--------------------------------|
|Asterisk TSP "{#TSP_NAME}" not available for {$TSP.AVAIL.DEADLINE} seconds|-|last(/Asterisk by HTTP - TSP network check/asterisk.tsp.last_check.name[{#TSP_NAME}],#1)>{$TSP.AVAIL.DEADLINE}|Average|Manual close: No, Operational data: {$TSP.DESCRIPTION.{#TSP_NAME}}|

View File

@ -1,122 +0,0 @@
zabbix_export:
version: '6.0'
date: '2024-06-27T00:00:00Z'
groups:
-
uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
name: Templates/Applications
templates:
-
uuid: ed25bfc3c7e84c8abc484ea208457db3
template: 'Asterisk by HTTP - TSP network check'
name: 'Asterisk by HTTP - TSP network check'
groups:
-
name: Templates/Applications
items:
-
uuid: cdae5f6801b44131b951c5c75071b8bb
name: 'Asterisk TSP: Get stats'
type: HTTP_AGENT
key: asterisk.tsp.get_status
history: 1h
trends: '0'
value_type: TEXT
description: 'Converted Asterisk TSP status to JSON'
preprocessing:
-
type: JAVASCRIPT
parameters:
- 'return value.toUpperCase()'
url: '{$TSP.STATUS.PATH}'
tags:
-
tag: Application
value: Asterisk
-
tag: component
value: raw
discovery_rules:
-
uuid: 3925e2ee2f414dfb8f5ef35a986a14f2
name: 'Discovery Asterisk TSP'
type: DEPENDENT
key: get.asterisk.tsp.stats
delay: '0'
item_prototypes:
-
uuid: e32065344b6042d9ac49a04daa15def1
name: 'Asterisk TSP "{#TSP_NAME}" last success check'
type: DEPENDENT
key: 'asterisk.tsp.last_check.name[{#TSP_NAME}]'
delay: '0'
preprocessing:
-
type: JAVASCRIPT
parameters:
- 'return Math.trunc( (Date.now() - Date.parse(new Date(Date.parse(value)))) / 1000 + 10800 )'
master_item:
key: 'asterisk.tsp.last_check.timestamp.name[{#TSP_NAME}]'
tags:
-
tag: Application
value: Asterisk
-
tag: TSP
value: '{#TSP_NAME}'
trigger_prototypes:
-
uuid: ba610e0de2cd47229376252c90cda88f
expression: 'last(/Asterisk by HTTP - TSP network check/asterisk.tsp.last_check.name[{#TSP_NAME}],#1)>{$TSP.AVAIL.DEADLINE}'
name: 'Asterisk TSP "{#TSP_NAME}" not available for {$TSP.AVAIL.DEADLINE} seconds'
opdata: '{$TSP.DESCRIPTION.{#TSP_NAME}}'
priority: AVERAGE
-
uuid: 86667b8e0f68470eadd229d86a79362a
name: 'Asterisk TSP "{#TSP_NAME}" last success check timestamp'
type: DEPENDENT
key: 'asterisk.tsp.last_check.timestamp.name[{#TSP_NAME}]'
delay: '0'
trends: '0'
value_type: TEXT
preprocessing:
-
type: JSONPATH
parameters:
- '$.PROVIDERS.[?(@.NAME=="{#TSP_NAME}")].LAST_CHECK.first()'
master_item:
key: asterisk.tsp.get_status
tags:
-
tag: Application
value: Asterisk
-
tag: TSP
value: '{#TSP_NAME}'
master_item:
key: asterisk.tsp.get_status
lld_macro_paths:
-
lld_macro: '{#TSP_LAST_CHECK}'
path: $..LAST_CHECK.first()
-
lld_macro: '{#TSP_NAME}'
path: $..NAME.first()
preprocessing:
-
type: STR_REPLACE
parameters:
- PROVIDERS
- data
tags:
-
tag: Application
value: Asterisk
macros:
-
macro: '{$TSP.AVAIL.DEADLINE}'
value: '900'
description: 'Availability deadline in seconds'
-
macro: '{$TSP.STATUS.PATH}'
value: 'http://asterisk/network_check.php'

View File

@ -50,6 +50,6 @@ This template has been tested on:
There are no discovery rules in this template.
### Item prototypes
### Item prototypes for Clients discovery
There are no item prototypes in this template.

View File

@ -47,7 +47,7 @@ This template has been tested on:
|----|-----------|----|-----------------------|
|Clients discovery|The discovery of clients|Dependent item|minidlna.clients.discovery|
### Item prototypes
### Item prototypes for Clients discovery
|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|

View File

@ -52,7 +52,7 @@ There are no macros in this template.
|----|-----------|----|-----------------------|
|Discovery openvpn clients|The discovery of clients|Dependent item|get.ovpn.stats|
### Item prototypes
### Item prototypes for Clients discovery
|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|

View File

@ -39,7 +39,7 @@ There are no triggers in this template.
|----|-----------|----|-----------------------|
|Discovery wireguard clients|The discovery of clients|Dependent item|get.wg.stats|
### Item prototypes
### Item prototypes for Clients discovery
|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|

View File

@ -41,6 +41,6 @@ This template has been tested on:
There are no discovery rules in this template.
### Item prototypes
### Item prototypes for Clients discovery
There are no item prototypes in this template.

View File

@ -59,7 +59,7 @@ This template has been tested on:
There are no discovery rules in this template.
### Item prototypes
### Item prototypes for Clients discovery
There are no item prototypes in this template.

View File

@ -1,43 +0,0 @@
# HTTP availability by Web scenario
## Overview
This template is designed for http availability monitoring by Web scenario and doesn't require any external scripts.
## Requirements
- Zabbix version: 6.0 and higher.
## Tested versions
This template has been tested on:
- [Debian GNU/Linux 12](http://ftp.debian.org/debian/dists/bookworm/)
### Macros used
|Name|Description|Default|
|----|-----------|-------|
|{$PROXY}|define empty if proxy is not used|`http://user:pass@proxy.host.local:3128`|
|{$URL}|path to check availability|`http://target.domain.zone/service/path`|
### Items
There are no items in this template.
### Triggers
|Name|Description|Expression|Severity|Dependencies and additional info|
|----|-----------|----------|--------|--------------------------------|
|HTTP not available for 5m|-|avg(/HTTP availability by Web scenario/web.test.fail[HTTP Service availability],5m)=1|Warning|Manual close: No, Operational data: {$URL} via {$PROXY}|
|HTTP not available for 1h|-|avg(/HTTP availability by Web scenario/web.test.fail[HTTP Service availability],1h)=1|Average|Manual close: No, Operational data: {$URL} via {$PROXY}|
|HTTP not available for 1d|-|avg(/HTTP availability by Web scenario/web.test.fail[HTTP Service availability],1d)=1|High|Manual close: No, Operational data: {$URL} via {$PROXY}|
### Discovery rules
There are no discovery rules in this template.
### Item prototypes
There are no item prototypes in this template.

View File

@ -1,81 +0,0 @@
zabbix_export:
version: '6.0'
date: '2024-06-29T00:00:00Z'
groups:
-
uuid: 57b7ae836ca64446ba2c296389c009b7
name: Templates/Modules
templates:
-
uuid: 6831042824494696b5c6d64b67aa2892
template: 'HTTP availability by Web scenario'
name: 'HTTP availability by Web scenario'
description: 'Get http availability via porxy or not using Web scenario.'
groups:
-
name: Templates/Modules
httptests:
-
uuid: bc496e30a3a441bfb2acb594d40a3d6c
name: 'HTTP Service availability'
agent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36'
http_proxy: '{$PROXY}'
steps:
-
name: Home
url: '{$URL}'
status_codes: '200'
tags:
-
tag: http
value: availability
macros:
-
macro: '{$PROXY}'
value: 'http://user:pass@proxy.host.local:3128'
-
macro: '{$URL}'
value: 'http://target.domain.zone/service/path'
triggers:
-
uuid: ceab5d505a294d8eb4b5a7279abee282
expression: 'avg(/HTTP availability by Web scenario/web.test.fail[HTTP Service availability],1d)=1'
name: 'HTTP not available for 1d'
opdata: '{$URL} via {$PROXY}'
priority: HIGH
-
uuid: b1990a042b524163b308c64e99444736
expression: 'avg(/HTTP availability by Web scenario/web.test.fail[HTTP Service availability],1h)=1'
name: 'HTTP not available for 1h'
opdata: '{$URL} via {$PROXY}'
priority: AVERAGE
-
uuid: 68dd4398e9814a509209d7bdb8130337
expression: 'avg(/HTTP availability by Web scenario/web.test.fail[HTTP Service availability],5m)=1'
name: 'HTTP not available for 5m'
opdata: '{$URL} via {$PROXY}'
priority: WARNING
graphs:
-
uuid: 7091db8ab9a24780a2c92be707102c41
name: 'HTTP availability'
show_triggers: 'NO'
ymin_type_1: FIXED
graph_items:
-
color: 00FF00
item:
host: 'HTTP availability by Web scenario'
key: 'web.test.in[HTTP Service availability,,bps]'
-
sortorder: '1'
color: 00FFFF
item:
host: 'HTTP availability by Web scenario'
key: 'web.test.time[HTTP Service availability,Home,resp]'
-
sortorder: '2'
color: FF0000
item:
host: 'HTTP availability by Web scenario'
key: 'web.test.fail[HTTP Service availability]'

View File

@ -45,7 +45,7 @@ This template has been tested on:
There are no discovery rules in this template.
### Item prototypes
### Item prototypes for Clients discovery
There are no item prototypes in this template.

View File

@ -40,6 +40,6 @@ There are no triggers in this template.
There are no discovery rules in this template.
### Item prototypes
### Item prototypes for Clients discovery
There are no item prototypes in this template.