<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Документация Proto Observability Platform – GitLab Runner</title><link>/docs/tags/gitlab-runner/</link><description>Recent content in GitLab Runner on Документация Proto Observability Platform</description><generator>Hugo -- gohugo.io</generator><language>ru</language><atom:link href="/docs/tags/gitlab-runner/index.xml" rel="self" type="application/rss+xml"/><item><title>Instrumentation: Мониторинг GitLab Runner с помощью Proto Observability</title><link>/docs/instrumentation/infra/cicd/gitlab-runner/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/instrumentation/infra/cicd/gitlab-runner/</guid><description>
&lt;p>На этой странице:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="#%D1%87%D1%82%D0%BE-%D1%81%D0%BE%D0%B1%D0%B8%D1%80%D0%B0%D0%B5%D1%82-%D0%B8%D0%BD%D1%82%D0%B5%D0%B3%D1%80%D0%B0%D1%86%D0%B8%D1%8F">Что собирает интеграция&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%D1%82%D1%80%D0%B5%D0%B1%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F">Требования&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%D1%88%D0%B0%D0%B3-1-%D0%B2%D0%BA%D0%BB%D1%8E%D1%87%D0%B8%D1%82%D1%8C-%D1%8D%D0%BD%D0%B4%D0%BF%D0%BE%D0%B8%D0%BD%D1%82-%D0%BC%D0%B5%D1%82%D1%80%D0%B8%D0%BA-%D0%B2-gitlab-runner">Шаг 1: Включить эндпоинт метрик в GitLab Runner&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%D1%88%D0%B0%D0%B3-2-%D0%BD%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B8%D1%82%D1%8C-%D0%B8%D0%BD%D1%82%D0%B5%D0%B3%D1%80%D0%B0%D1%86%D0%B8%D1%8E-%D0%B2-protoobp-%D0%B0%D0%B3%D0%B5%D0%BD%D1%82%D0%B5">Шаг 2: Настроить интеграцию в ProtoOBP Агенте&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%D1%88%D0%B0%D0%B3-3-%D0%BF%D0%B5%D1%80%D0%B5%D0%B7%D0%B0%D0%BF%D1%83%D1%81%D0%BA-%D0%B8-%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0">Шаг 3: Перезапуск и проверка&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%D1%81%D0%B1%D0%BE%D1%80-%D0%BB%D0%BE%D0%B3%D0%BE%D0%B2-gitlab-runner">Сбор логов GitLab Runner&lt;/a>
&lt;ul>
&lt;li>&lt;a href="#%D1%88%D0%B0%D0%B3-1-%D0%B2%D0%BA%D0%BB%D1%8E%D1%87%D0%B8%D1%82%D1%8C-%D1%81%D0%B1%D0%BE%D1%80-%D0%BB%D0%BE%D0%B3%D0%BE%D0%B2-%D0%B2-%D0%B0%D0%B3%D0%B5%D0%BD%D1%82%D0%B5">Шаг 1: Включить сбор логов в агенте&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%D1%88%D0%B0%D0%B3-2-%D0%B4%D0%B0%D1%82%D1%8C-%D0%B0%D0%B3%D0%B5%D0%BD%D1%82%D1%83-%D0%B4%D0%BE%D1%81%D1%82%D1%83%D0%BF-%D0%BA-syslog">Шаг 2: Дать агенту доступ к syslog&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%D1%88%D0%B0%D0%B3-3-%D0%BD%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B8%D1%82%D1%8C-%D1%84%D0%B0%D0%B9%D0%BB%D0%BE%D0%B2%D1%8B%D0%B9-%D0%B8%D1%81%D1%82%D0%BE%D1%87%D0%BD%D0%B8%D0%BA-%D0%B4%D0%BB%D1%8F-gitlab-runner">Шаг 3: Настроить файловый источник для GitLab Runner&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%D1%88%D0%B0%D0%B3-4-%D0%BF%D0%B5%D1%80%D0%B5%D0%B7%D0%B0%D0%BF%D1%83%D1%81%D1%82%D0%B8%D1%82%D1%8C-%D0%B0%D0%B3%D0%B5%D0%BD%D1%82-%D0%B8-%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%B8%D1%82%D1%8C">Шаг 4: Перезапустить агент и проверить&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="что-собирает-интеграция">Что собирает интеграция&lt;/h2>
&lt;p>ProtoOBP Агент скрейпит Prometheus-эндпоинт GitLab Runner (&lt;code>/metrics&lt;/code>) и публикует метрики с префиксом &lt;code>gitlab_runner.*&lt;/code>. Основные группы:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Группа&lt;/th>
&lt;th>Метрики&lt;/th>
&lt;th>Что показывают&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Джобы и сборки&lt;/td>
&lt;td>&lt;code>gitlab_runner.gitlab_runner_jobs&lt;/code>, &lt;code>gitlab_runner.ci_runner_builds&lt;/code>, &lt;code>gitlab_runner.gitlab_runner_errors_total&lt;/code>&lt;/td>
&lt;td>Текущее число джобов, ошибки runner&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Autoscaling (Docker Machine)&lt;/td>
&lt;td>&lt;code>gitlab_runner.gitlab_runner_autoscaling_machine_states&lt;/code>, &lt;code>gitlab_runner.gitlab_runner_autoscaling_machine_creation_duration_seconds&lt;/code>&lt;/td>
&lt;td>Состояния и время создания виртуальных машин&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Версия&lt;/td>
&lt;td>&lt;code>gitlab_runner.gitlab_runner_version_info&lt;/code>&lt;/td>
&lt;td>Версия и build runner для инвентаризации&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Go runtime&lt;/td>
&lt;td>&lt;code>gitlab_runner.go_*&lt;/code>, &lt;code>gitlab_runner.process_*&lt;/code>&lt;/td>
&lt;td>Память, GC, FD, CPU самого процесса runner&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Полный список метрик задаётся параметром &lt;code>init_config.allowed_metrics&lt;/code> (см. ниже).&lt;/p>
&lt;h2 id="требования">Требования&lt;/h2>
&lt;ul>
&lt;li>Установленный ProtoOBP Агент (версия 7.x или новее) на хосте, где работает GitLab Runner&lt;/li>
&lt;li>GitLab Runner с правами на правку &lt;code>/etc/gitlab-runner/config.toml&lt;/code> и перезапуск службы&lt;/li>
&lt;/ul>
&lt;h2 id="шаг-1-включить-эндпоинт-метрик-в-gitlab-runner">Шаг 1: Включить эндпоинт метрик в GitLab Runner&lt;/h2>
&lt;p>В файле &lt;code>/etc/gitlab-runner/config.toml&lt;/code> на верхнем уровне (до блоков &lt;code>[session_server]&lt;/code> и &lt;code>[[runners]]&lt;/code>) добавьте параметр &lt;code>listen_address&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-toml" data-lang="toml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">concurrent&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">check_interval&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">listen_address&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;127.0.0.1:9252&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">session_server&lt;/span>&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000;font-weight:bold">...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">[[&lt;/span>&lt;span style="color:#000">runners&lt;/span>&lt;span style="color:#000;font-weight:bold">]]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000;font-weight:bold">...&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Параметр&lt;/th>
&lt;th>Описание&lt;/th>
&lt;th>Пример&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>listen_address&lt;/code>&lt;/td>
&lt;td>Адрес и порт, на которых runner экспонирует Prometheus-метрики и pprof-эндпоинты&lt;/td>
&lt;td>&lt;code>127.0.0.1:9252&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Используйте &lt;code>127.0.0.1&lt;/code>, если агент работает на том же хосте — это исключает доступ к метрикам и pprof извне. Если агент на отдельной машине, укажите внутренний интерфейс (например, &lt;code>10.0.0.5:9252&lt;/code>) и настройте firewall.&lt;/p>
&lt;p>Перезапустите GitLab Runner, чтобы применить изменения:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>sudo systemctl restart gitlab-runner
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Внимание&lt;/h4>
Перезапуск runner прерывает выполняющиеся в данный момент CI-джобы. Подберите момент простоя или сначала переведите runner в состояние pause через GitLab UI.
&lt;/div>
&lt;p>Проверьте, что эндпоинт отвечает:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>curl -s http://127.0.0.1:9252/metrics &lt;span style="color:#000;font-weight:bold">|&lt;/span> head
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>В выводе должны быть строки вида &lt;code>gitlab_runner_version_info{...}&lt;/code> и &lt;code>gitlab_runner_jobs{...}&lt;/code>.&lt;/p>
&lt;h2 id="шаг-2-настроить-интеграцию-в-protoobp-агенте">Шаг 2: Настроить интеграцию в ProtoOBP Агенте&lt;/h2>
&lt;p>Создайте/отредактируйте файл &lt;code>/etc/protoobp-agent/conf.d/gitlab_runner.d/conf.yaml&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87;font-weight:bold">init_config&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">allowed_metrics&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">ci_runner_builds&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">ci_runner_errors&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">gitlab_runner_autoscaling_machine_creation_duration_seconds&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">gitlab_runner_autoscaling_machine_states&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">gitlab_runner_errors_total&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">gitlab_runner_jobs&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">gitlab_runner_version_info&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">go_gc_duration_seconds&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">go_goroutines&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">go_memstats_alloc_bytes&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">go_memstats_alloc_bytes_total&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">go_memstats_heap_alloc_bytes&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">go_memstats_heap_inuse_bytes&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">go_memstats_heap_objects&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">go_memstats_sys_bytes&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">process_cpu_seconds_total&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">process_max_fds&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">process_open_fds&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">process_resident_memory_bytes&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">process_start_time_seconds&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">process_virtual_memory_bytes&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">instances&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#204a87;font-weight:bold">prometheus_endpoint&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">http://127.0.0.1:9252/metrics&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">gitlab_url&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">https://gitlab.example.com/&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">tags&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">env:prod&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">component:ci-runner&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Параметр&lt;/th>
&lt;th>Описание&lt;/th>
&lt;th>Пример&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>init_config.allowed_metrics&lt;/code>&lt;/td>
&lt;td>Список метрик, которые агент скрейпит с эндпоинта &lt;code>listen_address&lt;/code>. Метрики не из списка отбрасываются&lt;/td>
&lt;td>см. пример выше&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>instances[].prometheus_endpoint&lt;/code>&lt;/td>
&lt;td>URL эндпоинта &lt;code>/metrics&lt;/code> GitLab Runner&lt;/td>
&lt;td>&lt;code>http://127.0.0.1:9252/metrics&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>instances[].gitlab_url&lt;/code>&lt;/td>
&lt;td>URL GitLab Master, по которому интеграция выполняет health-check&lt;/td>
&lt;td>&lt;code>https://gitlab.example.com/&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>instances[].tags&lt;/code>&lt;/td>
&lt;td>Дополнительные теги, добавляемые ко всем метрикам (опционально)&lt;/td>
&lt;td>&lt;code>env:prod&lt;/code>, &lt;code>component:ci-runner&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Полный список параметров (proxy, label_joins, labels_mapper, type_overrides и т. д.) есть в &lt;code>/etc/protoobp-agent/conf.d/gitlab_runner.d/conf.yaml.example&lt;/code>.&lt;/p>
&lt;h2 id="шаг-3-перезапуск-и-проверка">Шаг 3: Перезапуск и проверка&lt;/h2>
&lt;p>Перезапустите ProtoOBP Агент:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>sudo systemctl restart protoobp-agent
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Убедитесь, что чек запустился успешно:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>sudo protoobp-agent status
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>В выводе в разделе &lt;code>Running Checks&lt;/code> должна быть запись &lt;code>gitlab_runner&lt;/code> со статусом &lt;code>[OK]&lt;/code> и ненулевым &lt;code>Metric Samples&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span> gitlab_runner (3.3.1)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ---------------------
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Instance ID: gitlab_runner:xxxxxxxxxxxxxxxx [OK]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Configuration Source: file:/etc/protoobp-agent/conf.d/gitlab_runner.d/conf.yaml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Total Runs: 4
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Metric Samples: Last Run: 60, Total: 240
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Чтобы посмотреть конкретные метрики, которые отдаёт интеграция в данный момент, запустите чек вручную:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>sudo protoobp-agent check gitlab_runner
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>После этого метрики &lt;code>gitlab_runner.*&lt;/code> доступны в веб-интерфейсе Proto Observability Platform — раздел &lt;strong>Metrics Explorer&lt;/strong>. Постройте дашборд: например, график &lt;code>gitlab_runner.gitlab_runner_jobs&lt;/code> покажет загрузку runner, а &lt;code>gitlab_runner.gitlab_runner_errors_total&lt;/code> — динамику ошибок.&lt;/p>
&lt;h2 id="сбор-логов-gitlab-runner">Сбор логов GitLab Runner&lt;/h2>
&lt;p>Метрики дают только агрегированную картину. Чтобы видеть подробности конкретных джобов, событий запуска/остановки и ошибок, дополнительно настройте сбор логов GitLab Runner.&lt;/p>
&lt;p>GitLab Runner работает как systemd-юнит &lt;code>gitlab-runner.service&lt;/code> и пишет логи в journald. На большинстве дистрибутивов с rsyslog (Ubuntu/Debian) journald автоматически дублирует записи в &lt;code>/var/log/syslog&lt;/code>. Поэтому логи runner собираются файловым источником ProtoOBP Агента, который читает &lt;code>/var/log/syslog&lt;/code> и фильтрует строки нужного юнита.&lt;/p>
&lt;p>Общая инструкция по получению логов в Proto Observability Platform приведена в разделе &lt;a href="../../../logs/data-ingestion/">Получение логов от внешних источников&lt;/a>. Ниже — полная пошаговая настройка специально для GitLab Runner.&lt;/p>
&lt;h3 id="шаг-1-включить-сбор-логов-в-агенте">Шаг 1: Включить сбор логов в агенте&lt;/h3>
&lt;p>В файле &lt;code>/etc/protoobp-agent/protoobp.yaml&lt;/code> включите сбор логов и укажите адрес ProtoOBP Backend:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87;font-weight:bold">logs_enabled&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">true&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">logs_config&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">logs_pobp_url&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">&amp;lt;protoobp-address&amp;gt;:443&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">logs_no_ssl&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">false&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Параметр&lt;/th>
&lt;th>Описание&lt;/th>
&lt;th>Пример&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>logs_enabled&lt;/code>&lt;/td>
&lt;td>Глобальный флаг включения сбора логов&lt;/td>
&lt;td>&lt;code>true&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>logs_config.logs_pobp_url&lt;/code>&lt;/td>
&lt;td>Адрес ProtoOBP Backend с портом (без схемы)&lt;/td>
&lt;td>&lt;code>protoobp-address:443&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>logs_config.logs_no_ssl&lt;/code>&lt;/td>
&lt;td>&lt;code>false&lt;/code> для порта 443 (HTTPS), &lt;code>true&lt;/code> для 80 (HTTP)&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Если HTTP-доступ к Backend идёт по порту 80, конфиг будет таким:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87;font-weight:bold">logs_enabled&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">true&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">logs_config&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">logs_pobp_url&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">&amp;lt;protoobp-address&amp;gt;:80&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">logs_no_ssl&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">true&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="шаг-2-дать-агенту-доступ-к-syslog">Шаг 2: Дать агенту доступ к syslog&lt;/h3>
&lt;p>Файл &lt;code>/var/log/syslog&lt;/code> принадлежит группе &lt;code>adm&lt;/code>. Добавьте пользователя агента (&lt;code>pobp-agent&lt;/code>) в эту группу, иначе агент не сможет открыть файл на чтение:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>sudo usermod -aG adm pobp-agent
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Проверьте:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>id pobp-agent
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># uid=111(pobp-agent) gid=111(pobp-agent) groups=111(pobp-agent),4(adm),...&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="шаг-3-настроить-файловый-источник-для-gitlab-runner">Шаг 3: Настроить файловый источник для GitLab Runner&lt;/h3>
&lt;p>В файл &lt;code>/etc/protoobp-agent/conf.d/gitlab_runner.d/conf.yaml&lt;/code> (тот же, в котором уже описан &lt;code>init_config + instances&lt;/code> для метрик) добавьте блок &lt;code>logs:&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87;font-weight:bold">init_config&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">allowed_metrics&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#8f5902;font-style:italic"># ... (оставьте как настроено в шаге 2 раздела «Шаг 2: Настроить интеграцию в ProtoOBP Агенте»)&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">instances&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#204a87;font-weight:bold">prometheus_endpoint&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">http://127.0.0.1:9252/metrics&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">gitlab_url&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">https://gitlab.example.com/&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">tags&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">env:prod&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">component:ci-runner&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">logs&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#204a87;font-weight:bold">type&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">file&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">path&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">/var/log/syslog&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">service&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">gitlab-runner&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">source&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">gitlab-runner&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">tags&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">env:prod&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">component:ci-runner&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">log_processing_rules&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#204a87;font-weight:bold">type&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">include_at_match&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">include_gitlab_runner&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">pattern&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#4e9a06">&amp;#34; gitlab-runner\\[&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Параметр&lt;/th>
&lt;th>Описание&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>type: file&lt;/code>&lt;/td>
&lt;td>Файловый источник — агент читает построчно&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>path: /var/log/syslog&lt;/code>&lt;/td>
&lt;td>Путь к syslog-файлу, в который rsyslog складывает journald-записи&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>service&lt;/code> / &lt;code>source&lt;/code>&lt;/td>
&lt;td>Значения, по которым логи будут видны в Logs Explorer (&lt;code>service:gitlab-runner&lt;/code>, &lt;code>source:gitlab-runner&lt;/code>)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>tags&lt;/code>&lt;/td>
&lt;td>Дополнительные теги, добавляемые ко всем записям (опционально)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>log_processing_rules.include_at_match&lt;/code>&lt;/td>
&lt;td>Правило фильтрации: оставить только строки, в которых после пробела идёт &lt;code>gitlab-runner[&amp;lt;pid&amp;gt;]:&lt;/code> — то есть записи именно от systemd-юнита &lt;code>gitlab-runner.service&lt;/code>. Все остальные строки syslog отбрасываются&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Почему именно этот шаблон&lt;/h4>
В syslog запись от systemd-юнита имеет вид
&lt;code>2026-05-07T11:50:12+00:00 &amp;lt;hostname&amp;gt; gitlab-runner[110706]: Job succeeded …&lt;/code>.
Шаблон &lt;code>&amp;quot; gitlab-runner\\[&amp;quot;&lt;/code> (пробел + имя юнита + открывающая квадратная скобка) однозначно отделяет такие строки от записей других сервисов и от kernel-сообщений, в которых имя &lt;code>gitlab-runner&lt;/code> может встречаться как часть hostname.
&lt;/div>
&lt;h3 id="шаг-4-перезапустить-агент-и-проверить">Шаг 4: Перезапустить агент и проверить&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>sudo systemctl restart protoobp-agent
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Убедитесь, что источник логов запустился успешно:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>sudo protoobp-agent status
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>В выводе в разделе &lt;code>Logs Agent&lt;/code> должен быть источник &lt;code>gitlab_runner&lt;/code> со статусом &lt;code>Status: OK&lt;/code> и ненулевым &lt;code>BytesRead&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-gdscript3" data-lang="gdscript3">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">Logs&lt;/span> &lt;span style="color:#000">Agent&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">==========&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">Reliable&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#000">Sending&lt;/span> &lt;span style="color:#000">uncompressed&lt;/span> &lt;span style="color:#000">logs&lt;/span> &lt;span style="color:#204a87;font-weight:bold">in&lt;/span> &lt;span style="color:#000">HTTP&lt;/span> &lt;span style="color:#000">to&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">&amp;lt;&lt;/span>&lt;span style="color:#000">protoobp&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">-&lt;/span>&lt;span style="color:#000">address&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">&amp;gt;&lt;/span> &lt;span style="color:#000">on&lt;/span> &lt;span style="color:#000">port&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">443&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">BytesSent&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">350&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">EncodedBytesSent&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">350&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">LogsProcessed&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">LogsSent&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">gitlab_runner&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">-------------&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">-&lt;/span> &lt;span style="color:#000">Type&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#000">file&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#c00;font-weight:bold">Path&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">/&lt;/span>&lt;span style="color:#204a87;font-weight:bold">var&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">/&lt;/span>&lt;span style="color:#204a87">log&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">/&lt;/span>&lt;span style="color:#000">syslog&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">Service&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#000">gitlab&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">-&lt;/span>&lt;span style="color:#000">runner&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">Source&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#000">gitlab&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">-&lt;/span>&lt;span style="color:#000">runner&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">Status&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#000">OK&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">BytesRead&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">60821&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Если runner идлится и реальные джобы не запускаются, можно подбросить тестовую запись для проверки end-to-end:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>logger -t &lt;span style="color:#4e9a06">&amp;#34;gitlab-runner[99999]&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;TEST: protoobp-agent log pipeline check&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Через несколько секунд счётчик &lt;code>LogsProcessed&lt;/code> увеличится на 1, а в Logs Explorer по фильтру &lt;code>service:gitlab-runner&lt;/code> появится запись с текстом &lt;code>TEST: …&lt;/code>.&lt;/p>
&lt;p>После прохождения теста реальные логи GitLab Runner (запуск/остановка джобов, ошибки runner, отправка логов в координатор) автоматически попадают в Logs Explorer. Полезные запросы для дашбордов:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Запрос в Logs Explorer&lt;/th>
&lt;th>Что показывает&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>service:gitlab-runner&lt;/code>&lt;/td>
&lt;td>Все логи runner&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>service:gitlab-runner &amp;quot;Job succeeded&amp;quot;&lt;/code>&lt;/td>
&lt;td>Успешно завершённые джобы&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>service:gitlab-runner &amp;quot;Job failed&amp;quot;&lt;/code>&lt;/td>
&lt;td>Упавшие джобы&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>service:gitlab-runner &amp;quot;Configuration loaded&amp;quot;&lt;/code>&lt;/td>
&lt;td>События старта/перезагрузки конфигурации runner&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table></description></item></channel></rss>