Skip to main content

Command Palette

Search for a command to run...

Monitoror - Gitlab

Published
โ€ข1 min read
Monitoror - Gitlab
V

๐Ÿš€ AWSome Devops | AWS Community Builder | AWS SA || โ˜๏ธ CloudOpz โ˜๏ธ

This post describes how to add gitlab pipeline jobs to monitoror dashboard

Alt Text

GITLAB-PIPELINE

Add configs to env

MO_CONFIG_GITLAB=/monitoror/config_gitlab.json
MO_MONITORABLE_GITLAB_URL=https://gitlab.com
MO_MONITORABLE_GITLAB_TOKEN=GwLzYzJh4bezFctgwQDY
MO_MONITORABLE_GITLAB_TIMEOUT=5000
How to generate gitlab token

Create config_gitlab.json

  • Group a project as a tile group and branches are its element

  • Add HTTP-RAW for site demo to monitoring its version (meta.txt)

{
   "version":"2.0",
   "columns":2,
   "tiles":[
      {
         "type":"GROUP",
         "label":"MyProject - CI Jobs Running",
         "rowSpan":4,
         "tiles":[
            {
               "type":"GITLAB-PIPELINE",
               "label":"MyProject",
               "params":{
                  "projectId":21808445,
                  "ref":"master"
               }
            },
            {
               "type":"GITLAB-PIPELINE",
               "label":"MyProject",
               "params":{
                  "projectId":144,
                  "ref":"develop"
               }
            }
         ]
      },
      {
         "type":"GROUP",
         "label":"Serverless - CI Jobs Running",
         "rowSpan":4,
         "tiles":[
            {
               "type":"GITLAB-PIPELINE",
               "label":"Serverless",
               "params":{
                  "projectId":167,
                  "ref":"master"
               }
            },
            {
               "type":"GITLAB-PIPELINE",
               "label":"Serverless",
               "params":{
                  "projectId":167,
                  "ref":"develop"
               }
            }
         ]
      }
   ]
}

Ref: https://github.com/vumdao/monitoror-gitlab

Generate config_gitlab.json with multiple projects and multiple branches

  • Use script to auto generate python gen_conf.py

    Alt Text

More from this blog

V

Vu Dao

102 posts

๐Ÿš€ AWSome Devops | AWS Community Builder | AWS SA || โ˜๏ธ SimflexCloud โ˜๏ธ