Skip to content

Commit

Permalink
Added Gitlab update check README and template files
Browse files Browse the repository at this point in the history
  • Loading branch information
PackeTsar committed Dec 12, 2021
1 parent 24c5d6c commit b6ba06e
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 0 deletions.
40 changes: 40 additions & 0 deletions Applications/Gitlab/template_gitlab_update_check/README.md
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 |
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[&quot;{HOSTNAME}&quot;, &quot;{$GITLAB_TOKEN}&quot;]</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)}&lt;&gt;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[&quot;{HOSTNAME}&quot;, &quot;{$GITLAB_TOKEN}&quot;].str(update asap)}=1</expression>
</dependency>
</dependencies>
</trigger>
</triggers>
</item>
</items>
</template>
</templates>
</zabbix_export>

0 comments on commit b6ba06e

Please sign in to comment.