GitLab plugin
Monitor the CI/CD metrics from your GitLab environment.
How to add the GitLab plugin
To create an API token key:
Access a GitLab account with access to the target projects.
Navigate to https://gitlab.com/-/profile/personal_access_tokens.
Ensure the access is at least
read_api
andread_repository
. Please note,read_user
andread_registry
are optional.Click the Create personal access token button.
Copy the provided API token.
Now use the API token to configure the plugin in SquaredUp Cloud:
In SquaredUp browse to Settings > Plugins > Add plugin and search for the plugin.
Display Name:
Enter a name for your plugin. This helps you to identify this plugin in the list of your plugins.
Instance URL:
Enter a URL if you wish to use your own instance of GitLab.
If you leave this section blank, https://gitlab.com will be used by default.
API Token:
Paste the API token in here.
Leave the checkbox for Automatically create a workspace ticked, this will create a new workspace for this plugin containing out of the box dashboards and scopes.
Optionally, select whether you would like to restrict access to this plugin instance. By default, restricted access is set to off.
Restrict access to this plugin?
The term plugin here really means plugin instance. For example, a user may configure two instances of the AWS plugin, one for their development environment and one for production. In that case, each plugin instance has its own access control settings.
By default, Restrict access to this plugin? is set to off. The plugin can be viewed, edited and administered by anyone. If you would like to control who has access to this plugin, switch Restrict access to this plugin? to on.
Use the Restrict access to this plugin? dropdown to control who has access to the workspace:
By default, the user setting the permissions for the plugin will be given Full Control and the Everyone group will be given Link to workspace permissions.
Tailor access to the plugin, as required, by selecting individual users or user groups from the dropdown and giving them Link to workspace or Full Control permissions.
If the user is not available from the dropdown, you are able to invite them to the plugin by typing in their email address and then clicking Add. The new user will then receive an email inviting them to create an account on SquaredUp Cloud. Once the account has been created, they will gain access to the tenant.
At least one user or group must be given Full Control.
Admin users can edit the configuration, modify the Access Control List (ACL) and delete the plugin, regardless of the ACL chosen.
Plugin access levels
Access Level:
Link to workspace
- User can link the plugin to any workspace they have at least Editor permissions for.
- Data from the plugin can then be viewed by anyone with any access to the workspace.
User can share the plugin data with anyone they want.
User cannot configure the plugin in any way, or delete it.
Full Control - User can change the plugin configuration, ACL, and delete the plugin.
See Access control for more information.
Click Save.
Using the GitLab plugin
Data Streams

A data stream brings you data to answer a specific question like "What's the health state of the objects?", "What kind of alerts are coming from this plugin for my servers?", "What's the average memory usage of this app?"
The magic of data streams is that they standardize data from all the different shapes and formats your tools use into a straightforward tabular format. While creating a tile you can tweak data streams by grouping or aggregating specific columns. Depending on the kind of data, SquaredUp will automatically suggest how to visualize the result, for example as a table or line graph.
There are two types of data streams available for this plugin:
Data streams installed with the plugin
A configurable data stream, see GQL Query
Using Configurable data streams with the GitLab plugin

A configurable data stream allows you to easily create new data streams specific to your needs, by entering information into a form, such as metric names or queries. Configurable data streams have a + before the name, and once new data streams have been created they show in the normal list of data streams.
Any data streams you create can be edited from Settings > Data Streams.
GQL Query
The GitLab plugin allows you to set up configurable data streams for any kind of GQL query. If you need help using GQL, please refer to: GraphQL
Scope to an object that supports a GQL query.
Select + GQL Query from the data stream list.
Enter a Display Name for the new data stream.
Query:
Enter a GQL query.
RowPath:
Optional, focus on results within the GQL query. Target on the array of data that you want to display. For example:
projects.nodes
.Click Save.
This example query shows you how to get the details about the current user, the groups it has access to and the project IDs in those groups.
query{
currentUser{
groups{
nodes
{
projects {
edges {
node {
id
name
}
}
}
fullName
id
}
}
name
id
}
}
You’ll need to inform the cloud platform where the rows start. It must be a value returned as an array, such as edges
(in the above example) or nodes
.
You can use mustache to alter the query with values from the scope.

A mustache parameter is a dynamic value, the actual value will be inserted from the properties of the object(s) in scope.
This data stream supplies scoped objects individually for mustache parameters. When there are multiple objects in scope this plugin will send the query multiple times, once for each object. The results are then displayed together, for example in a single table.
You can use properties of objects and write them in between curly braces e.g {{name}}
to use them as mustache parameters. Whenever you use mustache parameters, you need to use a scope of objects that contain the property you're referencing.
For example, if objects of type "host" have a property called name
, you can use {{name}}
. This will resolve {{name}}
to the value of the name property of the different "host" objects used in the scope.
Comments
0 comments
Please sign in to leave a comment.