From c733cb461b882248ba28cbc1cb2c895b650d06a8 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Tue, 8 Oct 2024 13:22:30 +0200 Subject: [PATCH] add vector --- .../devnet-3/group_vars/all/all.sops.yaml | 8 +++-- .../devnet-3/group_vars/all/all.yaml | 35 +++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/ansible/inventories/devnet-3/group_vars/all/all.sops.yaml b/ansible/inventories/devnet-3/group_vars/all/all.sops.yaml index 771458a..872da24 100644 --- a/ansible/inventories/devnet-3/group_vars/all/all.sops.yaml +++ b/ansible/inventories/devnet-3/group_vars/all/all.sops.yaml @@ -4,6 +4,10 @@ secret_zerossl: secret_prometheus_remote_write: username: ENC[AES256_GCM,data:N8zEJerCytHEfM8awSkKjQ==,iv:vF0KGOZL+3OyIWwm1h4PmZoh2UdnvpAmiGB5E91Cq/Q=,tag:+MrdrSBVCQ0sbQB3Z3d5Kg==,type:str] password: ENC[AES256_GCM,data:S29UyYV1ySAmsA7JkjWeRXDRhyjQH9iR6TbUI7aPZkU+Za8L,iv:6eT9fH3LFdgjk5JVrk/KvHYbOsxdO3d8whk8bj7GzV4=,tag:PhsAUbbOqYp4TOi35VFCkg==,type:str] +secret_loki: + endpoint: ENC[AES256_GCM,data:7Gg/erWQ+xAXBq5TZy9m8pAG2CfpHNojh4Hm7EV7pgyQLXMPOa7T0f18JAh0CvPeM3PBCuJ0g1c=,iv:JAgOYYsry8ahE1j+sGJtaoAlAvmw9y9RqcrcT/X7X8o=,tag:3dPBk4LHIbkJzGs0tFl0kg==,type:str] + username: ENC[AES256_GCM,data:msmZ9THoI9+ldTXDhVIqqA==,iv:cf7L0HQidcoIlEeavAnIMHgjeGSSw5DeJ756RVqrwvo=,tag:2X8UAd2CnVgNj2gXHVYIgg==,type:str] + password: ENC[AES256_GCM,data:yA6WX8ILYktTe3o2U4o9jiDCvJtqjo+pR5Dq+VhhVvPMGq4G,iv:gHaxPRB5UtCKrcDdjfF6YWJO8JsRCS3BCSL7AekQ9AA=,tag:jYJjHMVPh/61tgL9Fj2bgA==,type:str] secret_nginx_shared_basic_auth: name: ENC[AES256_GCM,data:bjlM,iv:DiOGlqfOfrDlt7X4OGY27OYlkDDEHguv+kg1zRhBek0=,tag:ZPlucwl2PNXeXcOc8PmCBQ==,type:str] password: ENC[AES256_GCM,data:CeX1jyv0KDK151kGStjh,iv:aXD2auKPfUAHolr2ucFNPr95ZrtfD6ucwJhGeGTwUF8=,tag:wVfTl+zuf5IqynDdvxNRNQ==,type:str] @@ -29,8 +33,8 @@ sops: azure_kv: [] hc_vault: [] age: [] - lastmodified: "2024-10-04T08:58:21Z" - mac: ENC[AES256_GCM,data:fFCaY9Ezah3rt0c+f21qXgTiyOHgsGIlGisuIIfsh+oHoBmpS174on85TMHKb5pQ5MwB1s0gRhzMmMOcvBPkJeadVJuCu9NjG9s9TYNOftG3fWXbrLjZ3SufCAoygwM/cH2Ouo/1weepeuGhEQPXXcyVUGbC6NQbbh86Zzdw9P4=,iv:EymNOScJVxzVy+FafUA14iHgOwfog4O9AesBivGu/Iw=,tag:aLwKpZmeKOj9MCJN/Sww5A==,type:str] + lastmodified: "2024-10-08T09:18:35Z" + mac: ENC[AES256_GCM,data:vQBDUimAf9ZAh9kRui5SFXFiXRJ9a4kXn4djeOxEGTKzknvur87d3j1FkWu56X8ze3FJFmgv/eLUVx9wDhskyD23XJwNogMvaEyGVApEpVJDFapGPkWnDljte5mxZXgQQZANNmLvl9N6HblX0hYv9pmFg855WpPLnXBPF8qyOOc=,iv:OyY4j5RTuk/840ovpMrlgcwypkTXSSzZ6ZKpKj3h49I=,tag:Tv0K1jvvMkU9Shx9SaaQ0Q==,type:str] pgp: - created_at: "2023-09-28T11:48:21Z" enc: |- diff --git a/ansible/inventories/devnet-3/group_vars/all/all.yaml b/ansible/inventories/devnet-3/group_vars/all/all.yaml index 49ada16..bbbd030 100644 --- a/ansible/inventories/devnet-3/group_vars/all/all.yaml +++ b/ansible/inventories/devnet-3/group_vars/all/all.yaml @@ -180,3 +180,38 @@ docker_nginx_proxy_container_volumes: - "{{ docker_nginx_proxy_datadir }}/certs:/etc/nginx/certs:ro" - html:/usr/share/nginx/html - "{{ docker_nginx_proxy_datadir }}/htpasswd:/etc/nginx/htpasswd:ro" + +# role: ethpandaops.general.vector +vector_config: | + [sources.in] + type = "docker_logs" + exclude_containers = [ + "{{ vector_container_name }}", + "ethereum-metrics-exporter", + "nginx-proxy", + "node_exporter", + "prometheus", + "snooper-", + ] + + [sinks.out] + type = "loki" + inputs = ["in"] + out_of_order_action = "accept" + labels.forwarder = "vector" + labels.instance = "{{ inventory_hostname }}" + labels.network = "{{ ethereum_network_name }}" + labels.testnet = "{{ ethereum_network_name }}" + labels.ingress_user = "{{ secret_loki.username }}" + labels.container_name = "{{ '{{ container_name }}' }}" + {%- if ethereum_node_el is defined +%} + labels.ethereum_el = "{{ ethereum_node_el }}" + {%- endif +%} + {%- if ethereum_node_cl is defined +%} + labels.ethereum_cl = "{{ ethereum_node_cl }}" + {%- endif +%} + encoding.codec = "json" + endpoint = "{{ secret_loki.endpoint }}" + auth.strategy = "basic" + auth.user = "{{ secret_loki.username }}" + auth.password = "{{ secret_loki.password }}" \ No newline at end of file