From 0ca062c73dc6168515dd8079de1f256ae005d223 Mon Sep 17 00:00:00 2001 From: Juan Manuel Perez Date: Thu, 4 Jan 2024 12:42:54 +0100 Subject: [PATCH] remove powerdns authoritative testing --- exporters/powerdns/e2e/docker-compose.yml | 19 - exporters/powerdns/e2e/e2e_spec.yml | 82 ++-- .../e2e/pdns-authoritative/Dockerfile | 25 -- .../powerdns/e2e/pdns-authoritative/pdns.conf | 8 - .../powerdns/e2e/pdns-authoritative/pdns.list | 1 - .../e2e/pdns-authoritative/pdns.preference | 3 - exporters/powerdns/e2e/powerdns.yml | 366 +++++++++--------- 7 files changed, 224 insertions(+), 280 deletions(-) delete mode 100644 exporters/powerdns/e2e/pdns-authoritative/Dockerfile delete mode 100644 exporters/powerdns/e2e/pdns-authoritative/pdns.conf delete mode 100644 exporters/powerdns/e2e/pdns-authoritative/pdns.list delete mode 100644 exporters/powerdns/e2e/pdns-authoritative/pdns.preference diff --git a/exporters/powerdns/e2e/docker-compose.yml b/exporters/powerdns/e2e/docker-compose.yml index 4fea6263..4e1c42c8 100644 --- a/exporters/powerdns/e2e/docker-compose.yml +++ b/exporters/powerdns/e2e/docker-compose.yml @@ -15,25 +15,6 @@ services: vpcbr: ipv4_address: 10.5.0.2 - pdns-authoritative: - build: - context: pdns-authoritative - container_name: pdns-authoritative - links: - - "mysql:mysql" - ports: - - "5300:53" - - "5300:53/udp" - - "8081:8081" - environment: - - PDNSCONF_DNSUPDATE=no - - SECALLZONES_CRONJOB=yes - volumes: - - ./pdns-authoritative/pdns.conf:/etc/powerdns/pdns.conf:ro - networks: - vpcbr: - ipv4_address: 10.5.0.3 - mysql: image: mysql environment: diff --git a/exporters/powerdns/e2e/e2e_spec.yml b/exporters/powerdns/e2e/e2e_spec.yml index fbe57f52..a2e889ac 100644 --- a/exporters/powerdns/e2e/e2e_spec.yml +++ b/exporters/powerdns/e2e/e2e_spec.yml @@ -28,54 +28,54 @@ scenarios: nrqls: - query: "SELECT average(powerdns_authoritative_queries_total) FROM Metric" entities: - - type: "POWERDNS_AUTHORITATIVE" - data_type: "Metric" - metric_name: "powerdns_authoritative_up" + # - type: "POWERDNS_AUTHORITATIVE" + # data_type: "Metric" + # metric_name: "powerdns_authoritative_up" - type: "POWERDNS_RECURSOR" data_type: "Metric" metric_name: "powerdns_recursor_up" metrics: - source: "powerdns.yml" - except_entities: - - POWERDNS_AUTHORITATIVE + # except_entities: + # - POWERDNS_AUTHORITATIVE except_metrics: - powerdns_authoritative_answers_bytes_total - powerdns_recursor_cache_lookups_total # additionals: "" - - description: | - This scenario will verify that metrics from PDNS authoritative - are correcly collected. - before: - - docker-compose up -d - after: - - docker-compose down -v - integrations: - - name: nri-powerdns - binary_path: ../target/bin/linux_amd64/nri-powerdns - exporter_binary_path: ../target/bin/linux_amd64/powerdns-exporter - config: - powerdns_url: http://localhost:8081/api/v1/ - exporter_port: 9121 - api_key: authoritative-secret - tests: - nrqls: - - query: "SELECT average(powerdns_authoritative_queries_total) FROM Metric" - entities: - - type: "POWERDNS_AUTHORITATIVE" - data_type: "Metric" - metric_name: "powerdns_authoritative_up" - metrics: - - source: "powerdns.yml" - except_entities: - - POWERDNS_RECURSOR - except_metrics: - - powerdns_authoritative_response_sizes - - powerdns_authoritative_queries - - powerdns_authoritative_response_rcodes - - powerdns_authoritative_remote_queries_unauth - - powerdns_authoritative_queries_unauth - - powerdns_authoritative_remote_queries - # additionals: "" + # - description: | + # This scenario will verify that metrics from PDNS authoritative + # are correcly collected. + # before: + # - docker-compose up -d + # after: + # - docker-compose down -v + # integrations: + # - name: nri-powerdns + # binary_path: ../target/bin/linux_amd64/nri-powerdns + # exporter_binary_path: ../target/bin/linux_amd64/powerdns-exporter + # config: + # powerdns_url: http://localhost:8081/api/v1/ + # exporter_port: 9121 + # api_key: authoritative-secret + # tests: + # nrqls: + # - query: "SELECT average(powerdns_authoritative_queries_total) FROM Metric" + # entities: + # - type: "POWERDNS_AUTHORITATIVE" + # data_type: "Metric" + # metric_name: "powerdns_authoritative_up" + # metrics: + # - source: "powerdns.yml" + # except_entities: + # - POWERDNS_RECURSOR + # except_metrics: + # - powerdns_authoritative_response_sizes + # - powerdns_authoritative_queries + # - powerdns_authoritative_response_rcodes + # - powerdns_authoritative_remote_queries_unauth + # - powerdns_authoritative_queries_unauth + # - powerdns_authoritative_remote_queries + # # additionals: "" - description: | This scenario will verify that metrics froms PDNS recursor are correcly collected. @@ -100,8 +100,8 @@ scenarios: metric_name: "powerdns_recursor_up" metrics: - source: "powerdns.yml" - except_entities: - - POWERDNS_AUTHORITATIVE + # except_entities: + # - POWERDNS_AUTHORITATIVE except_metrics: - powerdns_recursor_cache_lookups_total # additionals: " diff --git a/exporters/powerdns/e2e/pdns-authoritative/Dockerfile b/exporters/powerdns/e2e/pdns-authoritative/Dockerfile deleted file mode 100644 index 8ef7cab0..00000000 --- a/exporters/powerdns/e2e/pdns-authoritative/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM paritytech/gnupg:latest AS KEY_DOWNLOADER -RUN curl https://repo.powerdns.com/FD380FBB-pub.asc -o /tmp/FD380FBB-pub.asc -RUN gpg --dearmor < /tmp/FD380FBB-pub.asc > /tmp/FD380FBB-pub.gpg - -FROM debian:bookworm - -ENV POWERDNS_API_KEY="apisecret" - -COPY pdns.list /etc/apt/sources.list.d/pdns.list -COPY pdns.preference /etc/apt/preferences.d/pdns -COPY --from=KEY_DOWNLOADER /tmp/FD380FBB-pub.gpg /etc/apt/keyrings/powerdns.gpg - -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -q -y pdns-server pdns-backend-sqlite3 sqlite3 && \ - rm /etc/powerdns/pdns.d/*.conf && rm /etc/powerdns/*.conf && \ - mkdir /var/run/pdns && \ - apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -RUN sqlite3 /tmp/db.sqlite < /usr/share/pdns-backend-sqlite3/schema/schema.sqlite3.sql - -COPY pdns.conf /etc/powerdns/pdns.conf - -EXPOSE 53/udp 53/tcp - -CMD /usr/sbin/pdns_server --daemon=no --guardian=no --control-console --loglevel=9 --api-key=${POWERDNS_API_KEY} diff --git a/exporters/powerdns/e2e/pdns-authoritative/pdns.conf b/exporters/powerdns/e2e/pdns-authoritative/pdns.conf deleted file mode 100644 index 713458f3..00000000 --- a/exporters/powerdns/e2e/pdns-authoritative/pdns.conf +++ /dev/null @@ -1,8 +0,0 @@ -launch=gsqlite3 -gsqlite3-database=/tmp/db.sqlite -gsqlite3-dnssec=true - -api=yes -webserver=yes -webserver-address=0.0.0.0 -webserver-allow-from=0.0.0.0/0 diff --git a/exporters/powerdns/e2e/pdns-authoritative/pdns.list b/exporters/powerdns/e2e/pdns-authoritative/pdns.list deleted file mode 100644 index cf5f9c27..00000000 --- a/exporters/powerdns/e2e/pdns-authoritative/pdns.list +++ /dev/null @@ -1 +0,0 @@ -deb [arch=amd64 signed-by=/etc/apt/keyrings/powerdns.gpg] http://repo.powerdns.com/debian bookworm-auth-48 main diff --git a/exporters/powerdns/e2e/pdns-authoritative/pdns.preference b/exporters/powerdns/e2e/pdns-authoritative/pdns.preference deleted file mode 100644 index 24d2beae..00000000 --- a/exporters/powerdns/e2e/pdns-authoritative/pdns.preference +++ /dev/null @@ -1,3 +0,0 @@ -Package: pdns-* -Pin: origin repo.powerdns.com -Pin-Priority: 600 diff --git a/exporters/powerdns/e2e/powerdns.yml b/exporters/powerdns/e2e/powerdns.yml index 8053802b..8b243881 100644 --- a/exporters/powerdns/e2e/powerdns.yml +++ b/exporters/powerdns/e2e/powerdns.yml @@ -4,189 +4,189 @@ owningTeam: integrations integrationName: powerdns humanReadableIntegrationName: PowerDNS entities: - - entityType: POWERDNS_AUTHORITATIVE - metrics: - - name: powerdns_authoritative_deferred_cache_actions - type: count - defaultResolution: 15 - unit: count - dimensions: - - name: type - type: string - - name: powerdns_authoritative_queries_total - type: count - defaultResolution: 15 - unit: count - dimensions: - - name: proto - type: string - - name: powerdns_authoritative_signature_cache_size - type: gauge - defaultResolution: 15 - unit: count - - name: powerdns_authoritative_exporter_json_parse_failures - type: count - defaultResolution: 15 - unit: count - - name: powerdns_authoritative_packet_cache_size - type: gauge - defaultResolution: 15 - unit: count - - name: powerdns_authoritative_answers_bytes_total - type: count - defaultResolution: 15 - unit: bytes - dimensions: - - name: proto - type: string - - name: powerdns_authoritative_query_cache_lookup - type: count - defaultResolution: 15 - unit: count - dimensions: - - name: result - type: string - - name: powerdns_authoritative_response_sizes - type: count - defaultResolution: 15 - unit: count - dimensions: - - name: size - type: string - - name: powerdns_authoritative_dnssec - type: count - defaultResolution: 15 - unit: count - dimensions: - - name: type - type: string - - name: powerdns_authoritative_latency_average_seconds - type: gauge - defaultResolution: 15 - unit: microseconds - - name: powerdns_authoritative_answers_total - type: count - defaultResolution: 15 - unit: count - dimensions: - - name: proto - type: string - - name: powerdns_authoritative_uptime - type: count - defaultResolution: 15 - unit: seconds - dimensions: - - name: type - type: string - - name: powerdns_authoritative_metadata_cache_size - type: gauge - defaultResolution: 15 - unit: count - - name: powerdns_authoritative_dnsupdate_queries_total - type: count - defaultResolution: 15 - unit: count - dimensions: - - name: status - type: string - - name: powerdns_authoritative_security_status - type: gauge - defaultResolution: 15 - unit: count - - name: powerdns_authoritative_packet_cache_lookup - type: count - defaultResolution: 15 - unit: count - dimensions: - - name: result - type: string - - name: powerdns_authoritative_exporter_total_scrapes - type: count - defaultResolution: 15 - unit: count - - name: powerdns_authoritative_queries - type: count - defaultResolution: 15 - unit: count - dimensions: - - name: record - type: string - - name: powerdns_authoritative_qsize - type: gauge - defaultResolution: 15 - unit: count - - name: powerdns_authoritative_cpu_utilisation - type: count - defaultResolution: 15 - unit: milliseconds - dimensions: - - name: type - type: string - - name: powerdns_authoritative_response_rcodes - type: count - defaultResolution: 15 - unit: count - dimensions: - - name: rcode - type: string - - name: powerdns_authoritative_remote_queries_unauth - type: count - defaultResolution: 15 - unit: count - dimensions: - - name: remote - type: string - - name: powerdns_authoritative_remote_queries - type: count - defaultResolution: 15 - unit: count - dimensions: - - name: remote - type: string - - name: powerdns_authoritative_key_cache_size - type: gauge - defaultResolution: 15 - unit: count - - name: powerdns_authoritative_up - type: gauge - defaultResolution: 15 - unit: count - - name: powerdns_authoritative_exceptions_total - type: count - defaultResolution: 15 - unit: count - dimensions: - - name: error - type: string - - name: powerdns_authoritative_recursive_queries_total - type: count - defaultResolution: 15 - unit: count - dimensions: - - name: status - type: string - - name: powerdns_authoritative_queries_unauth - type: count - defaultResolution: 15 - unit: count - dimensions: - - name: record - type: string - tags: [] - internalAttributes: - - name: newrelic.integrationName - type: string - - name: newrelic.integrationVersion - type: string - - name: newrelic.source - type: string - - name: newrelic.agentVersion - type: string - ignoredAttributes: - - agentName - - coreCount - - processorCount - - systemMemoryBytes + # - entityType: POWERDNS_AUTHORITATIVE + # metrics: + # - name: powerdns_authoritative_deferred_cache_actions + # type: count + # defaultResolution: 15 + # unit: count + # dimensions: + # - name: type + # type: string + # - name: powerdns_authoritative_queries_total + # type: count + # defaultResolution: 15 + # unit: count + # dimensions: + # - name: proto + # type: string + # - name: powerdns_authoritative_signature_cache_size + # type: gauge + # defaultResolution: 15 + # unit: count + # - name: powerdns_authoritative_exporter_json_parse_failures + # type: count + # defaultResolution: 15 + # unit: count + # - name: powerdns_authoritative_packet_cache_size + # type: gauge + # defaultResolution: 15 + # unit: count + # - name: powerdns_authoritative_answers_bytes_total + # type: count + # defaultResolution: 15 + # unit: bytes + # dimensions: + # - name: proto + # type: string + # - name: powerdns_authoritative_query_cache_lookup + # type: count + # defaultResolution: 15 + # unit: count + # dimensions: + # - name: result + # type: string + # - name: powerdns_authoritative_response_sizes + # type: count + # defaultResolution: 15 + # unit: count + # dimensions: + # - name: size + # type: string + # - name: powerdns_authoritative_dnssec + # type: count + # defaultResolution: 15 + # unit: count + # dimensions: + # - name: type + # type: string + # - name: powerdns_authoritative_latency_average_seconds + # type: gauge + # defaultResolution: 15 + # unit: microseconds + # - name: powerdns_authoritative_answers_total + # type: count + # defaultResolution: 15 + # unit: count + # dimensions: + # - name: proto + # type: string + # - name: powerdns_authoritative_uptime + # type: count + # defaultResolution: 15 + # unit: seconds + # dimensions: + # - name: type + # type: string + # - name: powerdns_authoritative_metadata_cache_size + # type: gauge + # defaultResolution: 15 + # unit: count + # - name: powerdns_authoritative_dnsupdate_queries_total + # type: count + # defaultResolution: 15 + # unit: count + # dimensions: + # - name: status + # type: string + # - name: powerdns_authoritative_security_status + # type: gauge + # defaultResolution: 15 + # unit: count + # - name: powerdns_authoritative_packet_cache_lookup + # type: count + # defaultResolution: 15 + # unit: count + # dimensions: + # - name: result + # type: string + # - name: powerdns_authoritative_exporter_total_scrapes + # type: count + # defaultResolution: 15 + # unit: count + # - name: powerdns_authoritative_queries + # type: count + # defaultResolution: 15 + # unit: count + # dimensions: + # - name: record + # type: string + # - name: powerdns_authoritative_qsize + # type: gauge + # defaultResolution: 15 + # unit: count + # - name: powerdns_authoritative_cpu_utilisation + # type: count + # defaultResolution: 15 + # unit: milliseconds + # dimensions: + # - name: type + # type: string + # - name: powerdns_authoritative_response_rcodes + # type: count + # defaultResolution: 15 + # unit: count + # dimensions: + # - name: rcode + # type: string + # - name: powerdns_authoritative_remote_queries_unauth + # type: count + # defaultResolution: 15 + # unit: count + # dimensions: + # - name: remote + # type: string + # - name: powerdns_authoritative_remote_queries + # type: count + # defaultResolution: 15 + # unit: count + # dimensions: + # - name: remote + # type: string + # - name: powerdns_authoritative_key_cache_size + # type: gauge + # defaultResolution: 15 + # unit: count + # - name: powerdns_authoritative_up + # type: gauge + # defaultResolution: 15 + # unit: count + # - name: powerdns_authoritative_exceptions_total + # type: count + # defaultResolution: 15 + # unit: count + # dimensions: + # - name: error + # type: string + # - name: powerdns_authoritative_recursive_queries_total + # type: count + # defaultResolution: 15 + # unit: count + # dimensions: + # - name: status + # type: string + # - name: powerdns_authoritative_queries_unauth + # type: count + # defaultResolution: 15 + # unit: count + # dimensions: + # - name: record + # type: string + # tags: [] + # internalAttributes: + # - name: newrelic.integrationName + # type: string + # - name: newrelic.integrationVersion + # type: string + # - name: newrelic.source + # type: string + # - name: newrelic.agentVersion + # type: string + # ignoredAttributes: + # - agentName + # - coreCount + # - processorCount + # - systemMemoryBytes - entityType: POWERDNS_RECURSOR metrics: - name: powerdns_recursor_outgoing_queries_total