Skip to content

Commit

Permalink
feat(go.d/pkg/web): add "force_http2" option (netdata#19047)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyam8 authored Nov 20, 2024
1 parent 8784e90 commit 6ef270c
Show file tree
Hide file tree
Showing 113 changed files with 236 additions and 51 deletions.
3 changes: 2 additions & 1 deletion src/go/plugin/go.d/modules/activemq/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
"tls_ca": "ok",
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true
"tls_skip_verify": true,
"force_http2": true
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/activemq/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
8 changes: 7 additions & 1 deletion src/go/plugin/go.d/modules/apache/config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
"description": "If set, the client will not follow HTTP redirects automatically.",
"type": "boolean"
},
"force_http2": {
"title": "Force HTTP2",
"description": "If set, forces the use of HTTP/2 protocol for all requests, even over plain TCP (h2c).",
"type": "boolean"
},
"username": {
"title": "Username",
"description": "The username for basic authentication.",
Expand Down Expand Up @@ -143,7 +148,8 @@
"update_every",
"url",
"timeout",
"not_follow_redirects"
"not_follow_redirects",
"force_http2"
]
},
{
Expand Down
4 changes: 4 additions & 0 deletions src/go/plugin/go.d/modules/apache/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ modules:
description: Redirect handling policy. Controls whether the client follows redirects.
default_value: no
required: false
- name: force_http2
description: Forces the use of HTTP/2 protocol for all requests, even over plain TCP (h2c).
default_value: no
required: false
- name: tls_skip_verify
description: Server certificate chain and hostname validation policy. Controls whether the client performs this check.
default_value: no
Expand Down
3 changes: 2 additions & 1 deletion src/go/plugin/go.d/modules/apache/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"tls_ca": "ok",
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true
"tls_skip_verify": true,
"force_http2": true
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/apache/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/bind/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true,
"force_http2": true,
"permit_view": "ok"
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/bind/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
permit_view: "ok"
3 changes: 2 additions & 1 deletion src/go/plugin/go.d/modules/cassandra/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"tls_ca": "ok",
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true
"tls_skip_verify": true,
"force_http2": true
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/cassandra/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
3 changes: 2 additions & 1 deletion src/go/plugin/go.d/modules/ceph/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"tls_ca": "ok",
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true
"tls_skip_verify": true,
"force_http2": true
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/ceph/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
3 changes: 2 additions & 1 deletion src/go/plugin/go.d/modules/clickhouse/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"tls_ca": "ok",
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true
"tls_skip_verify": true,
"force_http2": true
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/clickhouse/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
3 changes: 2 additions & 1 deletion src/go/plugin/go.d/modules/cockroachdb/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"tls_ca": "ok",
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true
"tls_skip_verify": true,
"force_http2": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
3 changes: 2 additions & 1 deletion src/go/plugin/go.d/modules/consul/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true,
"acl_token": "ok"
"acl_token": "ok",
"force_http2": true
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/consul/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
acl_token: "ok"
force_http2: yes
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/coredns/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true,
"force_http2": true,
"per_server_stats": {
"includes": [
"ok"
Expand Down
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/coredns/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
per_server_stats:
includes:
- "ok"
Expand Down
3 changes: 2 additions & 1 deletion src/go/plugin/go.d/modules/couchbase/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"tls_ca": "ok",
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true
"tls_skip_verify": true,
"force_http2": true
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/couchbase/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/couchdb/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true,
"force_http2": true,
"node": "ok",
"databases": "ok"
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/couchdb/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
node: "ok"
databases: "ok"
3 changes: 2 additions & 1 deletion src/go/plugin/go.d/modules/dnsdist/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"tls_ca": "ok",
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true
"tls_skip_verify": true,
"force_http2": true
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/dnsdist/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"tls_ca": "ok",
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true
"tls_skip_verify": true,
"force_http2": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/dockerhub/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true,
"force_http2": true,
"repositories": [
"ok"
]
Expand Down
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/dockerhub/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
repositories:
- "ok"
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true,
"force_http2": true,
"cluster_mode": true,
"collect_node_stats": true,
"collect_cluster_health": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
cluster_mode: yes
collect_node_stats: yes
collect_cluster_health: yes
Expand Down
3 changes: 2 additions & 1 deletion src/go/plugin/go.d/modules/envoy/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"tls_ca": "ok",
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true
"tls_skip_verify": true,
"force_http2": true
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/envoy/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/fluentd/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true,
"force_http2": true,
"permit_plugin_id": "ok"
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/fluentd/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
permit_plugin_id: "ok"
3 changes: 2 additions & 1 deletion src/go/plugin/go.d/modules/geth/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"tls_ca": "ok",
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true
"tls_skip_verify": true,
"force_http2": true
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/geth/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
3 changes: 2 additions & 1 deletion src/go/plugin/go.d/modules/haproxy/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"tls_ca": "ok",
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true
"tls_skip_verify": true,
"force_http2": true
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/haproxy/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
3 changes: 2 additions & 1 deletion src/go/plugin/go.d/modules/hdfs/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"tls_ca": "ok",
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true
"tls_skip_verify": true,
"force_http2": true
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/hdfs/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/httpcheck/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true,
"force_http2": true,
"status_accepted": [
123
],
Expand Down
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/httpcheck/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
status_accepted:
- 123
response_match: "ok"
Expand Down
3 changes: 2 additions & 1 deletion src/go/plugin/go.d/modules/icecast/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"tls_ca": "ok",
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true
"tls_skip_verify": true,
"force_http2": true
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/icecast/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/ipfs/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true,
"force_http2": true,
"pinapi": false,
"repoapi": false
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/ipfs/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
pinapi: no
repoapi: no
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true,
"force_http2": true,
"token_path": "ok"
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
token_path: "ok"
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"tls_ca": "ok",
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true
"tls_skip_verify": true,
"force_http2": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
3 changes: 2 additions & 1 deletion src/go/plugin/go.d/modules/lighttpd/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"tls_ca": "ok",
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true
"tls_skip_verify": true,
"force_http2": true
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/lighttpd/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
3 changes: 2 additions & 1 deletion src/go/plugin/go.d/modules/logstash/testdata/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"tls_ca": "ok",
"tls_cert": "ok",
"tls_key": "ok",
"tls_skip_verify": true
"tls_skip_verify": true,
"force_http2": true
}
1 change: 1 addition & 0 deletions src/go/plugin/go.d/modules/logstash/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ tls_ca: "ok"
tls_cert: "ok"
tls_key: "ok"
tls_skip_verify: yes
force_http2: yes
Loading

0 comments on commit 6ef270c

Please sign in to comment.