Source:
Travis CI by HTTP
Overview
For Áú»¢¶Ä²© version: 5.4 and higher
The template to monitor Travis CI by Áú»¢¶Ä²© that work without any external scripts.
Most of the metrics are collected in one go, thanks to Áú»¢¶Ä²© bulk data collection.
This template was tested on:
- Travis CI, version API V3 2021
Setup
See Áú»¢¶Ä²© template operation for basic instructions.
You must set {$TRAVIS.API.TOKEN} and {$TRAVIS.API.URL} macros. {$TRAVIS.API.TOKEN} is a Travis API authentication token located in User -> Settings -> API authentication. {$TRAVIS.API.URL} could be in 2 different variations:
- for a private project : api.travis-ci.com
- for an enterprise projects: api.example.com (where you replace example.com with the domain Travis CI is running on)
Áú»¢¶Ä²© configuration
No specific Áú»¢¶Ä²© configuration is required.
Macros used
Name | Description | Default |
---|---|---|
{$TRAVIS.API.TOKEN} | Travis API Token |
`` |
{$TRAVIS.API.URL} | Travis API URL |
api.travis-ci.com |
{$TRAVIS.BUILDS.SUCCESS.PERCENT} | Percent of successful builds in the repo (for trigger expression) |
80 |
Template links
There are no template links in this template.
Discovery rules
Name | Description | Type | Key and additional info |
---|---|---|---|
Repos metrics discovery | Metrics for Repos statistics. |
DEPENDENT | travis.repos.discovery Preprocessing: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
Items collected
Group | Name | Description | Type | Key and additional info |
---|---|---|---|---|
Travis | Travis: Get health | Getting home JSON using Travis API. |
HTTP_AGENT | travis.get_health Preprocessing: - CHECK_NOT_SUPPORTED ??ON_FAIL: - JAVASCRIPT: |
Travis | Travis: Jobs passed | Total count of passed jobs in all repos. |
DEPENDENT | travis.jobs.total Preprocessing: - JSONPATH: |
Travis | Travis: Jobs active | Active jobs in all repos. |
DEPENDENT | travis.jobs.active Preprocessing: - JSONPATH: ??ON_FAIL: |
Travis | Travis: Jobs in queue | Jobs in queue in all repos. |
DEPENDENT | travis.jobs.queue Preprocessing: - JSONPATH: ??ON_FAIL: |
Travis | Travis: Builds | Total count of builds in all repos. |
DEPENDENT | travis.builds.total Preprocessing: - JSONPATH: |
Travis | Travis: Builds duration | Sum of all builds durations in all repos. |
DEPENDENT | travis.builds.duration Preprocessing: - JSONPATH: ??ON_FAIL: |
Travis | Travis: Repo [{#SLUG}]: Cache files | Count of cache files in {#SLUG} repo. |
DEPENDENT | travis.repo.caches.files[{#SLUG}] Preprocessing: - JSONPATH: |
Travis | Travis: Repo [{#SLUG}]: Cache size | Total size of cache files in {#SLUG} repo. |
DEPENDENT | travis.repo.caches.size[{#SLUG}] Preprocessing: - JSONPATH: ??ON_FAIL: |
Travis | Travis: Repo [{#SLUG}]: Builds passed | Count of all passed builds in {#SLUG} repo. |
DEPENDENT | travis.repo.builds.passed[{#SLUG}] Preprocessing: - JAVASCRIPT: |
Travis | Travis: Repo [{#SLUG}]: Builds failed | Count of all failed builds in {#SLUG} repo. |
DEPENDENT | travis.repo.builds.failed[{#SLUG}] Preprocessing: - JAVASCRIPT: |
Travis | Travis: Repo [{#SLUG}]: Builds total | Count of total builds in {#SLUG} repo. |
DEPENDENT | travis.repo.builds.total[{#SLUG}] Preprocessing: - JSONPATH: |
Travis | Travis: Repo [{#SLUG}]: Builds passed, % | Percent of passed builds in {#SLUG} repo. |
CALCULATED | travis.repo.builds.passed.pct[{#SLUG}] Expression: last(//travis.repo.builds.passed[{#SLUG}])/last(//travis.repo.builds.total[{#SLUG}])*100 |
Travis | Travis: Repo [{#SLUG}]: Description | Description of Travis repo (git project description). |
DEPENDENT | travis.repo.description[{#SLUG}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
Travis | Travis: Repo [{#SLUG}]: Last build duration | Last build duration in {#SLUG} repo. |
DEPENDENT | travis.repo.last_build.duration[{#SLUG}] Preprocessing: - JSONPATH: ??ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
Travis | Travis: Repo [{#SLUG}]: Last build state | Last build state in {#SLUG} repo. |
DEPENDENT | travis.repo.last_build.state[{#SLUG}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
Travis | Travis: Repo [{#SLUG}]: Last build number | Last build number in {#SLUG} repo. |
DEPENDENT | travis.repo.last_build.number[{#SLUG}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
Travis | Travis: Repo [{#SLUG}]: Last build id | Last build id in {#SLUG} repo. |
DEPENDENT | travis.repo.last_build.id[{#SLUG}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
Áú»¢¶Ä²©_raw_items | Travis: Get repos | Getting repos using Travis API. |
HTTP_AGENT | travis.get_repos |
Áú»¢¶Ä²©_raw_items | Travis: Get builds | Getting builds using Travis API. |
HTTP_AGENT | travis.get_builds |
Áú»¢¶Ä²©_raw_items | Travis: Get jobs | Getting jobs using Travis API. |
HTTP_AGENT | travis.get_jobs |
Áú»¢¶Ä²©_raw_items | Travis: Repo [{#SLUG}]: Get builds | Getting builds of {#SLUG} using Travis API. |
HTTP_AGENT | travis.repo.get_builds[{#SLUG}] |
Áú»¢¶Ä²©_raw_items | Travis: Repo [{#SLUG}]: Get caches | Getting caches of {#SLUG} using Travis API. |
HTTP_AGENT | travis.repo.get_caches[{#SLUG}] |
Triggers
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Travis: Service is unavailable | Travis API is unavailable. Please check if the correct macros are set. |
last(/Travis CI by HTTP/travis.get_health)=0 |
HIGH | Manual close: YES |
Travis: Failed to fetch home page (or no data for 30m) | Áú»¢¶Ä²© has not received data for items for the last 30 minutes. |
nodata(/Travis CI by HTTP/travis.get_health,30m)=1 |
WARNING | Manual close: YES |
Travis: Repo [{#SLUG}]: Percent of successful builds are < {$TRAVIS.BUILDS.SUCCESS.PERCENT}% | Low successful builds rate. |
last(/Travis CI by HTTP/travis.repo.builds.passed.pct[{#SLUG}])<{$TRAVIS.BUILDS.SUCCESS.PERCENT} |
WARNING | Manual close: YES |
Travis: Repo [{#SLUG}]: Last build status is 'errored' | Last build status is errored. |
find(/Travis CI by HTTP/travis.repo.last_build.state[{#SLUG}],,"like","errored")=1 |
WARNING | Manual close: YES |
Feedback
Please report any issues with the template at
You can also provide a feedback, discuss the template or ask for help with it at ZABBIX forums.