{"id":459305,"date":"2025-05-12T09:00:39","date_gmt":"2025-05-12T09:00:39","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=459305"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=459305","title":{"rendered":"<span>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 label \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438\u0437 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 GitLab Runner (job_id, pipeline_id)<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u2014 \u043a\u0430\u043a\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0440\u0435\u0448\u0430\u0435\u043c<\/h3>\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 GitLab CI\/CD \u0441 Kubernetes \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0432\u044f\u0437\u043a\u0443 \u043c\u0435\u0436\u0434\u0443 \u043b\u043e\u0433\u0430\u043c\u0438 \u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 CI job&#8217;\u0430\u043c\u0438 \u0438\u043b\u0438 pipeline&#8217;\u0430\u043c\u0438. \u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043b\u043e\u0433\u0438 \u0438\u0437 \u043f\u043e\u0434\u043e\u0432 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u044d\u0442\u0438\u0445 \u0441\u0432\u044f\u0437\u0443\u044e\u0449\u0438\u0445 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043a\u0438\u00a0<code>job_id<\/code>,\u00a0<code>pipeline_id<\/code>,\u00a0<code>project_name<\/code>\u00a0\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u0437 GitLab Runner \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f VictoriaLogs \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Promtail \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 VictoriaMetrics.<\/p>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c VictoriaLogs, \u0430 \u043d\u0435 Loki<\/h3>\n<ul>\n<li>\n<p><strong>\u041c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a<\/strong>\u00a0\u043f\u043e \u043b\u044e\u0431\u044b\u043c \u043f\u043e\u043b\u044f\u043c \u043b\u043e\u0433\u043e\u0432 (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a job_id \u0438\u043b\u0438 pipeline_id), \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0445\u0435\u043c\u044b. \u0412 Loki \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043a\u0430\u043c\u0438 \u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u0440\u0435\u0437\u043a\u043e\u043c\u0443 \u0440\u043e\u0441\u0442\u0443 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u042d\u043a\u043e\u043d\u043e\u043c\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<\/strong>: \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043a\u0430\u043a ClickHouse \u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u0436\u0430\u0442\u0438\u0435\u043c \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u044a\u0451\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u0432\u00a0<a href=\"https:\/\/docs.victoriametrics.com\/victorialogs\/faq\/#what-is-the-difference-between-victorialogs-and-grafana-loki\" rel=\"noopener noreferrer nofollow\">5\u201310<\/a>\u00a0\u0440\u0430\u0437 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 Loki, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/strong>: \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u044f\u0437\u044b\u043a LogsQL \u0443\u0434\u043e\u0431\u0435\u043d \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438, \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a LogQL \u0432 Loki \u0447\u0430\u0441\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/strong>: \u0442\u0438\u043f\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0434\u043e\u00a0<a href=\"https:\/\/docs.victoriametrics.com\/victorialogs\/faq\/#what-is-the-difference-between-victorialogs-and-grafana-loki\" rel=\"noopener noreferrer nofollow\">1000x<\/a>\u00a0\u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0432 Loki, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044e \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f GitLab Runner \u0432 gitlab.com<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 runner&#8217;\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 GitLab:<\/p>\n<ol>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 GitLab.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435\u00a0<code>Settings -&gt; CI\/CD -&gt; Runners<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u043e\u0431\u0449\u0438\u0435 \u0440\u0430\u043d\u043d\u0435\u0440\u044b<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 registration token.<\/p>\n<\/li>\n<\/ol>\n<p>\u042d\u0442\u043e\u0442 \u0442\u043e\u043a\u0435\u043d \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u043d\u043d\u0435\u0440\u0430 \u0432 \u0432\u0430\u0448\u0435\u043c Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Kubernetes<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 kubernetes \u0447\u0435\u0440\u0435\u0437 terraform<\/p>\n<pre><code>git clone https:\/\/github.com\/patsevanton\/gitlab-job-labels-to-victorialogs export YC_FOLDER_ID='\u0432\u0430\u0448 folder_id' terraform init terraform apply<\/code><\/pre>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 VictoriaLogs<\/h3>\n<pre><code>helm repo add vm https:\/\/victoriametrics.github.io\/helm-charts\/ helm repo update  helm upgrade --install victorialogs vm\/victoria-logs-single \\   --namespace victorialogs --create-namespace \\   --values victorialogs-values.yaml<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, victorialogs \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443\u00a0<a href=\"http:\/\/victorialogs.apatsev.org.ru\" rel=\"noopener noreferrer nofollow\">http:\/\/victorialogs.apatsev.org.ru<\/a><\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 victoria-metrics-k8s-stack<\/h3>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c Helm \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c VictoriaMetrics stack:<\/p>\n<pre><code>helm repo add vm https:\/\/victoriametrics.github.io\/helm-charts\/ helm repo update  helm upgrade --install vmks vm\/victoria-metrics-k8s-stack \\   --namespace vmks --create-namespace \\   --values vmks-values.yaml<\/code><\/pre>\n<p>\u0412 vmks-values.yaml \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0447\u0442\u043e kube-state-metrics, \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044f \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u0440\u0438\u043a ([*]), \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u0434\u0430\u043c\u0438 (pods).<\/p>\n<pre><code>kube-state-metrics:   metricLabelsAllowlist:     - pods=[*]<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0432 values kube-state-metrics \u0438 victoria-metrics-k8s-stack:\u00a0<a href=\"https:\/\/github.com\/prometheus-community\/helm-charts\/blob\/main\/charts\/kube-state-metrics\/values.yaml#L397\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/prometheus-community\/helm-charts\/blob\/main\/charts\/kube-state-metrics\/values.yaml#L397<\/a>\u00a0<a href=\"https:\/\/github.com\/VictoriaMetrics\/helm-charts\/blob\/master\/charts\/victoria-metrics-k8s-stack\/values.yaml#L975C1-L975C19\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/VictoriaMetrics\/helm-charts\/blob\/master\/charts\/victoria-metrics-k8s-stack\/values.yaml#L975C1-L975C19<\/a><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, Grafana \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443\u00a0<a href=\"http:\/\/grafana.apatsev.org.ru\" rel=\"noopener noreferrer nofollow\">http:\/\/grafana.apatsev.org.ru<\/a><\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u044f grafana \u0434\u043b\u044f admin \u044e\u0437\u0435\u0440\u0430<\/p>\n<pre><code>kubectl get secret vmks-grafana -n vmks -o jsonpath='{.data.admin-password}' | base64 --decode<\/code><\/pre>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Promtail<\/h3>\n<pre><code>helm upgrade --install promtail grafana\/promtail \\   --namespace promtail --create-namespace \\   --values promtail-values.yaml<\/code><\/pre>\n<p>\u0424\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Promtail\u00a0<code>promtail-values.yaml<\/code>:<\/p>\n<pre><code>tolerations:   - operator: Exists     effect: NoSchedule config:   clients:     - url: http:\/\/victorialogs-victoria-logs-single-server.victorialogs.svc.cluster.local:9428\/insert\/loki\/api\/v1\/push?_msg_field=msg   snippets:     pipelineStages:       - cri: {}       - labeldrop:           - filename           - node_name     extraRelabelConfigs:       - action: keep         source_labels:           - __meta_kubernetes_namespace         regex: gitlab-runner       - action: replace         source_labels:           - __meta_kubernetes_pod_label_job_id         target_label: job_id       - action: replace         source_labels:           - __meta_kubernetes_pod_label_job_name         target_label: job_name       - action: replace         source_labels:           - __meta_kubernetes_pod_label_pipeline_id         target_label: pipeline_id       - action: replace         source_labels:           - __meta_kubernetes_pod_label_project_id         target_label: project_id       - action: replace         source_labels:           - __meta_kubernetes_pod_label_project_name         target_label: project_name <\/code><\/pre>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 GitLab Runner \u0447\u0435\u0440\u0435\u0437 Helm:<\/h3>\n<pre><code>helm repo add gitlab https:\/\/charts.gitlab.io helm repo update  export RUNNER_TOKEN=\"glrt-xxx.xxxxx\"  # \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0439\u0442\u0435 gitlab-runner \u0442\u043e\u043a\u0435\u043d  helm upgrade --install gitlab-runner gitlab\/gitlab-runner \\   --namespace gitlab-runner --create-namespace \\   --values gitlab-runner-values.yaml \\   --set-string runnerToken=\"$RUNNER_TOKEN\"<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u00a0<code>gitlab-runner-values.yaml<\/code>:<\/p>\n<pre><code>gitlabUrl: \"https:\/\/gitlab.com\/\" runners:   config: |     [[runners]]       [runners.kubernetes]         helper_cpu_request = \"250m\"         helper_memory_limit = \"512Mi\"         [runners.kubernetes.pod_labels]           \"job_name\" = \"${CI_JOB_NAME_SLUG}\"           \"job_id\" = \"${CI_JOB_ID}\"           \"project_name\" = \"${CI_PROJECT_NAME}\"           \"project_id\" = \"${CI_PROJECT_ID}\"           \"pipeline_id\" = \"${CI_PIPELINE_ID}\" metrics:   enabled: true   serviceMonitor:     enabled: true service:   enabled: true rbac:   create: true<\/code><\/pre>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0447\u0442\u043e \u0443 pod \u0435\u0441\u0442\u044c label<\/h4>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0431\u043e\u0440\u043a\u0443 \u043d\u0430 \u044d\u0442\u043e\u043c \u0440\u0430\u043d\u043d\u0435\u0440\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 label \u0414\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a<\/p>\n<pre><code>kubectl get pod -n gitlab-runner --show-labels | grep -E '(job_name|job_id|project_name|project_id|pipeline_id)' runner-sijwob5yi-project-69309276-concurrent-0-7hr533es   2\/2     Running   0          16s     ...,job_id=9895041344,job_name=deploy-job,pipeline_id=1796027502,pod=runner-sijwob5yi-project-69309276-concurrent-0,project_id=69309276,project_name=gitlab-for-job-labels-to-victorialogs runner-sijwob5yi-project-69309276-concurrent-0-pfirp5t5   2\/2     Running   0          49s     ...,job_id=9895041322,job_name=unit-test-job,pipeline_id=1796027502,pod=runner-sijwob5yi-project-69309276-concurrent-0,project_id=69309276,project_name=gitlab-for-job-labels-to-victorialogs runner-sijwob5yi-project-69309276-concurrent-1-85wx1m9n   2\/2     Running   0          44s     ...,job_id=9895041335,job_name=lint-test-job,pipeline_id=1796027502,pod=runner-sijwob5yi-project-69309276-concurrent-1,project_id=69309276,project_name=gitlab-for-job-labels-to-victorialog<\/code><\/pre>\n<h3>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 failed \u0441\u0442\u0440\u043e\u043a \u0432 \u043b\u043e\u0433\u0430\u0445 \u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u043f\u043e\u00a0job_id<\/h3>\n<p>Failed \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u0432 pod\u00a0<code>runner-xxx-project-yyy-concurrent-0-zzz<\/code>, \u0430 \u0432 pod\u00a0<code>gitlab-runner-xxx-yyy<\/code>. \u0412\u043e\u0442\u00a0<a href=\"https:\/\/gitlab.com\/gitlab-org\/gitlab-runner\/-\/issues\/38777\" rel=\"noopener noreferrer nofollow\">issue<\/a>\u00a0\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f failed \u0441\u0442\u0440\u043e\u043a \u043f\u0440\u0438 \u043f\u0430\u0434\u0435\u043d\u0438\u0438 job \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c after_script \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 $CI_JOB_STATUS \u041f\u0440\u0438\u043c\u0435\u0440 gitlab-ci.yaml:<\/p>\n<pre><code>image: alpine:latest stages:   - build   - test   - deploy build-job:   stage: build   script:     - echo \"$CI_JOB_ID\"     - exit 1   allow_failure: true   after_script:     - |       if [ \"$CI_JOB_STATUS\" != \"success\" ]; then         echo \"ERROR: Job failed: command terminated with non-zero exit code\"       fi<\/code><\/pre>\n<h3>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 VictoriaLogs<\/h3>\n<ol>\n<li>\n<p>\u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 UI VictoriaLogs (\u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430\u00a0<code>\/select\/<\/code>) \u0438\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043a Grafana.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u043f\u043e\u00a0<code>job_id<\/code>,\u00a0<code>pipeline_id<\/code>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<\/li>\n<\/ol>\n<pre><code>pipeline_id: \"1809184207\" job_id: \"9984945726\" <\/code><\/pre>\n<p>\u0438\u043b\u0438<\/p>\n<pre><code>{job_id=\"9984945726\",pipeline_id=\"1809184207\"} <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438 \u043f\u043e job, pipeline \u0438 \u0434\u0440\u0443\u0433\u0438\u043c CI-\u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u043c, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043e\u0442\u043b\u0430\u0434\u043a\u0443 \u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ea7\/8b2\/9df\/ea78b29df404db2da38f92ff650efea2.png\" alt=\"\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442 victorialogs\" width=\"1920\" height=\"1200\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/ea7\/8b2\/9df\/ea78b29df404db2da38f92ff650efea2.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ea7\/8b2\/9df\/ea78b29df404db2da38f92ff650efea2.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442 victorialogs<\/figcaption><\/div>\n<\/figure>\n<h3>Grafana Dashboard<\/h3>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0434\u0430\u0448\u0431\u043e\u0440\u0434 dashboard.json \u0412 Grafana \u0431\u0443\u0434\u0443\u0442 \u0432\u0438\u0434\u043d\u044b \u043c\u0435\u0442\u043a\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 GitLab Runner (<code>job_id<\/code>,\u00a0<code>pipeline_id<\/code>\u00a0\u0438 \u0442.\u0434.). \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a:\u00a0<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bfb\/798\/f1a\/bfb798f1afd17a6c23bcf803f490f843.png\" alt=\"\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442 Grafana\" width=\"1920\" height=\"1200\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/bfb\/798\/f1a\/bfb798f1afd17a6c23bcf803f490f843.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bfb\/798\/f1a\/bfb798f1afd17a6c23bcf803f490f843.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442 Grafana<\/figcaption><\/div>\n<\/figure>\n<h3>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 terraform<\/h3>\n<pre><code>terraform destroy<\/code><\/pre>\n<h3>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434<\/h3>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0434\u0435\u0441\u044c\u00a0<a href=\"https:\/\/github.com\/patsevanton\/gitlab-job-labels-to-victorialogs\/tree\/main\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/patsevanton\/gitlab-job-labels-to-victorialogs\/tree\/main<\/a><\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043b\u043e\u0433\u0438\/\u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u043a\u0430\u043a\u043e\u043c\u0443 pipeline \u0438 job&#8217;\u0443. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 VictoriaLogs \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043e\u0431\u044a\u0435\u043c\u043e\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u043a. \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u0445\u043e\u0440\u043e\u0448\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0433\u0438\u0431\u043a\u0443\u044e, \u043d\u043e \u043c\u043e\u0449\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u0431\u0441\u0435\u0440\u0432\u0430\u0431\u0438\u043b\u0438\u0442\u0438 \u0434\u043b\u044f CI\/CD \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0432 Kubernetes. \u0421 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0442\u0440\u043e\u043a \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 CI\/CD pipeline&#8217;\u043e\u0432.<\/p>\n<h3>Telegram \u043a\u0430\u043d\u0430\u043b:<\/h3>\n<p>\u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043c\u043e\u0439 telegram \u043a\u0430\u043d\u0430\u043b\u00a0<a href=\"https:\/\/t.me\/notes_devops_engineer\" rel=\"noopener noreferrer nofollow\">https:\/\/t.me\/notes_devops_engineer<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/908490\/\"> https:\/\/habr.com\/ru\/articles\/908490\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u2014 \u043a\u0430\u043a\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0440\u0435\u0448\u0430\u0435\u043c<\/h3>\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 GitLab CI\/CD \u0441 Kubernetes \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0432\u044f\u0437\u043a\u0443 \u043c\u0435\u0436\u0434\u0443 \u043b\u043e\u0433\u0430\u043c\u0438 \u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 CI job&#8217;\u0430\u043c\u0438 \u0438\u043b\u0438 pipeline&#8217;\u0430\u043c\u0438. \u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043b\u043e\u0433\u0438 \u0438\u0437 \u043f\u043e\u0434\u043e\u0432 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u044d\u0442\u0438\u0445 \u0441\u0432\u044f\u0437\u0443\u044e\u0449\u0438\u0445 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043a\u0438\u00a0<code>job_id<\/code>,\u00a0<code>pipeline_id<\/code>,\u00a0<code>project_name<\/code>\u00a0\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u0437 GitLab Runner \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f VictoriaLogs \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Promtail \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 VictoriaMetrics.<\/p>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c VictoriaLogs, \u0430 \u043d\u0435 Loki<\/h3>\n<ul>\n<li>\n<p><strong>\u041c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a<\/strong>\u00a0\u043f\u043e \u043b\u044e\u0431\u044b\u043c \u043f\u043e\u043b\u044f\u043c \u043b\u043e\u0433\u043e\u0432 (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a job_id \u0438\u043b\u0438 pipeline_id), \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0445\u0435\u043c\u044b. \u0412 Loki \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043a\u0430\u043c\u0438 \u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u0440\u0435\u0437\u043a\u043e\u043c\u0443 \u0440\u043e\u0441\u0442\u0443 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u042d\u043a\u043e\u043d\u043e\u043c\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<\/strong>: \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043a\u0430\u043a ClickHouse \u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u0436\u0430\u0442\u0438\u0435\u043c \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u044a\u0451\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u0432\u00a0<a href=\"https:\/\/docs.victoriametrics.com\/victorialogs\/faq\/#what-is-the-difference-between-victorialogs-and-grafana-loki\" rel=\"noopener noreferrer nofollow\">5\u201310<\/a>\u00a0\u0440\u0430\u0437 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 Loki, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/strong>: \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u044f\u0437\u044b\u043a LogsQL \u0443\u0434\u043e\u0431\u0435\u043d \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438, \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a LogQL \u0432 Loki \u0447\u0430\u0441\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/strong>: \u0442\u0438\u043f\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0434\u043e\u00a0<a href=\"https:\/\/docs.victoriametrics.com\/victorialogs\/faq\/#what-is-the-difference-between-victorialogs-and-grafana-loki\" rel=\"noopener noreferrer nofollow\">1000x<\/a>\u00a0\u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0432 Loki, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044e \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f GitLab Runner \u0432 gitlab.com<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 runner&#8217;\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 GitLab:<\/p>\n<ol>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 GitLab.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435\u00a0<code>Settings -&gt; CI\/CD -&gt; Runners<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u043e\u0431\u0449\u0438\u0435 \u0440\u0430\u043d\u043d\u0435\u0440\u044b<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 registration token.<\/p>\n<\/li>\n<\/ol>\n<p>\u042d\u0442\u043e\u0442 \u0442\u043e\u043a\u0435\u043d \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u043d\u043d\u0435\u0440\u0430 \u0432 \u0432\u0430\u0448\u0435\u043c Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Kubernetes<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 kubernetes \u0447\u0435\u0440\u0435\u0437 terraform<\/p>\n<pre><code>git clone https:\/\/github.com\/patsevanton\/gitlab-job-labels-to-victorialogs export YC_FOLDER_ID='\u0432\u0430\u0448 folder_id' terraform init terraform apply<\/code><\/pre>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 VictoriaLogs<\/h3>\n<pre><code>helm repo add vm https:\/\/victoriametrics.github.io\/helm-charts\/ helm repo update  helm upgrade --install victorialogs vm\/victoria-logs-single \\   --namespace victorialogs --create-namespace \\   --values victorialogs-values.yaml<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, victorialogs \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443\u00a0<a href=\"http:\/\/victorialogs.apatsev.org.ru\" rel=\"noopener noreferrer nofollow\">http:\/\/victorialogs.apatsev.org.ru<\/a><\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 victoria-metrics-k8s-stack<\/h3>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c Helm \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c VictoriaMetrics stack:<\/p>\n<pre><code>helm repo add vm https:\/\/victoriametrics.github.io\/helm-charts\/ helm repo update  helm upgrade --install vmks vm\/victoria-metrics-k8s-stack \\   --namespace vmks --create-namespace \\   --values vmks-values.yaml<\/code><\/pre>\n<p>\u0412 vmks-values.yaml \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0447\u0442\u043e kube-state-metrics, \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044f \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u0440\u0438\u043a ([*]), \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u0434\u0430\u043c\u0438 (pods).<\/p>\n<pre><code>kube-state-metrics:   metricLabelsAllowlist:     - pods=[*]<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0432 values kube-state-metrics \u0438 victoria-metrics-k8s-stack:\u00a0<a href=\"https:\/\/github.com\/prometheus-community\/helm-charts\/blob\/main\/charts\/kube-state-metrics\/values.yaml#L397\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/prometheus-community\/helm-charts\/blob\/main\/charts\/kube-state-metrics\/values.yaml#L397<\/a>\u00a0<a href=\"https:\/\/github.com\/VictoriaMetrics\/helm-charts\/blob\/master\/charts\/victoria-metrics-k8s-stack\/values.yaml#L975C1-L975C19\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/VictoriaMetrics\/helm-charts\/blob\/master\/charts\/victoria-metrics-k8s-stack\/values.yaml#L975C1-L975C19<\/a><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, Grafana \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443\u00a0<a href=\"http:\/\/grafana.apatsev.org.ru\" rel=\"noopener noreferrer nofollow\">http:\/\/grafana.apatsev.org.ru<\/a><\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u044f grafana \u0434\u043b\u044f admin \u044e\u0437\u0435\u0440\u0430<\/p>\n<pre><code>kubectl get secret vmks-grafana -n vmks -o jsonpath='{.data.admin-password}' | base64 --decode<\/code><\/pre>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Promtail<\/h3>\n<pre><code>helm upgrade --install promtail grafana\/promtail \\   --namespace promtail --create-namespace \\   --values promtail-values.yaml<\/code><\/pre>\n<p>\u0424\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Promtail\u00a0<code>promtail-values.yaml<\/code>:<\/p>\n<pre><code>tolerations:   - operator: Exists     effect: NoSchedule config:   clients:     - url: http:\/\/victorialogs-victoria-logs-single-server.victorialogs.svc.cluster.local:9428\/insert\/loki\/api\/v1\/push?_msg_field=msg   snippets:     pipelineStages:       - cri: {}       - labeldrop:           - filename           - node_name     extraRelabelConfigs:       - action: keep         source_labels:           - __meta_kubernetes_namespace         regex: gitlab-runner       - action: replace         source_labels:           - __meta_kubernetes_pod_label_job_id         target_label: job_id       - action: replace         source_labels:           - __meta_kubernetes_pod_label_job_name         target_label: job_name       - action: replace         source_labels:           - __meta_kubernetes_pod_label_pipeline_id         target_label: pipeline_id       - action: replace         source_labels:           - __meta_kubernetes_pod_label_project_id         target_label: project_id       - action: replace         source_labels:           - __meta_kubernetes_pod_label_project_name         target_label: project_name <\/code><\/pre>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 GitLab Runner \u0447\u0435\u0440\u0435\u0437 Helm:<\/h3>\n<pre><code>helm repo add gitlab https:\/\/charts.gitlab.io helm repo update  export RUNNER_TOKEN=\"glrt-xxx.xxxxx\"  # \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0439\u0442\u0435 gitlab-runner \u0442\u043e\u043a\u0435\u043d  helm upgrade --install gitlab-runner gitlab\/gitlab-runner \\   --namespace gitlab-runner --create-namespace \\   --values gitlab-runner-values.yaml \\   --set-string runnerToken=\"$RUNNER_TOKEN\"<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u00a0<code>gitlab-runner-values.yaml<\/code>:<\/p>\n<pre><code>gitlabUrl: \"https:\/\/gitlab.com\/\" runners:   config: |     [[runners]]       [runners.kubernetes]         helper_cpu_request = \"250m\"         helper_memory_limit = \"512Mi\"         [runners.kubernetes.pod_labels]           \"job_name\" = \"${CI_JOB_NAME_SLUG}\"           \"job_id\" = \"${CI_JOB_ID}\"           \"project_name\" = \"${CI_PROJECT_NAME}\"           \"project_id\" = \"${CI_PROJECT_ID}\"           \"pipeline_id\" = \"${CI_PIPELINE_ID}\" metrics:   enabled: true   serviceMonitor:     enabled: true service:   enabled: true rbac:   create: true<\/code><\/pre>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0447\u0442\u043e \u0443 pod \u0435\u0441\u0442\u044c label<\/h4>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0431\u043e\u0440\u043a\u0443 \u043d\u0430 \u044d\u0442\u043e\u043c \u0440\u0430\u043d\u043d\u0435\u0440\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 label \u0414\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a<\/p>\n<pre><code>kubectl get pod -n gitlab-runner --show-labels | grep -E '(job_name|job_id|project_name|project_id|pipeline_id)' runner-sijwob5yi-project-69309276-concurrent-0-7hr533es   2\/2     Running   0          16s     ...,job_id=9895041344,job_name=deploy-job,pipeline_id=1796027502,pod=runner-sijwob5yi-project-69309276-concurrent-0,project_id=69309276,project_name=gitlab-for-job-labels-to-victorialogs runner-sijwob5yi-project-69309276-concurrent-0-pfirp5t5   2\/2     Running   0          49s     ...,job_id=9895041322,job_name=unit-test-job,pipeline_id=1796027502,pod=runner-sijwob5yi-project-69309276-concurrent-0,project_id=69309276,project_name=gitlab-for-job-labels-to-victorialogs runner-sijwob5yi-project-69309276-concurrent-1-85wx1m9n   2\/2     Running   0          44s     ...,job_id=9895041335,job_name=lint-test-job,pipeline_id=1796027502,pod=runner-sijwob5yi-project-69309276-concurrent-1,project_id=69309276,project_name=gitlab-for-job-labels-to-victorialog<\/code><\/pre>\n<h3>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 failed \u0441\u0442\u0440\u043e\u043a \u0432 \u043b\u043e\u0433\u0430\u0445 \u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u043f\u043e\u00a0job_id<\/h3>\n<p>Failed \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u0432 pod\u00a0<code>runner-xxx-project-yyy-concurrent-0-zzz<\/code>, \u0430 \u0432 pod\u00a0<code>gitlab-runner-xxx-yyy<\/code>. \u0412\u043e\u0442\u00a0<a href=\"https:\/\/gitlab.com\/gitlab-org\/gitlab-runner\/-\/issues\/38777\" rel=\"noopener noreferrer nofollow\">issue<\/a>\u00a0\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f failed \u0441\u0442\u0440\u043e\u043a \u043f\u0440\u0438 \u043f\u0430\u0434\u0435\u043d\u0438\u0438 job \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c after_script \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 $CI_JOB_STATUS \u041f\u0440\u0438\u043c\u0435\u0440 gitlab-ci.yaml:<\/p>\n<pre><code>image: alpine:latest stages:   - build   - test   - deploy build-job:   stage: build   script:     - echo \"$CI_JOB_ID\"     - exit 1   allow_failure: true   after_script:     - |       if [ \"$CI_JOB_STATUS\" != \"success\" ]; then         echo \"ERROR: Job failed: command terminated with non-zero exit code\"       fi<\/code><\/pre>\n<h3>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 VictoriaLogs<\/h3>\n<ol>\n<li>\n<p>\u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 UI VictoriaLogs (\u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430\u00a0<code>\/select\/<\/code>) \u0438\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043a Grafana.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u043f\u043e\u00a0<code>job_id<\/code>,\u00a0<code>pipeline_id<\/code>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<\/li>\n<\/ol>\n<pre><code>pipeline_id: \"1809184207\" job_id: \"9984945726\" <\/code><\/pre>\n<p>\u0438\u043b\u0438<\/p>\n<pre><code>{job_id=\"9984945726\",pipeline_id=\"1809184207\"} <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438 \u043f\u043e job, pipeline \u0438 \u0434\u0440\u0443\u0433\u0438\u043c CI-\u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u043c, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043e\u0442\u043b\u0430\u0434\u043a\u0443 \u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442 victorialogs<\/figcaption><\/div>\n<\/figure>\n<h3>Grafana Dashboard<\/h3>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0434\u0430\u0448\u0431\u043e\u0440\u0434 dashboard.json \u0412 Grafana \u0431\u0443\u0434\u0443\u0442 \u0432\u0438\u0434\u043d\u044b \u043c\u0435\u0442\u043a\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 GitLab Runner (<code>job_id<\/code>,\u00a0<code>pipeline_id<\/code>\u00a0\u0438 \u0442.\u0434.). \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a:\u00a0<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442 Grafana<\/figcaption><\/div>\n<\/figure>\n<h3>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 terraform<\/h3>\n<pre><code>terraform destroy<\/code><\/pre>\n<h3>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434<\/h3>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0434\u0435\u0441\u044c\u00a0<a href=\"https:\/\/github.com\/patsevanton\/gitlab-job-labels-to-victorialogs\/tree\/main\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/patsevanton\/gitlab-job-labels-to-victorialogs\/tree\/main<\/a><\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043b\u043e\u0433\u0438\/\u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u043a\u0430\u043a\u043e\u043c\u0443 pipeline \u0438 job&#8217;\u0443. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 VictoriaLogs \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043e\u0431\u044a\u0435\u043c\u043e\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u043a. \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u0445\u043e\u0440\u043e\u0448\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0433\u0438\u0431\u043a\u0443\u044e, \u043d\u043e \u043c\u043e\u0449\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u0431\u0441\u0435\u0440\u0432\u0430\u0431\u0438\u043b\u0438\u0442\u0438 \u0434\u043b\u044f CI\/CD \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0432 Kubernetes. \u0421 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0442\u0440\u043e\u043a \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 CI\/CD pipeline&#8217;\u043e\u0432.<\/p>\n<h3>Telegram \u043a\u0430\u043d\u0430\u043b:<\/h3>\n<p>\u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043c\u043e\u0439 telegram \u043a\u0430\u043d\u0430\u043b\u00a0<a href=\"https:\/\/t.me\/notes_devops_engineer\" rel=\"noopener noreferrer nofollow\">https:\/\/t.me\/notes_devops_engineer<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/908490\/\"> https:\/\/habr.com\/ru\/articles\/908490\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-459305","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/459305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=459305"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/459305\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=459305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=459305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=459305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}