> For the complete documentation index, see [llms.txt](https://utm-1.gitbook.io/utm-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://utm-1.gitbook.io/utm-docs/dokumentaciya/utm-it/resheniya/kubernetes/prilozheniya/monitoring/blackbox-exporter.md).

# blackbox-exporter

## Ссылки

## Развертывание blackbox-exporter

### Установка через Argo CD

В github в репозитории argocd в каталоге `env-prod\apps` создать подкаталог `monitoring\blackbox-exporter` в котором создать файл `app.yaml` следующего содержания:

```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name     : blackbox-exporter
  namespace: argocd
spec:
  project: default
  destination:
    name     : in-cluster
    namespace: monitoring
  sources:
  - repoURL: git@github.com:utenkov-maxim/argocd.git
    targetRevision: HEAD
    ref: values
  - chart: prometheus-blackbox-exporter
    repoURL: https://prometheus-community.github.io/helm-charts
    targetRevision: 11.4.1
    helm:
      releaseName: blackbox-exporter
      valueFiles:
      - $values/env-prod/apps/monitoring/blackbox-exporter/values.yaml
  syncPolicy:
    automated:
      prune   : true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true
      - ServerSideApply=true
```

В каталоге `monitoring\blackbox-exporter` внести изменения в файл `values.yaml` (базовый файл взять [отсюда](https://github.com/prometheus-community/helm-charts/blob/main/charts/prometheus-blackbox-exporter/values.yaml))

{% hint style="info" %}
Всё что необходимо изменить в файле `values.yaml` смотри в репозитории argocd в реальном файле. Все изменения помечены меткой `!!!TEST`
{% endhint %}

Сделать коммит в github. После этого Argo CD развернет Grafana в связанном кластере Kubernetes.

## Список наблюдаемых сайтов

В каталоге `monitoring\blackbox-exporter` внести изменения в файл `values.yaml`

```yaml
...
config:
  modules:
    http_2xx:
      prober: http
      timeout: 10s
      http:
        valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
        valid_status_codes: [200, 301, 302]
        method: "GET"
        follow_redirects: true
        preferred_ip_protocol: "ip4"
        tls_config:
          insecure_skip_verify: true
...
serviceMonitor:
...
  enabled: true

  defaults:
    ...
    labels:
      release: prometheus-stack
    ...

  targets:
    - name: utmsoft-ru
      url: https://utmsoft.ru
      module: http_2xx
    - name: test-utmsoft-ru
      url: https://test.utmsoft.ru
      module: http_2xx
    - name: utmsoft-online
      url: https://utmsoft2.online
      module: http_2xx
    - name: k8s-argocd-utmsoft-ru
      url: https://k8s-argocd.utmsoft.ru
      module: http_2xx
    - name: k8s-grafana-utmsoft-ru
      url: https://k8s-grafana.utmsoft.ru
      module: http_2xx
    - name: shootcatroid-utmsoft-ru-ping
      url: https://shootcatroid.utmsoft.ru/menu?action=ping
      module: http_2xx
    - name: k8s-testapp-utmsoft-ru
      url: https://k8s-testapp.utmsoft.ru
      module: http_2xx
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://utm-1.gitbook.io/utm-docs/dokumentaciya/utm-it/resheniya/kubernetes/prilozheniya/monitoring/blackbox-exporter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
