diff --git a/Applications/Gitlab/template_gitlab_update_check/README.md b/Applications/Gitlab/template_gitlab_update_check/README.md new file mode 100644 index 000000000..a6d0e243e --- /dev/null +++ b/Applications/Gitlab/template_gitlab_update_check/README.md @@ -0,0 +1,40 @@ +# Gitlab Update Check + +## Overview + +Check if a Gitlab server instance is running the latest software version + + + +## Author + +John W Kerns (https://github.com/PackeTsar) + +## Macros used + +|Name|Description|Default|Type| +|----|-----------|-------|----| +|{$GITLAB_TOKEN}| Gitlab personal access token | None | Text macro | + + +## Template links + +There are no template links in this template. + +## Discovery rules + +There are no discovery rules in this template. + +## Items collected + +|Name|Description|Type|Key and additional info| +|----|-----------|----|----| +| Update Status | Status of the Gitlab software (ie: "up-to-date") | `External check` | gitlab_update_check.sh["{HOSTNAME}", "{$GITLAB_TOKEN}"] | + + +## Triggers + +|Name|Description|Expression|Priority| +|----|-----------|----------|--------| +| Gitlab Update Available | A non-critical software update is available | `{gitlab.verticalcomputers.com:gitlab_update_check.sh["{HOSTNAME}", "{$GITLAB_TOKEN}"].str(up-to-date)}<>1` | Warning | +| Gitlab Critical Update Available | A critical software update is available | `{gitlab.verticalcomputers.com:gitlab_update_check.sh["{HOSTNAME}", "{$GITLAB_TOKEN}"].str(update asap)}=1` | High | diff --git a/Applications/Gitlab/template_gitlab_update_check/zabbix_template_gitlab_update_check.xml b/Applications/Gitlab/template_gitlab_update_check/zabbix_template_gitlab_update_check.xml new file mode 100644 index 000000000..a610cb815 --- /dev/null +++ b/Applications/Gitlab/template_gitlab_update_check/zabbix_template_gitlab_update_check.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<zabbix_export> + <version>5.0</version> + <date>2021-12-12T21:21:29Z</date> + <groups> + <group> + <name>Templates</name> + </group> + </groups> + <templates> + <template> + <template>Template Gitlab Update Check</template> + <name>Template Gitlab Update Check</name> + <groups> + <group> + <name>Templates</name> + </group> + </groups> + <items> + <item> + <name>Update Status</name> + <type>EXTERNAL</type> + <key>gitlab_update_check.sh["{HOSTNAME}", "{$GITLAB_TOKEN}"]</key> + <delay>1h</delay> + <trends>0</trends> + <value_type>TEXT</value_type> + <triggers> + <trigger> + <expression>{str(update asap)}=1</expression> + <name>Gitlab Critical Update Available</name> + <priority>HIGH</priority> + </trigger> + <trigger> + <expression>{str(up-to-date)}<>1</expression> + <name>Gitlab Update Available</name> + <priority>WARNING</priority> + <dependencies> + <dependency> + <name>Gitlab Critical Update Available</name> + <expression>{Template Gitlab Update Check:gitlab_update_check.sh["{HOSTNAME}", "{$GITLAB_TOKEN}"].str(update asap)}=1</expression> + </dependency> + </dependencies> + </trigger> + </triggers> + </item> + </items> + </template> + </templates> +</zabbix_export>