forked from zabbix/community-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Gitlab update check README and template files
- Loading branch information
Showing
2 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
Applications/Gitlab/template_gitlab_update_check/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | |
49 changes: 49 additions & 0 deletions
49
Applications/Gitlab/template_gitlab_update_check/zabbix_template_gitlab_update_check.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |