title: GitLab: SSH keys
agents: gitlab
catalog: app/gitlab
license: MIT
distribution: check_mk
description:
 Instance-wide SSH key statistics: the number of active vs. expired keys and a
 breakdown by key type (rsa, ed25519, ecdsa, dsa, ...), aggregated over all
 users. Deprecated key types (DSA by default; RSA can be added) and RSA keys
 below a configurable minimum size are flagged with configurable states.
 Optional upper levels on the number of expired keys are available. Configure via
 the rule "GitLab SSH keys".

 GitLab has no bulk "all SSH keys" API, so the agent lists all users and reads
 each user's keys (GET /users/:id/keys). This needs an administrator token, is
 meant for self-hosted instances and can be slow on very large ones; it should
 not be enabled against gitlab.com. Only key metadata is collected, not the key
 material.

discovery:
 One service is created when SSH key information is returned.
