Compare commits

...

2 Commits

Author SHA1 Message Date
c3b5196b24 added ds18b20 template 2023-12-14 22:18:11 +03:00
bdbdb4441e added ssl certificates template 2023-12-14 22:17:13 +03:00
5 changed files with 222 additions and 0 deletions

View File

@ -9,6 +9,10 @@ Templates, scripts and hints for Zabbix.
* [VPN](templates/applications/vpn) * [VPN](templates/applications/vpn)
* [OpenVPN](templates/applications/vpn/openvpn/6.0) * [OpenVPN](templates/applications/vpn/openvpn/6.0)
* [Wireguard](templates/applications/vpn/wireguard/6.0) * [Wireguard](templates/applications/vpn/wireguard/6.0)
* [Components](templates/components)
* [certificate](templates/components/certificate/6.0)
* [Sensors](templates/sensors)
* [ds18b20](templates/sensors/ds18b20/6.0)
## Useful links ## Useful links

View File

@ -0,0 +1,46 @@
# SSL certificates
## Overview
This template is designed for [X.509](https://en.wikipedia.org/wiki/X.509) certificate monitoring by Zabbix and requires external script.
## Requirements
- Zabbix version: 6.0 and higher.
- [cert-info.sh](https://git.hmp.today/pavel.muhortov/utils#cert-info-sh)
- [openssl](https://www.openssl.org/)
## Tested versions
This template has been tested on:
- openssl 1.0.2k
### Macros used
|Name|Description|Default|
|----|-----------|-------|
|{$URL}|Certificate location|`host.domain.zone`|
### Items
|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Expires|Certificate remaining days|External check|cert-info.sh["{$URL}","-r"]|
### Triggers
|Name|Description|Expression|Severity|Dependencies and additional info|
|----|-----------|----------|--------|--------------------------------|
|SSL certificate expires||last(/SSL certificates/cert-info.sh["{$URL}","-r"],#1)<7|Warning|Manual close: No|
|SSL certificate expires soon||last(/SSL certificates/cert-info.sh["{$URL}","-r"],#1)<3|Average|Manual close: No|
|SSL certificate expired||last(/SSL certificates/cert-info.sh["{$URL}","-r"],#1)<1|High|Manual close: No|
### Discovery rules
There are no discovery rules in this template.
### Item prototypes for Clients discovery
There are no item prototypes in this template.

View File

@ -0,0 +1,66 @@
zabbix_export:
version: '6.0'
date: '2023-12-14T18:00:00Z'
groups:
-
uuid: 57b7ae836ca64446ba2c296389c009b7
name: Templates/Modules
templates:
-
uuid: 83294c6d820c429789f8256ca0654ff3
template: 'SSL certificates'
name: 'SSL certificates'
description: 'SSL certificates information'
groups:
-
name: Templates/Modules
items:
-
uuid: 5974a58a626c451b86ccfbf062ad1539
name: Expires
type: EXTERNAL
key: 'cert-info.sh["{$URL}","-r"]'
delay: 6h
history: 14d
trends: 90d
units: day
tags:
-
tag: component
value: certificate
triggers:
-
uuid: 0de5c427901f4ff8993a547bedf5ff22
expression: 'last(/SSL certificates/cert-info.sh["{$URL}","-r"],#1)<1'
name: 'SSL certificate expired'
priority: HIGH
-
uuid: 1cb9a236e3cb4eafb95d425e5746da61
expression: 'last(/SSL certificates/cert-info.sh["{$URL}","-r"],#1)<7'
name: 'SSL certificate expires'
priority: WARNING
-
uuid: 61a2ed70a8ce4e49bc2b5d4798b1bb01
expression: 'last(/SSL certificates/cert-info.sh["{$URL}","-r"],#1)<3'
name: 'SSL certificate expires soon'
priority: AVERAGE
tags:
-
tag: component
value: certificate
macros:
-
macro: '{$URL}'
value: host.domain.zone
graphs:
-
uuid: 7b84a25da6d940f183edbd5a1b057e24
name: Expires
show_triggers: 'NO'
graph_items:
-
drawtype: GRADIENT_LINE
color: 00FF00
item:
host: 'SSL certificates'
key: 'cert-info.sh["{$URL}","-r"]'

View File

@ -0,0 +1,45 @@
# Sensors ds18b20 by SSH
## Overview
This template is designed for [ds18b20](https://www.analog.com/media/en/technical-documentation/data-sheets/ds18b20.pdf) sensor monitoring by Zabbix and requires external script.
## Requirements
- Zabbix version: 6.0 and higher.
- [ds18b20-over-ssh.sh](https://git.hmp.today/pavel.muhortov/utils#ds18b20-over-ssh-sh)
## Tested versions
This template has been tested on:
- sshpass 1.0.9
### Macros used
|Name|Description|Default|
|----|-----------|-------|
|{$HOST}|ssh host|`host.domain.zone`|
|{$PORT}|ssh port|`22`|
|{$USER}|ssh username|`root`|
|{$PASS}|ssh password|`password`|
|{$NODE}|ds18b20 node|`28-0a1b2c3d4e5f`|
### Items
|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Temperature|ds18b20 sensor value|External check|ds18b20-over-ssh.sh["{$HOST}","{$PORT}","{$USER}","{$PASS}","{$NODE}"]|
### Triggers
There are no triggers in this template.
### Discovery rules
There are no discovery rules in this template.
### Item prototypes for Clients discovery
There are no item prototypes in this template.

View File

@ -0,0 +1,61 @@
zabbix_export:
version: '6.0'
date: '2023-12-14T18:00:00Z'
groups:
-
uuid: 57b7ae836ca64446ba2c296389c009b7
name: Templates/Modules
templates:
-
uuid: 319aac2db295472bbf0e9e7acd7bd090
template: 'Sensors ds18b20 by SSH'
name: 'Sensors ds18b20 by SSH'
description: 'Get ds18b20 sensor value over SSH'
groups:
-
name: Templates/Modules
items:
-
uuid: 3b2158a480c048689f709bfd457b0464
name: Temperature
type: EXTERNAL
key: 'ds18b20-over-ssh.sh["{$HOST}","{$PORT}","{$USER}","{$PASS}","{$NODE}"]'
delay: 5m
value_type: FLOAT
units: C
tags:
-
tag: Sensor
value: ds18b20
tags:
-
tag: Sensor
value: ds18b20
macros:
-
macro: '{$HOST}'
value: host.domain.zone
-
macro: '{$NODE}'
value: 28-0a1b2c3d4e5f
-
macro: '{$PASS}'
value: password
-
macro: '{$PORT}'
value: '22'
-
macro: '{$USER}'
value: root
graphs:
-
uuid: 8160100b5a1f4a5280415ce427db71e5
name: Temperature
show_triggers: 'NO'
graph_items:
-
drawtype: GRADIENT_LINE
color: 00BFFF
item:
host: 'Sensors ds18b20 by SSH'
key: 'ds18b20-over-ssh.sh["{$HOST}","{$PORT}","{$USER}","{$PASS}","{$NODE}"]'