// Aula 35 - Criando uma autenticação básica RHEL/CentOS: # dnf install httpd-tools Debian/Ubuntu: # apt install apache2-utils # htpasswd -nBC 10 "" | tr -d ':\n' ( DIGITE A SENHA QUE QUEIRA CRIAR ) # web.yml tls_server_config: cert_file: prometheus.crt key_file: prometheus.key basic_auth_users: vitor: $2y$10$2IiGecC/tDOXZG4mVB/nHOKUQnnhLhqmPvuH6ELsk12lIrqOghNXm[ scrape_configs: - job_name: prometheus scheme: https tls_config: ca_file: prometheus.crt basic_auth: username: vitor password: 123456 static_configs: - targets: ["localhost:9090"] # systemctl restart prometheus $ curl --cacert prometheus.crt -u vitor:123456 https://localhost:9090/metrics